Disable lua_ls formatting in favor of stylua

This commit is contained in:
ViViDboarder 2023-06-13 17:24:37 -07:00
parent ad47f57d68
commit 29d9b7960d
1 changed files with 15 additions and 1 deletions

View File

@ -309,7 +309,21 @@ function M.config_lsp()
-- Setup each server with default config
vim.tbl_map(function(server)
lsp_config[server].setup(default_setup)
if server == "lua_ls" then
-- Disable formatting with lua_ls because I use luacheck
local config = vim.tbl_extend("force", default_setup, {
settings = {
Lua = {
format = {
enable = false,
},
},
},
})
lsp_config[server].setup(config)
else
lsp_config[server].setup(default_setup)
end
end, needs_setup)
end)