Skip to content

Instantly share code, notes, and snippets.

@alexng353
Created May 24, 2024 05:51
Show Gist options
  • Save alexng353/4ca3a707be6b5d965ae8cc9cca006c8b to your computer and use it in GitHub Desktop.
Save alexng353/4ca3a707be6b5d965ae8cc9cca006c8b to your computer and use it in GitHub Desktop.
Disable `tsserver` buffer formatting in lspconfig
-- https://neovim.discourse.group/t/autoformat-using-first-option-disable-formatting-on-tsserver/2500/3
require'lspconfig'.tsserver.setup{
on_attach = function(client)
client.server_capabilities.documentFormattingProvider = false
client.server_capabilities.documentRangeFormattingProvider = false
end,
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment