Skip to content

Why did my Neovim F# tree-sitter config break? #82

Answered by Nsidorenco
mattgallagher92 asked this question in Q&A
Discussion options

You must be logged in to vote

The breaking changes are entirely on me 😄

The node types are defined by the grammar and must match the node types used in the queries.
If a query references a node that the grammar does not expose, then you get an error like the one your posted.

As to how this happened: When ever you update nvim-treesitter it run :TSUpdate which updates all parsers to their latest version. If there has been a breaking change to the grammar since you last updated, then your queries will break.

To avoid getting surprised by this you can pin the revision of the parser like so:

local parser_config = require('nvim-treesitter.parsers').get_parser_configs()
parser_config.fsharp = {
  install_info = {
    url = 'h…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@mattgallagher92
Comment options

Answer selected by mattgallagher92
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants