Skip to content
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

Refactor treesitter.fnl to remove aniseed nvim module #640

Merged
merged 1 commit into from
Jan 15, 2025

Conversation

saccarosium
Copy link
Contributor

Hi,
this PR refactors treesitter.fnl to use neovim builtin api instead of using aniseed nvim module.

@Olical
Copy link
Owner

Olical commented Jan 15, 2025

Nice, I've also just swapped the implementation for starts-with and ends-with out so they just call the built in vim function now. Tests still pass which is reassuring! I was worried about how they would handle nil etc. If the vim.* ones do NOT handle nil well, they might error in unexpected ways. the conjure.text functions do handle nils which is more Clojure-y and how I like to keep the APIs ideally.

@Olical Olical merged commit 367df2c into Olical:main Jan 15, 2025
3 checks passed
@Olical
Copy link
Owner

Olical commented Jan 15, 2025

Oh, actually now the HUD isn't appearing when I open a file 😬 investigating

@saccarosium
Copy link
Contributor Author

saccarosium commented Jan 15, 2025

I was worried about how they would handle nil etc. If the vim.* ones do NOT handle nil well, they might error in unexpected ways. the conjure.text functions do handle nils which is more Clojure-y and how I like to keep the APIs ideally.

Oh makes sense. By testing the vim.* ones do not handle nils and they throw an exeption. So it might be a better idea to use just use text for that.

Sorry if I didn't check it properly it wasn't an edgecase I was thinking about.

@Olical
Copy link
Owner

Olical commented Jan 15, 2025

Oh no it's okay, I've rolled back commits and I still see the issue. So it seems unrelated... but also new? 🤔

@Olical
Copy link
Owner

Olical commented Jan 15, 2025

Seems like CursorMoved is firing when I open a fresh buffer which triggers log.close-hud-passive early. This never used to be the case so I suspect the behaviour changed between Neovim versions.

@Olical
Copy link
Owner

Olical commented Jan 15, 2025

#641 tracking here

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.

2 participants