46 lines
782 B
Lua
Raw Normal View History

2023-08-19 17:22:56 +00:00
return {
2023-08-21 17:19:37 +00:00
"neovim/nvim-lspconfig",
event = { "BufReadPre", "BufNewFile" },
dependencies = {
"folke/neodev.nvim",
},
opts = {
servers = {
2023-10-20 13:55:21 +00:00
clangd = {},
2023-08-21 17:19:37 +00:00
gopls = {},
lua_ls = {
settings = {
Lua = {
workspace = {
checkThirdParty = false,
},
},
},
2023-08-19 17:22:56 +00:00
},
},
2023-08-21 17:19:37 +00:00
},
config = function(_, opts)
require("neodev").setup()
-- Servers
local servers = opts.servers
for server, server_opts in pairs(servers) do
require("lspconfig")[server].setup(server_opts)
end
-- Icons
local icons = {
Error = "",
Warn = "",
Hint = "",
Info = "",
}
2023-08-19 17:22:56 +00:00
2023-08-21 17:19:37 +00:00
for name, icon in pairs(icons) do
name = "DiagnosticSign" .. name
vim.fn.sign_define(name, { text = icon, texthl = name, numhl = "" })
end
end,
}