53 lines
1.1 KiB
Lua
53 lines
1.1 KiB
Lua
return {
|
|
{
|
|
"williamboman/mason.nvim",
|
|
config = true
|
|
},
|
|
{
|
|
"williamboman/mason-lspconfig.nvim",
|
|
},
|
|
{
|
|
"neovim/nvim-lspconfig",
|
|
event = "BufReadPre BufNewFile",
|
|
dependencies = {
|
|
"williamboman/mason.nvim",
|
|
"williamboman/mason-lspconfig.nvim",
|
|
"nvimtools/none-ls.nvim",
|
|
},
|
|
config = function()
|
|
require("user.plugins.lsp.mason_lsp_config")
|
|
require("user.plugins.lsp.diagnostics_config").setup()
|
|
-- require("user.lsp.none_ls")
|
|
|
|
local which_key = require("which-key")
|
|
which_key.add({
|
|
{
|
|
"<leader>ch",
|
|
function()
|
|
local current = vim.diagnostic.config().virtual_text
|
|
vim.diagnostic.config({ virtual_text = not current })
|
|
end,
|
|
desc = "toggle inline diagnostics"
|
|
},
|
|
})
|
|
|
|
vim.cmd([[ command! Format execute 'lua vim.lsp.buf.format{async=true}' ]])
|
|
end,
|
|
},
|
|
{
|
|
"lukas-reineke/lsp-format.nvim",
|
|
event = "VeryLazy",
|
|
config = function()
|
|
local on_attach = function(client)
|
|
require("lsp-format").on_attach(client)
|
|
end
|
|
|
|
require("lspconfig").gopls.setup { on_attach = on_attach }
|
|
end
|
|
},
|
|
{
|
|
"nvimtools/none-ls.nvim",
|
|
event = "VeryLazy"
|
|
},
|
|
}
|