deactivate sumneko_lua

This commit is contained in:
Markus Dieckmann 2023-03-14 16:52:04 +01:00
parent 52cf202a77
commit 46d18355c7

View File

@ -30,11 +30,15 @@ local on_attach = function(client, bufnr)
vim.keymap.set('n', '<leader>ca', vim.lsp.buf.code_action, bufopts) vim.keymap.set('n', '<leader>ca', vim.lsp.buf.code_action, bufopts)
vim.keymap.set('n', '<leader>gr', vim.lsp.buf.references, bufopts) vim.keymap.set('n', '<leader>gr', vim.lsp.buf.references, bufopts)
vim.keymap.set('n', '<leader>f', vim.lsp.buf.format, bufopts) vim.keymap.set('n', '<leader>f', vim.lsp.buf.format, bufopts)
if vim.bo[bufnr].buftype ~= "" or vim.bo[bufnr].filetype == "helm" then
vim.diagnostic.disable()
end
end end
local lsp_flags = { local lsp_flags = {
-- This is the default in Nvim 0.7+ -- This is the default in Nvim 0.7+
debounce_text_changes = 150, debounce_text_changes = 250,
} }
local capabilities = require('cmp_nvim_lsp').default_capabilities( local capabilities = require('cmp_nvim_lsp').default_capabilities(
vim.lsp.protocol.make_client_capabilities() vim.lsp.protocol.make_client_capabilities()
@ -82,19 +86,30 @@ require('mason-lspconfig').setup_handlers {
} }
} }
end, end,
['sumneko_lua'] = function() ['yamlls'] = function()
require('lspconfig')["sumneko_lua"].setup { require('lspconfig')["yamlls"].setup {
on_attach = on_attach, on_attach = on_attach,
flags = lsp_flags, flags = lsp_flags,
settings = { settings = {
Lua = { yaml = {
diagnostics = { schemas = { kubernetes = "globPattern" },
globals = { "vim" }
} }
} }
} }
} end
end, -- ['sumneko_lua'] = function()
-- require('lspconfig')["sumneko_lua"].setup {
-- on_attach = on_attach,
-- flags = lsp_flags,
-- settings = {
-- Lua = {
-- diagnostics = {
-- globals = { "vim" }
-- }
-- }
-- }
-- }
-- end,
} }
--require('lspconfig')['rust_analyzer'].setup { --require('lspconfig')['rust_analyzer'].setup {
-- on_attach = on_attach, -- on_attach = on_attach,
@ -104,4 +119,4 @@ require('mason-lspconfig').setup_handlers {
-- ["rust-analyzer"] = {} -- ["rust-analyzer"] = {}
-- } -- }
--} --}
require"fidget".setup{} require "fidget".setup {}