[Bugfix] fix formatter/linter nil issue (#1353)

* fix formatter/linter issue for undefined lang/filetypes

* revrese the order
This commit is contained in:
Abouzar Parvan 2021-08-19 18:30:44 +04:30 committed by GitHub
parent 0bf6fd68c6
commit 1f45d1531d
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View file

@ -1189,7 +1189,7 @@ lvim.lang = {
},
vim = {
formatters = {},
linters = { "" },
linters = {},
lsp = {
provider = "vimls",
setup = {

View file

@ -63,7 +63,7 @@ function M.list_configured(formatter_configs)
end
function M.setup(filetype, options)
if formatters_by_ft[filetype] and not options.force_reload then
if not lvim.lang[filetype] or (formatters_by_ft[filetype] and not options.force_reload) then
return
end

View file

@ -63,7 +63,7 @@ function M.list_configured(linter_configs)
end
function M.setup(filetype, options)
if linters_by_ft[filetype] and not options.force_reload then
if not lvim.lang[filetype] or (linters_by_ft[filetype] and not options.force_reload) then
return
end