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;
|
enable = true;
|
||||||
extraOptions.on_init.__raw = ''
|
extraOptions.on_init.__raw = ''
|
||||||
function(client)
|
function(client)
|
||||||
|
client.server_capabilities.documentFormattingProvider = false
|
||||||
|
client.server_capabilities.documentRangeFormattingProvider = false
|
||||||
client.handlers['tsserver/request'] = function(_, result, context)
|
client.handlers['tsserver/request'] = function(_, result, context)
|
||||||
local clients = vim.lsp.get_clients({ bufnr = context.bufnr, name = 'vtsls' })
|
local clients = vim.lsp.get_clients({ bufnr = context.bufnr, name = 'vtsls' })
|
||||||
if #clients == 0 then
|
if #clients == 0 then
|
||||||
|
@ -59,6 +61,12 @@
|
||||||
typescript-tools = {
|
typescript-tools = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
|
on_attach.__raw = ''
|
||||||
|
function(client)
|
||||||
|
client.server_capabilities.documentFormattingProvider = false
|
||||||
|
client.server_capabilities.documentRangeFormattingProvider = false
|
||||||
|
end
|
||||||
|
'';
|
||||||
filetypes = [ "javascript" "typescript" "vue" ];
|
filetypes = [ "javascript" "typescript" "vue" ];
|
||||||
settings = {
|
settings = {
|
||||||
single_file_support = false;
|
single_file_support = false;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue