Skip to content

Commit

Permalink
[Neovim] Disable tsserver autoformatting
Browse files Browse the repository at this point in the history
  • Loading branch information
LongerHV committed Oct 24, 2023
1 parent 4c90205 commit a1881bf
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions modules/home-manager/myHome/neovim/config/languages.lua
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ function M.setup_servers(json_config)
for server, config in pairs(lsp_servers) do
if server == "lua_ls" then
config.settings.Lua.workspace.library = vim.api.nvim_get_runtime_file("", true)
elseif server == "tsserver" then
config.on_attach = function(client, bufnr)
client.server_capabilities.documentFormattingProvider = false
client.server_capabilities.documentRangeFormattingProvider = false
end
end
lspconfig[server].setup(config)
end
Expand Down

0 comments on commit a1881bf

Please sign in to comment.