Add outline support for Ruby singleton methods (#2592)

This pull request add support for Ruby singleton methods in the document
outline.

**Before**

<img width="1490" alt="outline-before"
src="https://github.com/zed-industries/zed/assets/503025/e90afd4c-bcdd-477b-92cf-fe34cec54980">

**After**

<img width="1493" alt="outline-after"
src="https://github.com/zed-industries/zed/assets/503025/067cc80b-7718-4395-9079-4677a689b9be">

Release Notes:

- Added support for singleton methods in Ruby outline view. Fixed
[#1442](https://github.com/zed-industries/community/issues/1442).
This commit is contained in:
Max Brunsfeld 2023-06-09 08:35:34 -07:00 committed by GitHub
commit fb83ab8e9f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -6,6 +6,12 @@
"def" @context
name: (_) @name) @item
(singleton_method
"def" @context
object: (_) @context
"." @context
name: (_) @name) @item
(module
"module" @context
name: (_) @name) @item