Files
dotfiles/common/.config/nvim/lua/lsp-general.lua
Benjamin Kyd ccd7921439 hm
2023-03-05 23:12:09 +00:00

49 lines
1.1 KiB
Lua

local lspconfig = require('lspconfig');
require('mason').setup()
require('mason-lspconfig').setup({
ensure_installed = {'clangd'}
})
require('mason-lspconfig').setup_handlers({
function(server)
lspconfig[server].setup({})
end,
})
-- diagnostic symbols
local signs = { Error = "", Warn = "", Hint = "", Info = ""}
for type, icon in pairs(signs) do
local hl = "DiagnosticSign" .. type
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl })
end
-- completion symbols
vim.lsp.protocol.CompletionItemKind = {
"  (Text) ",
"  (Method)",
"  (Function)",
"  (Constructor)",
" ﴲ (Field)",
"[] (Variable)",
"  (Class)",
" ﰮ (Interface)",
"  (Module)",
" 襁 (Property)",
"  (Unit)",
"  (Value)",
" 練 (Enum)",
"  (Keyword)",
"  (Snippet)",
"  (Color)",
"  (File)",
"  (Reference)",
"  (Folder)",
"  (EnumMember)",
" ﲀ (Constant)",
" ﳤ (Struct)",
"  (Event)",
"  (Operator)",
"  (TypeParameter)"
}