fix(nixvim): Disable formatting for Typescript
This commit is contained in:
parent
4205344bb6
commit
2d9b40b809
1 changed files with 8 additions and 0 deletions
|
@ -29,6 +29,8 @@
|
|||
enable = true;
|
||||
extraOptions.on_init.__raw = ''
|
||||
function(client)
|
||||
client.server_capabilities.documentFormattingProvider = false
|
||||
client.server_capabilities.documentRangeFormattingProvider = false
|
||||
client.handlers['tsserver/request'] = function(_, result, context)
|
||||
local clients = vim.lsp.get_clients({ bufnr = context.bufnr, name = 'vtsls' })
|
||||
if #clients == 0 then
|
||||
|
@ -59,6 +61,12 @@
|
|||
typescript-tools = {
|
||||
enable = true;
|
||||
settings = {
|
||||
on_attach.__raw = ''
|
||||
function(client)
|
||||
client.server_capabilities.documentFormattingProvider = false
|
||||
client.server_capabilities.documentRangeFormattingProvider = false
|
||||
end
|
||||
'';
|
||||
filetypes = [ "javascript" "typescript" "vue" ];
|
||||
settings = {
|
||||
single_file_support = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue