Compare commits

...

2 Commits

Author SHA1 Message Date
3b9aa845ca Remove treesitter context 2025-05-26 02:55:25 +02:00
76e71ac03f Update treesitter to main 2025-05-26 02:48:43 +02:00
3 changed files with 33 additions and 29 deletions

View File

@@ -32,3 +32,15 @@ vim.api.nvim_create_autocmd({ "InsertEnter", "WinLeave" }, {
group = cursor_group,
pattern = "*",
})
vim.api.nvim_create_autocmd("FileType", {
pattern = require("tools.highlight"),
callback = function()
-- syntax highlighting, provided by Neovim
vim.treesitter.start()
-- folds, provided by Neovim
vim.wo.foldexpr = "v:lua.vim.treesitter.foldexpr()"
-- indentation, provided by nvim-treesitter
vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()"
end,
})

View File

@@ -4,27 +4,15 @@ return {
"nvim-treesitter/nvim-treesitter",
dependencies = {
"nvim-treesitter/nvim-treesitter-context",
"nvim-treesitter/nvim-treesitter-textobjects",
{ "nvim-treesitter/nvim-treesitter-textobjects", branch = "main" },
"windwp/nvim-ts-autotag",
},
lazy = false,
branch = "main",
build = ":TSUpdate",
opts = {
-- Add languages to be installed here that you want installed for treesitter
ensure_installed = {
"c",
"cpp",
"go",
"lua",
"python",
"rust",
"tsx",
"typescript",
"vimdoc",
"vim",
"markdown",
"markdown_inline",
"bash",
"sql",
},
ensure_installed = require("tools.highlight"),
-- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!)
auto_install = true,
@@ -91,17 +79,5 @@ return {
enable = true,
},
},
config = function(_, opts)
require("nvim-treesitter.configs").setup(opts)
require("nvim-treesitter.install").update({ with_sync = true })
end,
},
{
"nvim-treesitter/nvim-treesitter-context",
opts = {
multiwindow = true,
mode = "topline",
separator = require("symbols.window").borderchars[3],
},
},
}

View File

@@ -0,0 +1,16 @@
return {
"c",
"cpp",
"go",
"lua",
"python",
"rust",
"tsx",
"typescript",
"vimdoc",
"vim",
"markdown",
"markdown_inline",
"bash",
"sql",
}