feat: add glsl-language-server

This commit is contained in:
Felix Schröter 2022-05-05 17:56:17 +02:00
parent de13884b85
commit cc6226d335
Signed by: felschr
GPG key ID: 671E39E6744C807D
4 changed files with 39 additions and 2 deletions
home/editors
lsp.nix
neovim/lsp

View file

@ -17,6 +17,7 @@
haskellPackages.haskell-language-server
rust-analyzer
sumneko-lua-language-server
glsl-language-server
# linters & formatters
nodePackages.eslint

View file

@ -27,8 +27,20 @@ local diagnosticls_on_attach = function(_, bufnr)
})
end
local config = require("lspconfig")
local configs = require("lspconfig.configs")
if not configs.glslls then
configs.glslls = {
default_config = {
cmd = { "glslls", "--stdin" };
filetypes = { "glsl" };
root_dir = config.util.root_pattern("*.conf", ".git");
settings = {};
};
}
end
local config = require'lspconfig'
local capabilities_ = vim.lsp.protocol.make_client_capabilities()
local capabilities = require("cmp_nvim_lsp").update_capabilities(capabilities_)
capabilities.textDocument.completion.completionItem.snippetSupport = true
@ -47,6 +59,7 @@ local servers = {
"hls",
"rust_analyzer",
"vimls",
"glslls",
}
for _, lsp in ipairs(servers) do
config[lsp].setup {