chore: update treesitter config and drop lsp semantic tokens

This commit is contained in:
Simon Lasbrugnas 2025-11-10 14:46:40 +01:00
parent 4da501359d
commit 70a10ce8bb
Signed by untrusted user who does not match committer: simon
GPG key ID: 86039876BA6ED8DE
3 changed files with 13 additions and 44 deletions

View file

@ -48,7 +48,7 @@
"nvim-lint": { "branch": "master", "commit": "8b349e822a36e9480aed96c6dd2f757f80524a35" }, "nvim-lint": { "branch": "master", "commit": "8b349e822a36e9480aed96c6dd2f757f80524a35" },
"nvim-lspconfig": { "branch": "master", "commit": "2010fc6ec03e2da552b4886fceb2f7bc0fc2e9c0" }, "nvim-lspconfig": { "branch": "master", "commit": "2010fc6ec03e2da552b4886fceb2f7bc0fc2e9c0" },
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" }, "nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
"nvim-treesitter": { "branch": "main", "commit": "81aec1e45d58b587fa055a938cd6642c6b94ba4d" }, "nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
"nvim-treesitter-context": { "branch": "master", "commit": "660861b1849256398f70450afdf93908d28dc945" }, "nvim-treesitter-context": { "branch": "master", "commit": "660861b1849256398f70450afdf93908d28dc945" },
"nvim-ts-autotag": { "branch": "main", "commit": "c4ca798ab95b316a768d51eaaaee48f64a4a46bc" }, "nvim-ts-autotag": { "branch": "main", "commit": "c4ca798ab95b316a768d51eaaaee48f64a4a46bc" },
"nvim-web-devicons": { "branch": "master", "commit": "8dcb311b0c92d460fac00eac706abd43d94d68af" }, "nvim-web-devicons": { "branch": "master", "commit": "8dcb311b0c92d460fac00eac706abd43d94d68af" },

View file

@ -23,6 +23,16 @@ vim.api.nvim_create_autocmd("FileType", {
end, end,
}) })
-- Disable LSP Semantic Tokens
vim.api.nvim_create_autocmd("LspAttach", {
callback = function(args)
local client = vim.lsp.get_client_by_id(args.data.client_id)
if client and client.server_capabilities.semanticTokensProvider then
client.server_capabilities.semanticTokensProvider = nil
end
end,
})
-- Auto insert mode on TermOpen -- Auto insert mode on TermOpen
vim.api.nvim_create_autocmd({ "TermOpen", "BufEnter" }, { vim.api.nvim_create_autocmd({ "TermOpen", "BufEnter" }, {
pattern = { "*" }, pattern = { "*" },

View file

@ -1,47 +1,6 @@
return { return {
{ -- Treesitter
"nvim-treesitter/nvim-treesitter", { "nvim-treesitter/nvim-treesitter", branch = 'master', lazy = false, build = ":TSUpdate" },
branch = "main",
lazy = false,
build = ":TSUpdate",
config = function()
require("nvim-treesitter").setup({
indent = { enable = true },
highlight = { enable = true },
ensure_installed = {
"bash",
"c",
"diff",
"html",
"javascript",
"jsx",
"jsdoc",
"json",
"jsonc",
"lua",
"luadoc",
"luap",
"markdown",
"markdown_inline",
"printf",
"python",
"query",
"regex",
"toml",
"tsx",
"typescript",
"vim",
"vimdoc",
"xml",
"yaml",
"go",
"gomod",
"gosum",
},
})
end,
},
-- Show context of the current function -- Show context of the current function
{ {
"nvim-treesitter/nvim-treesitter-context", "nvim-treesitter/nvim-treesitter-context",