Skip to content

nvim: migrate treesitter setup - #64

Merged
mandaiy merged 2 commits into
mainfrom
codex-nvim-treesitter-main
Apr 18, 2026
Merged

nvim: migrate treesitter setup#64
mandaiy merged 2 commits into
mainfrom
codex-nvim-treesitter-main

Conversation

@mandaiy

@mandaiy mandaiy commented Apr 18, 2026

Copy link
Copy Markdown
Owner

What changed

  • switch nvim-treesitter and nvim-treesitter-textobjects to the main branch API
  • replace the old nvim-treesitter.configs setup with the new require("nvim-treesitter") setup and parser installation flow
  • document the tree-sitter-cli requirement in README.md and add it to the Docker image build

Why

The Treesitter config was still using the previous setup style. Moving to the current main branch requires the new API and an explicit tree-sitter-cli dependency 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

  • started Neovim headlessly with XDG_CONFIG_HOME=/Users/mandai/.dotfiles XDG_STATE_HOME=/tmp XDG_CACHE_HOME=/tmp XDG_DATA_HOME=$HOME/.local/share nvim --headless '+q'
  • local pre-commit hooks ran during git commit and passed, including stylua

@mandaiy
mandaiy marked this pull request as ready for review April 18, 2026 04:57

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread nvim/lua/plugins.lua
Comment on lines +600 to +602
if vim.tbl_contains(ts.get_installed(), lang) then
pcall(vim.treesitter.start, args.buf, lang)
end

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@mandaiy
mandaiy merged commit e778c47 into main Apr 18, 2026
1 check passed
@mandaiy
mandaiy deleted the codex-nvim-treesitter-main branch April 18, 2026 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant