Fixing Neovim Treesitter breaking changes
The sun is out, the sky is blue... and I had the opportunity to understand some Neovim plugins a little more, in order to fix a breaking change with Neovim Treesitter support for Clojure.
Pull Requests this week
- MERGED: #7 queries: clojure has-type? updated to kind-eq? for nvim-treesitter-sexp project
Neovimλ︎
A breaking change in nvim-treesitter
affects the nvim-treesitter-sexp
plugin which provides paredit style structural editing for Clojure.
nvim-treesitter
committed a change that requires queries to use kind-eq?
rather than the previous has-type?
.
The breaking change only affected the queries for the Clojure language, all other languages supported by nvim-treesitter-sexp
were unaffected.
A quick solution would be to pin nvim-treesitter
plugin to an earlier version, such as v0.9.2
released on 19 January 2024
A plugin can be pinned to its current version by adding pin = true
to the plugin configuration. No further updates will e made to the package and avoids a known issue in an new release of that plugin.
The long term solution is to update nvim-treesitter-sexp
to use the new kind-eq
in its clojure query.
Only one occurance of has-type
was found in the nvim-treesitter-sexp source code.
After forking the nvim-treesitter-sexp
repository, the has-type
line was changed to use kind-eq
and the commit pushed to the fork.
The local clone of Practicall Asto Config was updated to use the fork and branch used for the change
Using Practicalli fork of nvim-treesitter-sexp
Disabling the AstroNvim Clojure pack in the lua/plugins/clojure.lua
by commenting the import line and running a Lazy plugin manager update, Space p U or :Lazy update
, removed the nvim-treesitter-sexp
plugin and replaced it with the Practicalli fork.
With a few slurp and barf commands to test the simple change in the fork, it seems that change has fixed the error.
Once the maintainer has merged the PR (or come up with a more appropriate fix), then I can revert back to the AstroNvim Community Clojure pack and simplify my config a little.
GitHubλ︎
The GitHub keys page for an account lists all the authorisation and signing keys registered.
Each key shows its unique SHA, rather than the key value, for security reasons.
To identify if an SSH key is registered with GitHub, use the ssh-keygen
command to show the SHA for public key file, *.pub
.
Copy the SHA value generated by the ssh-keygen
command and search for that value on the GitHub keys page.
Thank you.