Folding kinda annoying on smaller projects ie. AoC. Add lsp for wgsl and glsl

This commit is contained in:
Fabian Schmidt 2024-11-04 07:49:39 +01:00
parent a56b8f7029
commit 4c81d0b05b
2 changed files with 13 additions and 6 deletions

View File

@ -42,10 +42,10 @@ vim.opt.expandtab = false
vim.opt.autoindent = true vim.opt.autoindent = true
vim.opt.smartindent = true vim.opt.smartindent = true
vim.opt.completeopt = { "menu", "menuone", "noselect" } vim.opt.completeopt = { "menu", "menuone", "noselect" }
vim.opt.foldmethod = "expr" --vim.opt.foldmethod = "expr"
vim.opt.foldexpr = "nvim_treesitter#foldexpr()" --vim.opt.foldexpr = "nvim_treesitter#foldexpr()"
vim.opt.foldtext = "" --vim.opt.foldtext = ""
vim.opt.foldlevelstart = 1 --vim.opt.foldlevelstart = 1
vim.opt.foldnestmax = 2 --vim.opt.foldnestmax = 2
-- TODO replace config with opts in every plugin -- TODO replace config with opts in every plugin

View File

@ -119,6 +119,14 @@ return {
capabilities = capabilities, capabilities = capabilities,
on_attach = lsp_attach on_attach = lsp_attach
}) })
lspconfig.wgsl_analyzer.setup({
capabilities = capabilities,
on_attach = lsp_attach
})
lspconfig.glsl_analyzer.setup({
capabilities = capabilities,
on_attach = lsp_attach
})
capabilities.textDocument.completion.completionItem.snippetSupport = true capabilities.textDocument.completion.completionItem.snippetSupport = true
lspconfig.emmet_ls.setup({ lspconfig.emmet_ls.setup({
capabilities = capabilities, capabilities = capabilities,
@ -142,7 +150,6 @@ return {
extraArgs = { "+nightly" }, extraArgs = { "+nightly" },
}, },
cargo = { cargo = {
allFeatures = true,
loadOutDirsFromCheck = true, loadOutDirsFromCheck = true,
runBuildScripts = true, runBuildScripts = true,
}, },