mirror of
https://github.com/ThePrimeagen/harpoon.git
synced 2025-07-13 17:40:25 +00:00
refactor: replaced loop for tbl_contains
This commit is contained in:
parent
2ed6b3e8ae
commit
0eced8969b
@ -125,16 +125,14 @@ local function filter_filetype()
|
||||
return
|
||||
end
|
||||
|
||||
for filetype = 1, #excluded_filetypes do
|
||||
if current_filetype == excluded_filetypes[filetype] then
|
||||
log.error(
|
||||
'filter_filetype(): This filetype cannot be added or is included in the "excluded_filetypes" option'
|
||||
)
|
||||
error(
|
||||
'This filetype cannot be added or is included in the "excluded_filetypes" option'
|
||||
)
|
||||
return
|
||||
end
|
||||
if vim.tbl_contains(excluded_filetypes, current_filetype) then
|
||||
log.error(
|
||||
'filter_filetype(): This filetype cannot be added or is included in the "excluded_filetypes" option'
|
||||
)
|
||||
error(
|
||||
'This filetype cannot be added or is included in the "excluded_filetypes" option'
|
||||
)
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user