diff options
| author | Abouzar Parvan <[email protected]> | 2021-08-19 18:30:44 +0430 | 
|---|---|---|
| committer | GitHub <[email protected]> | 2021-08-19 16:00:44 +0200 | 
| commit | 1f45d1531d3636102f8971f8b2103b5302f48b68 (patch) | |
| tree | d3b5911ffaeb3be7e661399039c78830812e14fd /lua/lsp | |
| parent | 0bf6fd68c625396d83eb8fca8d7248c5543ae6f1 (diff) | |
[Bugfix] fix formatter/linter nil issue (#1353)
* fix formatter/linter issue for undefined lang/filetypes
* revrese the order
Diffstat (limited to 'lua/lsp')
| -rw-r--r-- | lua/lsp/null-ls/formatters.lua | 2 | ||||
| -rw-r--r-- | lua/lsp/null-ls/linters.lua | 2 | 
2 files changed, 2 insertions, 2 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 diff --git a/lua/lsp/null-ls/linters.lua b/lua/lsp/null-ls/linters.lua index 64d2db4a..b449a4f2 100644 --- a/lua/lsp/null-ls/linters.lua +++ b/lua/lsp/null-ls/linters.lua @@ -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 | 
