feat: add glsl-language-server
This commit is contained in:
parent
de13884b85
commit
cc6226d335
4 changed files with 39 additions and 2 deletions
|
@ -17,6 +17,7 @@
|
|||
haskellPackages.haskell-language-server
|
||||
rust-analyzer
|
||||
sumneko-lua-language-server
|
||||
glsl-language-server
|
||||
|
||||
# linters & formatters
|
||||
nodePackages.eslint
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue