From 4c81d0b05b59e94c84ab94ce21707b288b538abf Mon Sep 17 00:00:00 2001 From: Fabian Schmidt Date: Mon, 4 Nov 2024 07:49:39 +0100 Subject: [PATCH] Folding kinda annoying on smaller projects ie. AoC. Add lsp for wgsl and glsl --- init.lua | 10 +++++----- lua/plugins/lsp.lua | 9 ++++++++- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/init.lua b/init.lua index 17427f1..9098348 100644 --- a/init.lua +++ b/init.lua @@ -42,10 +42,10 @@ vim.opt.expandtab = false vim.opt.autoindent = true vim.opt.smartindent = true vim.opt.completeopt = { "menu", "menuone", "noselect" } -vim.opt.foldmethod = "expr" -vim.opt.foldexpr = "nvim_treesitter#foldexpr()" -vim.opt.foldtext = "" -vim.opt.foldlevelstart = 1 -vim.opt.foldnestmax = 2 +--vim.opt.foldmethod = "expr" +--vim.opt.foldexpr = "nvim_treesitter#foldexpr()" +--vim.opt.foldtext = "" +--vim.opt.foldlevelstart = 1 +--vim.opt.foldnestmax = 2 -- TODO replace config with opts in every plugin diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index f1befb2..288fb39 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -119,6 +119,14 @@ return { capabilities = capabilities, 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 lspconfig.emmet_ls.setup({ capabilities = capabilities, @@ -142,7 +150,6 @@ return { extraArgs = { "+nightly" }, }, cargo = { - allFeatures = true, loadOutDirsFromCheck = true, runBuildScripts = true, },