You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a class is not generic, or it is generic but the generic type is not defined, the creation of an object of that class is not recognized.
I use flash.nvim to select code blocks (nodes from tree-sitter?).
On line 47, you can see that it has recognized MaterialPageRoute with its constructor arguments (pink label b). However, it doesn't recognize ListenableBuilder (line 30) or MaterialApp (line 33) because they are not generic types (no pink label).
It also doesn't recognize MaterialPageRoute when I remove its generic type:
I hope I was able to describe the problem :-)
The text was updated successfully, but these errors were encountered:
I believe this is partially due to the fact that function calls and constructors calls occupy the same space in the grammar. There is no way to tell syntactically whether it is a function call or a constructor call. There are conventions of course (such as classes are typically capitalized), but there is no way to tell it from a grammar's point of view.
Tree sitter is a grammar, not a language server, and so it must handle things from a syntactic grammar's standpoint. Unfortunately that means that in order to handle all valid dart programs, we cannot assume capitalization means anything.
I guess I'm a bit confused about the question though, and the issues though. If it has to do with tree sitter queries though, Neovim has their own highlighting and query rules they maintain for Dart separate from this repository.
I don't know how it all works. I just realized that it doesn't work as expected or as I would wish :-)
The nvim-treesitter links to this project. So I assumed it was the right place for my problem.
If a class is not generic, or it is generic but the generic type is not defined, the creation of an object of that class is not recognized.
I use flash.nvim to select code blocks (nodes from tree-sitter?).
On line 47, you can see that it has recognized
MaterialPageRoute
with its constructor arguments (pink labelb
). However, it doesn't recognizeListenableBuilder
(line 30) orMaterialApp
(line 33) because they are not generic types (no pink label).It also doesn't recognize
MaterialPageRoute
when I remove its generic type:I hope I was able to describe the problem :-)
The text was updated successfully, but these errors were encountered: