summaryrefslogtreecommitdiff
path: root/lua/lsp/null-ls/formatters.lua
diff options
context:
space:
mode:
authorAbouzar Parvan <[email protected]>2021-08-19 18:30:44 +0430
committerGitHub <[email protected]>2021-08-19 16:00:44 +0200
commit1f45d1531d3636102f8971f8b2103b5302f48b68 (patch)
treed3b5911ffaeb3be7e661399039c78830812e14fd /lua/lsp/null-ls/formatters.lua
parent0bf6fd68c625396d83eb8fca8d7248c5543ae6f1 (diff)
[Bugfix] fix formatter/linter nil issue (#1353)
* fix formatter/linter issue for undefined lang/filetypes * revrese the order
Diffstat (limited to 'lua/lsp/null-ls/formatters.lua')
-rw-r--r--lua/lsp/null-ls/formatters.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/lua/lsp/null-ls/formatters.lua b/lua/lsp/null-ls/formatters.lua
index d6ede29d..cae1fa7d 100644
--- a/lua/lsp/null-ls/formatters.lua
+++ b/lua/lsp/null-ls/formatters.lua
@@ -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