mirror of
https://github.com/buckley310/nixos-config.git
synced 2024-12-21 19:24:15 +00:00
vim: refactor noFormat
This commit is contained in:
parent
439fde73c2
commit
dc8e5126c2
1 changed files with 7 additions and 12 deletions
|
@ -1,5 +1,8 @@
|
||||||
local lspconfig = require('lspconfig')
|
local lspconfig = require('lspconfig')
|
||||||
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||||
|
local noFormat = function(client, _)
|
||||||
|
client.server_capabilities.documentFormattingProvider = false
|
||||||
|
end
|
||||||
|
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
lspconfig.lua_ls.setup({
|
lspconfig.lua_ls.setup({
|
||||||
|
@ -21,25 +24,19 @@ lspconfig.pyright.setup({
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
lspconfig.tsserver.setup({
|
lspconfig.tsserver.setup({
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
on_attach = function(client, _)
|
on_attach = noFormat,
|
||||||
client.server_capabilities.documentFormattingProvider = false
|
|
||||||
end,
|
|
||||||
})
|
})
|
||||||
|
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
lspconfig.html.setup({
|
lspconfig.html.setup({
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
on_attach = function(client, _)
|
on_attach = noFormat,
|
||||||
client.server_capabilities.documentFormattingProvider = false
|
|
||||||
end,
|
|
||||||
})
|
})
|
||||||
|
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
lspconfig.cssls.setup({
|
lspconfig.cssls.setup({
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
on_attach = function(client, _)
|
on_attach = noFormat,
|
||||||
client.server_capabilities.documentFormattingProvider = false
|
|
||||||
end,
|
|
||||||
})
|
})
|
||||||
|
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
|
@ -58,9 +55,7 @@ lspconfig.nil_ls.setup({
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
lspconfig.jsonls.setup({
|
lspconfig.jsonls.setup({
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
on_attach = function(client, _)
|
on_attach = noFormat,
|
||||||
client.server_capabilities.documentFormattingProvider = false
|
|
||||||
end,
|
|
||||||
})
|
})
|
||||||
|
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in a new issue