Skip to content

doc/neovim: update treesitter section#489421

Merged
teto merged 2 commits intoNixOS:masterfrom
mrcjkb:mj/push-onolpokoolns
Feb 12, 2026
Merged

doc/neovim: update treesitter section#489421
teto merged 2 commits intoNixOS:masterfrom
mrcjkb:mj/push-onolpokoolns

Conversation

@mrcjkb
Copy link
Member

@mrcjkb mrcjkb commented Feb 11, 2026

The tree-sitter documentation in neovim.section.md is a bit dated (after the switch to from master to main, see #470883).

This PR aims to improve the documentation by:

  • Clarifying the two setup approaches (with nvim-treesitter vs. standalone grammars)
  • Providing guidance on enabling tree-sitter features like syntax highlighting and folding
  • Adding maintainer documentation for handling plugins with tree-sitter grammar dependencies

Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

@mrcjkb mrcjkb requested a review from a team February 11, 2026 13:59
@mrcjkb mrcjkb force-pushed the mj/push-onolpokoolns branch 2 times, most recently from 4357989 to afdafee Compare February 11, 2026 14:08
Copy link
Contributor

@khaneliman khaneliman left a comment

Choose a reason for hiding this comment

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

Some good snippets of info for anyone trying to figure out how to get started, thanks!

@mrcjkb mrcjkb force-pushed the mj/push-onolpokoolns branch 2 times, most recently from 6654a8d to b79a7a1 Compare February 11, 2026 14:16
@nixpkgs-ci nixpkgs-ci bot requested a review from GetPsyched February 11, 2026 14:25
@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 12.approvals: 1 This PR was reviewed and approved by one person. 8.has: documentation This PR adds or changes documentation labels Feb 11, 2026
@mrcjkb mrcjkb force-pushed the mj/push-onolpokoolns branch from b79a7a1 to 558a5f9 Compare February 11, 2026 14:27
@mrcjkb mrcjkb force-pushed the mj/push-onolpokoolns branch from 558a5f9 to 27bd070 Compare February 11, 2026 16:39
@mrcjkb mrcjkb requested a review from PerchunPak February 11, 2026 16:39
@mrcjkb mrcjkb force-pushed the mj/push-onolpokoolns branch 2 times, most recently from 3bab855 to 178a99b Compare February 11, 2026 16:42
@mrcjkb
Copy link
Member Author

mrcjkb commented Feb 11, 2026

Update: Replaced all occurrences of "tree-sitter" with "treesitter" for consistency (upstream spells it "tree-sitter", but the Neovim community spells it "treesitter").

Comment on lines +127 to +132
[Treesitter](https://tree-sitter.github.io/) provides syntax parsing for Neovim, enabling features like:

- Advanced syntax highlighting
- Code folding
- Indentation
- ...and more
Copy link
Member

Choose a reason for hiding this comment

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

It doesn't look good in the result file, I'd avoid lists here

Image
Suggested change
[Treesitter](https://tree-sitter.github.io/) provides syntax parsing for Neovim, enabling features like:
- Advanced syntax highlighting
- Code folding
- Indentation
- ...and more
[Treesitter](https://tree-sitter.github.io/) provides syntax parsing for Neovim, enabling features like: Advanced syntax highlighting, Code folding, Indentation and more

Copy link
Contributor

Choose a reason for hiding this comment

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

Should be able to just indent the lists too

Copy link
Member Author

Choose a reason for hiding this comment

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

I've inlined the tree-sitter features list, but I don't think the other lists need to be indented as it would be inconsistent with existing lists on this page.

Various things look a bit off in the result file (for example, the ::: {.important} block has a white background with white text). I wouldn't see those as a blocker for this PR - that's a different issue (if it affects the nixpkgs manual that gets published).

Copy link
Member

@teto teto left a comment

Choose a reason for hiding this comment

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

this is awesome

@teto teto added the 6.topic: vim Advanced text editor label Feb 11, 2026
@nixpkgs-ci nixpkgs-ci bot added 12.approvals: 2 This PR was reviewed and approved by two persons. and removed 12.approvals: 1 This PR was reviewed and approved by one person. labels Feb 11, 2026
@mrcjkb mrcjkb force-pushed the mj/push-onolpokoolns branch 2 times, most recently from ffba4e4 to d55bd15 Compare February 11, 2026 21:45
@mrcjkb mrcjkb force-pushed the mj/push-onolpokoolns branch from d55bd15 to a959a3f Compare February 11, 2026 21:48
@nixpkgs-ci nixpkgs-ci bot removed the 6.topic: vim Advanced text editor label Feb 11, 2026
@teto
Copy link
Member

teto commented Feb 11, 2026

I have a last request before merging. I built this locally and noticed the treesitter bits dont appear in the neovim TOC (table of content). It's true on master https://nixos.org/manual/nixpkgs/unstable/#neovim .
It makes the subcategories more hidden than they should so I suggest that you use h2 title level (or whatever it's called), ie
#### Treesitter {#neovim-plugin-treesitter} should become ## Treesitter, likewise for the other sections.

@mrcjkb mrcjkb force-pushed the mj/push-onolpokoolns branch from ac77395 to 670a0f1 Compare February 11, 2026 22:33
@mrcjkb
Copy link
Member Author

mrcjkb commented Feb 11, 2026

I have a last request before merging. I built this locally and noticed the treesitter bits dont appear in the neovim TOC (table of content). It's true on master https://nixos.org/manual/nixpkgs/unstable/#neovim . It makes the subcategories more hidden than they should so I suggest that you use h2 title level (or whatever it's called), ie #### Treesitter {#neovim-plugin-treesitter} should become ## Treesitter, likewise for the other sections.

Sure. I've added a second commit.

@mrcjkb mrcjkb force-pushed the mj/push-onolpokoolns branch from 670a0f1 to 5ad3a95 Compare February 11, 2026 23:06
@teto teto added this pull request to the merge queue Feb 12, 2026
Merged via the queue into NixOS:master with commit ecc2b67 Feb 12, 2026
25 checks passed
@mrcjkb mrcjkb deleted the mj/push-onolpokoolns branch February 12, 2026 06:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

8.has: documentation This PR adds or changes documentation 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 12.approvals: 2 This PR was reviewed and approved by two persons.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants