From e9f6957b9935df5697d99bb5472e0c3cf8f353e9 Mon Sep 17 00:00:00 2001 From: siduck Date: Mon, 26 Feb 2024 05:35:58 +0530 Subject: [PATCH 1/4] add some vim* tsparsers in treesitter config --- lua/plugins/configs/treesitter.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/configs/treesitter.lua b/lua/plugins/configs/treesitter.lua index b21b55de..897c4e3f 100644 --- a/lua/plugins/configs/treesitter.lua +++ b/lua/plugins/configs/treesitter.lua @@ -1,5 +1,5 @@ local options = { - ensure_installed = { "lua" }, + ensure_installed = { "lua", "vim", "vimdoc" }, highlight = { enable = true, From 0dcd8a91b69f1fc0fe7064bd404b5390c1c164c5 Mon Sep 17 00:00:00 2001 From: Eduardo Bray Date: Mon, 26 Feb 2024 04:56:38 -0300 Subject: [PATCH 2/4] Remove Telescope unsupported layout_config key `results_width` (#2694) --- lua/plugins/configs/telescope.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/plugins/configs/telescope.lua b/lua/plugins/configs/telescope.lua index 784fb19a..8de35a8a 100644 --- a/lua/plugins/configs/telescope.lua +++ b/lua/plugins/configs/telescope.lua @@ -21,7 +21,6 @@ local options = { horizontal = { prompt_position = "top", preview_width = 0.55, - results_width = 0.8, }, vertical = { mirror = false, From 8fe6a6560eff96238f55701470494ad911eab955 Mon Sep 17 00:00:00 2001 From: siduck Date: Thu, 29 Feb 2024 08:47:12 +0530 Subject: [PATCH 3/4] rm treesitter tag & fix #2697 --- lua/plugins/init.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index bce71400..390f4b83 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -70,7 +70,6 @@ local default_plugins = { { "nvim-treesitter/nvim-treesitter", event = { "BufReadPost", "BufNewFile" }, - tag = "v0.9.2", cmd = { "TSInstall", "TSBufEnable", "TSBufDisable", "TSModuleInfo" }, build = ":TSUpdate", opts = function() From 13cce81d998630e46b1ad2d60dd10f3013726bb6 Mon Sep 17 00:00:00 2001 From: siduck Date: Tue, 5 Mar 2024 07:53:19 +0530 Subject: [PATCH 4/4] disable semantic tokens in on_init & expose on_init --- lua/plugins/configs/lspconfig.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index f824aa0d..37685e35 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -5,14 +5,16 @@ local M = {} local utils = require "core.utils" -- export on_attach & capabilities for custom lspconfigs - M.on_attach = function(client, bufnr) utils.load_mappings("lspconfig", { buffer = bufnr }) if client.server_capabilities.signatureHelpProvider then require("nvchad.signature").setup(client) end +end +-- disable semantic tokens +M.on_init = function(client, _) if not utils.load_config().ui.lsp_semantic_tokens and client.supports_method "textDocument/semanticTokens" then client.server_capabilities.semanticTokensProvider = nil end @@ -39,6 +41,7 @@ M.capabilities.textDocument.completion.completionItem = { } require("lspconfig").lua_ls.setup { + on_init = M.on_init, on_attach = M.on_attach, capabilities = M.capabilities,