This repository has been archived on 2023-03-02. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/.config/nvim/lua/lsp/init.lua

76 lines
1.9 KiB
Lua
Raw Normal View History

-- Author : swytch
-- Created : Tuesday May 18, 2021 12:08:51 CET
-- License : GPLv3
-- Description : neovim lsp config file
local lsp = {}
vim.fn.sign_define(
"LspDiagnosticsSignError",
{
texthl = "LspDiagnosticsSignError",
text = globals.sign_error,
numhl = "LspDiagnosticsSignError"
}
)
vim.fn.sign_define(
"LspDiagnosticsSignWarning",
{
texthl = "LspDiagnosticsSignWarning",
text = globals.sign_warning,
numhl = "LspDiagnosticsSignWarning"}
)
vim.fn.sign_define(
"LspDiagnosticsSignHint",
{
texthl = "LspDiagnosticsSignHint",
text = globals.sign_hint,
numhl = "LspDiagnosticsSignHint"
}
)
vim.fn.sign_define(
"LspDiagnosticsSignInformation",
{
texthl = "LspDiagnosticsSignInformation",
text = globals.sign_info,
numhl = "LspDiagnosticsSignInformation"
}
)
2021-05-21 21:12:11 +02:00
-- symbols for autocomplete
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
}
function lsp.setup()
local ft = vim.bo.filetype
if ft == "cpp" then ft = "c" end
require("lsp." .. ft) -- ./<ft>.lua
end
return lsp