diff --git a/dot_config/nvim/lua/plugins/testing.lua b/dot_config/nvim/lua/plugins/testing.lua index 44fcc39..63469e8 100644 --- a/dot_config/nvim/lua/plugins/testing.lua +++ b/dot_config/nvim/lua/plugins/testing.lua @@ -3,7 +3,6 @@ return { "nvim-neotest/neotest", dependencies = { "nvim-lua/plenary.nvim", - "nvim-treesitter/nvim-treesitter", "nvim-neotest/nvim-nio", "rouge8/neotest-rust", "rcasia/neotest-java", diff --git a/dot_config/nvim/lua/plugins/treesitter-latex.lua b/dot_config/nvim/lua/plugins/treesitter-latex.lua index b0eb726..9760d91 100644 --- a/dot_config/nvim/lua/plugins/treesitter-latex.lua +++ b/dot_config/nvim/lua/plugins/treesitter-latex.lua @@ -1,10 +1,2 @@ --- Ensure Treesitter knows about LaTeX (nabla benefits, and some plugins use it) -return { - "nvim-treesitter/nvim-treesitter", - opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - if type(opts.ensure_installed) == "table" then - if not vim.tbl_contains(opts.ensure_installed, "latex") then table.insert(opts.ensure_installed, "latex") end - end - end, -} +-- nvim-treesitter dropped; latex parser available via system package or tree-sitter-cli +return {} diff --git a/dot_config/nvim/lua/plugins/treesitter.lua b/dot_config/nvim/lua/plugins/treesitter.lua index 3265cd4..1ff01cf 100644 --- a/dot_config/nvim/lua/plugins/treesitter.lua +++ b/dot_config/nvim/lua/plugins/treesitter.lua @@ -1,70 +1,20 @@ +-- nvim-treesitter dropped: archived, incompatible with Neovim 0.12 API. +-- Neovim 0.12 handles treesitter natively (highlighting, folding, injections). +-- Bundled parsers: bash, c, lua, markdown, markdown_inline, python, query, +-- regex, vim, vimdoc. +-- Additional parsers (rust, ts, java, etc.): install via AUR tree-sitter-* or +-- tree-sitter-cli: https://github.com/tree-sitter/tree-sitter + return { + -- Textobjects: pairs, quotes, args, brackets — no treesitter dependency { - "nvim-treesitter/nvim-treesitter", - build = ":TSUpdate", - event = { "BufReadPost", "BufNewFile" }, - dependencies = { - "nvim-treesitter/nvim-treesitter-textobjects", - }, + "echasnovski/mini.ai", + event = "VeryLazy", opts = { - ensure_installed = { - "lua", "rust", "typescript", "javascript", "svelte", - "java", "latex", "markdown", "markdown_inline", - "yaml", "toml", "bash", "html", "css", "jinja", - "json", "vim", "vimdoc", "regex", - }, - auto_install = true, - highlight = { - enable = true, - additional_vim_regex_highlighting = { "latex" }, -- needed for vimtex - }, - indent = { enable = true }, - incremental_selection = { - enable = true, - keymaps = { - init_selection = "", - node_incremental = "", - scope_incremental = false, - node_decremental = "", - }, - }, - textobjects = { - select = { - enable = true, - lookahead = true, - keymaps = { - ["am"] = "@function.outer", - ["im"] = "@function.inner", - ["ac"] = "@class.outer", - ["ic"] = "@class.inner", - ["a,"] = "@parameter.outer", - ["i,"] = "@parameter.inner", - }, - }, - move = { - enable = true, - set_jumps = true, - goto_next_start = { - ["]m"] = "@function.outer", - ["]c"] = "@class.outer", - }, - goto_next_end = { - ["]M"] = "@function.outer", - ["]C"] = "@class.outer", - }, - goto_previous_start = { - ["[m"] = "@function.outer", - ["[c"] = "@class.outer", - }, - goto_previous_end = { - ["[M"] = "@function.outer", - ["[C"] = "@class.outer", - }, - }, - }, + n_lines = 500, + -- Extend the default textobjects with mini.extra + -- a( i( a[ i[ a{ i{ a< i< a" i" a' i' a` i` — built-in + -- af if — function call args (built-in) }, - config = function(_, opts) - require("nvim-treesitter.configs").setup(opts) - end, }, } diff --git a/dot_config/nvim/lua/plugins/ui.lua b/dot_config/nvim/lua/plugins/ui.lua index 872051b..70c8e5b 100644 --- a/dot_config/nvim/lua/plugins/ui.lua +++ b/dot_config/nvim/lua/plugins/ui.lua @@ -168,7 +168,7 @@ return { { "MeanderingProgrammer/render-markdown.nvim", ft = { "markdown" }, - dependencies = { "nvim-treesitter/nvim-treesitter", "nvim-tree/nvim-web-devicons" }, + dependencies = { "nvim-tree/nvim-web-devicons" }, opts = { heading = { enabled = true }, code = { enabled = true, style = "full" }, @@ -194,7 +194,7 @@ return { -- Symbols outline panel { "stevearc/aerial.nvim", - dependencies = { "nvim-treesitter/nvim-treesitter", "nvim-tree/nvim-web-devicons" }, + dependencies = { "nvim-tree/nvim-web-devicons" }, keys = { { "uo", "AerialToggle!", desc = "Symbols outline" }, }, diff --git a/dot_config/nvim/queries/markdown/injections.scm b/dot_config/nvim/queries/markdown/injections.scm deleted file mode 100644 index 61daa31..0000000 --- a/dot_config/nvim/queries/markdown/injections.scm +++ /dev/null @@ -1,29 +0,0 @@ -; Override nvim-treesitter's markdown injections to avoid #set-lang-from-info-string! -; which crashes on Neovim 0.12 due to changed match table API (captures are now lists). -; Uses Neovim's native @injection.language capture instead. - -(fenced_code_block - (info_string - (language) @injection.language) - (code_fence_content) @injection.content) - -((html_block) @injection.content - (#set! injection.language "html") - (#set! injection.combined) - (#set! injection.include-children)) - -((minus_metadata) @injection.content - (#set! injection.language "yaml") - (#offset! @injection.content 1 0 -1 0) - (#set! injection.include-children)) - -((plus_metadata) @injection.content - (#set! injection.language "toml") - (#offset! @injection.content 1 0 -1 0) - (#set! injection.include-children)) - -([ - (inline) - (pipe_table_cell) -] @injection.content - (#set! injection.language "markdown_inline"))