Skip to content

fix tree-sitter parser packages #921

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 16 commits into from
Closed

Conversation

BarryLabs
Copy link

I guess "nvim-treesitter.builtGrammars" got removed and replaced with "nvim-treesitter-parsers" however it didnt have the norg parser I wanted so I replaced the default options with "pkgs.tree-sitter-grammars" to keep it uniform for now.

Copy link

github-actions bot commented May 27, 2025

🚀 Live preview deployed from 32e1e16

View it here:

Debug Information

Triggered by: BarryLabs

HEAD at: main

Reruns: 970

Copy link
Owner

@NotAShelf NotAShelf left a comment

Choose a reason for hiding this comment

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

Looks good, thank you for the PR.

THere is one missing function that needs to be handled as well, mkGrammarOption found in the extended library will construct package options explicitly for builtGrammars, which means all language modules will continue trying to pull builtGrammars.

@NotAShelf
Copy link
Owner

Please also make sure to add a changelog entry in docs/release-notes/rl-0.8.md

@BarryLabs
Copy link
Author

BarryLabs commented May 27, 2025

Please also make sure to add a changelog entry in docs/release-notes/rl-0.8.md

word

@BarryLabs
Copy link
Author

i think its good now, appreciate the project :)

@NotAShelf
Copy link
Owner

Seems the documentation preview was not updated, could you give me a little bit? I need to double-check something, but I'm off my computer right now. I'll be back in an hour or two, and I can give you a final review.

NotAShelf
NotAShelf previously approved these changes May 27, 2025
Copy link
Owner

@NotAShelf NotAShelf left a comment

Choose a reason for hiding this comment

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

Sorry for the delay, I got a little distracted with something else...

@NotAShelf
Copy link
Owner

Oops, the CI seems to be failing. If it fails for Nix grammar, I imagine there is an inconsistency in most other language modules as well.

@NotAShelf NotAShelf dismissed their stale review May 27, 2025 19:54

CI broky

@BarryLabs
Copy link
Author

!

Ok ill be back

@@ -30,7 +30,7 @@

mkGrammarOption = pkgs: grammar:
mkPackageOption pkgs ["${grammar} treesitter"] {
default = ["vimPlugins" "nvim-treesitter" "builtGrammars" grammar];
default = ["tree-sitter-grammars" grammar];
Copy link
Collaborator

Choose a reason for hiding this comment

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

as far as I remember pkgs.tree-sitter-grammars does not work as a nvim plugin, are you sure this works?

Copy link
Author

@BarryLabs BarryLabs Jun 3, 2025

Choose a reason for hiding this comment

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

I see, I havent had a moment to take a look since.

@BarryLabs
Copy link
Author

It builds now except for this norg grammar...

We're still referencing pkgs.vimPlugins.nvim-treesitter.norg or whatever it was exactly.

github-actions bot pushed a commit that referenced this pull request Jun 13, 2025
@horriblename
Copy link
Collaborator

not sure what happened to your git history, but it's including a lot of unrelated changes in 3656f9f

in any case, I'm getting this on trying to run .#minimal:

error: A definition for option `vim.startPlugins."[definition 36-entry 1]"' is not of type `null or package or one of "blink-cmp", "aerial-nvim", "alpha-nvim", ...(shortened)..., "vim-repeat"'. Definition values:
- In `/nix/store/m89sr4423yaxby8jqz6363lbai7qgcbb-source/modules/plugins/treesitter/config.nix': "nvim-treesitter"

@BarryLabs
Copy link
Author

BarryLabs commented Jun 17, 2025

I went crazy with the builder functions and reversed most of them such that it builds my current config but CSS "prettier" and the norgpackage functions are still issues.

I was testing it live and I settled here as I didnt want to alter a large portion of the codebase without at least some conversation about it.

I am quite stumped how when I hardcode the norg grammar as a default in the "change default?" change, it still expects the previous package...?

@BarryLabs BarryLabs closed this by deleting the head repository Jun 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants