feat: fix bug
This commit is contained in:
parent
8f5e8e3b17
commit
3b0e90a46e
1 changed files with 8 additions and 1 deletions
|
|
@ -22,7 +22,14 @@ end
|
||||||
---@return string?
|
---@return string?
|
||||||
local function get_lang_from_filename(filename, custom_langs, disabled_langs, debug)
|
local function get_lang_from_filename(filename, custom_langs, disabled_langs, debug)
|
||||||
if custom_langs and custom_langs[filename] then
|
if custom_langs and custom_langs[filename] then
|
||||||
return custom_langs[filename]
|
local lang = custom_langs[filename]
|
||||||
|
if disabled_langs and vim.tbl_contains(disabled_langs, lang) then
|
||||||
|
if debug then
|
||||||
|
dbg('lang disabled: %s', lang)
|
||||||
|
end
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
return lang
|
||||||
end
|
end
|
||||||
|
|
||||||
local ft = vim.filetype.match({ filename = filename })
|
local ft = vim.filetype.match({ filename = filename })
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue