mirror of
https://github.com/LunarVim/LunarVim.git
synced 2025-08-30 14:49:43 +02:00
[Bugfix]: Don't override formatter with empty exe (#1224)
* fix(lsp): don't override formatter with empty exe * Check for nil value
This commit is contained in:
parent
7cd03ff4e3
commit
db19d4c13c
1 changed files with 1 additions and 1 deletions
|
@ -71,7 +71,7 @@ function M.common_on_init(client, bufnr)
|
|||
end
|
||||
|
||||
local formatters = lvim.lang[vim.bo.filetype].formatters
|
||||
if not vim.tbl_isempty(formatters) then
|
||||
if not vim.tbl_isempty(formatters) and formatters[1]["exe"] ~= nil and formatters[1].exe ~= "" then
|
||||
client.resolved_capabilities.document_formatting = false
|
||||
u.lvim_log(string.format("Overriding [%s] formatter with [%s]", client.name, formatters[1].exe))
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue