Improved neovim config
This commit is contained in:
@ -1,24 +1,49 @@
|
||||
return {
|
||||
"neovim/nvim-lspconfig",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
opts = {
|
||||
servers = {
|
||||
lua_ls = {},
|
||||
gopls = {},
|
||||
|
||||
-- web dev
|
||||
--cssls = {},
|
||||
--html = {},
|
||||
--jsonls = {},
|
||||
--tsserver = {},
|
||||
--svelte = {},
|
||||
"neovim/nvim-lspconfig",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
dependencies = {
|
||||
"folke/neodev.nvim",
|
||||
},
|
||||
opts = {
|
||||
servers = {
|
||||
gopls = {},
|
||||
lua_ls = {
|
||||
settings = {
|
||||
Lua = {
|
||||
workspace = {
|
||||
checkThirdParty = false,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
--cssls = {},
|
||||
--html = {},
|
||||
--jsonls = {},
|
||||
--tsserver = {},
|
||||
--svelte = {},
|
||||
},
|
||||
config = function(_, opts)
|
||||
local servers = opts.servers
|
||||
},
|
||||
config = function(_, opts)
|
||||
require("neodev").setup()
|
||||
|
||||
for server, server_opts in pairs(servers) do
|
||||
require("lspconfig")[server].setup(server_opts)
|
||||
end
|
||||
end,
|
||||
}
|
||||
-- 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 = " ",
|
||||
}
|
||||
|
||||
for name, icon in pairs(icons) do
|
||||
name = "DiagnosticSign" .. name
|
||||
vim.fn.sign_define(name, { text = icon, texthl = name, numhl = "" })
|
||||
end
|
||||
end,
|
||||
}
|
||||
|
Reference in New Issue
Block a user