Commit graph

15 commits

Author SHA1 Message Date
Steven Arcangeli
e75a3df2c2 fix(ruby): missing methods in treesitter backend (#382) 2024-07-23 17:29:06 -07:00
Steven Arcangeli
75de06f8ed lint: autoformat all tree-sitter query files 2024-06-01 20:50:39 -07:00
Slotos
2d169d3497
feat: set scope from node captures and add basic query documentation (#318)
* 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
2023-11-10 07:39:37 -08:00
Steven Arcangeli
23a739c0ac refactor: rename @type capture to @symbol 2023-10-31 16:51:08 -07:00
Slotos
3a3baf0930
feat(treesitter): ruby queries can set the scope of methods (#317)
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.
2023-10-19 21:35:32 -07:00
Slotos
a2368d1c4b
fix(ts): improve ruby handling of singletons and methods (#293)
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.
2023-09-18 10:40:21 -07:00
Slotos
fa8c408b76
feat(ts): add ruby support for ruby operator methods (#292)
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.
2023-09-18 08:22:59 -07:00
Steven Arcangeli
e54cae0df0 feat: experimental support for navigating to symbol names (#279)
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.
2023-08-09 21:47:48 -07:00
monaqa
87cede7ed1
rm language_kind_map; write "kind" in query file 2022-11-29 21:59:39 +09:00
Kent Sibilev
d120677e1a added support for Ruby setter methods 2022-09-04 13:12:39 -04:00
Paul Battley
b65e86ea42 Add support for Shoulda Context blocks
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.
2022-08-05 09:36:11 +01:00
Steven Arcangeli
c7d5f42c12 fix(ts)(ruby): support long module/class names 2022-04-04 09:22:28 -07:00
Steven Arcangeli
7508c67bc2 feat(ts)(ruby): Add support for Rakefile syntax (#63) 2022-03-02 13:11:59 -08:00
Steven Arcangeli
3e62af55fb feat(ts)(ruby): show RSpec calls as symbols 2022-01-02 15:50:34 -08:00
Steven Arcangeli
e322be61b0 feat: treesitter support for ruby 2021-11-22 14:52:01 -08:00