* Process scope captures
This lets us avoid complex querying when extracting scope.
As long as the capture includes a scoping node in a `@scope` capture,
its text will be extracted and used as a scope value.
If "public" is named differently in some language,
`#set @scope "text" "public"` will do the trick for a cost of an
additional query.
* Add basic query documentation to readme and vimdoc
* Add reusable language extensions info to readme
This has direct impact on highlighting. If scope is set and set to
anything but "public", highlighter will use a separate highlight for
the corresponding entry. This was previously used by Elixir extension
by manually processing nodes.
Ruby queries are updated to deal with both predicate and statement
versions of scope setting.
Ruby allows us to do a lot of weird stuff, and having weirdness glaring
at us from the side panel can be handy for when we sober up and start
cleaning.
This commit handles a number of singleton class manipulation cases,
as well as adds a reciever information to singleton method declarations.
Ruby supports some operators overloading by declaring a method with the
operator as the method name, e.g. `def <=>(other)`. Tree sitter ruby
parser recognises these method names as operators, not identifiers, and
as such existing queries skip over them.
This commit adds a query that captures "operator" instance methods.
Using the treesitter backend, we can use the same "selectionRange" logic
that LSP symbol sources use to provide more detailed information about
where the name of the symbol is. We already use the LSP information to
change how we navigate the cursor to symbols, so once we parse this
information from treesitter it will automatically get used.
I'm putting this behind an experimental config option for now so we can
test it out for a while before making a sudden change to the behavior.
As documented here: https://github.com/thoughtbot/shoulda-context
This includes one-liner shoulda assertions of the form
should validate_presence_of(:first_name)
The argument to `should` is used as the name, so these appear in the
Aerial browser exactly as written.