nvim: migrate treesitter setup - #64
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cad2ecec41
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if vim.tbl_contains(ts.get_installed(), lang) then | ||
| pcall(vim.treesitter.start, args.buf, lang) | ||
| end |
There was a problem hiding this comment.
Preserve tree-sitter indentation setup during migration
This migration drops tree-sitter indentation that was previously enabled via indent = { enable = true }. In the new main-branch API, vim.treesitter.start(...) only starts parsing/highlighting; indentation must be enabled separately (e.g., by setting vim.bo.indentexpr to require('nvim-treesitter').indentexpr()). With only the current callback, users lose tree-sitter-based indentation behavior for filetypes that previously had it.
Useful? React with 👍 / 👎.
What changed
nvim-treesitterandnvim-treesitter-textobjectsto themainbranch APInvim-treesitter.configssetup with the newrequire("nvim-treesitter")setup and parser installation flowtree-sitter-clirequirement inREADME.mdand add it to the Docker image buildWhy
The Treesitter config was still using the previous setup style. Moving to the current
mainbranch requires the new API and an explicittree-sitter-clidependency so fresh environments can install parsers successfully.Impact
Neovim will use the new Treesitter setup path, and documented/bootstrap environments will include the CLI needed for parser installation.
Validation
XDG_CONFIG_HOME=/Users/mandai/.dotfiles XDG_STATE_HOME=/tmp XDG_CACHE_HOME=/tmp XDG_DATA_HOME=$HOME/.local/share nvim --headless '+q'git commitand passed, includingstylua