Created
May 24, 2024 05:51
-
-
Save alexng353/4ca3a707be6b5d965ae8cc9cca006c8b to your computer and use it in GitHub Desktop.
Disable `tsserver` buffer formatting in lspconfig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 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