ruby: Add proper indentation for singleton methods (#12535)
Hi. Currently, Zed uses incorrect indentation for singleton methods: ```ruby def self.build | # <= cursor position after hitting Enter end ``` Handling the `singleton_method` token indentation changes this behavior to the following: ```ruby def self.build | # <= cursor position after hitting Enter end ``` ## Before https://github.com/zed-industries/zed/assets/1894248/40fc2b37-692f-469f-9cbe-05cbb1ab4c3c ## After https://github.com/zed-industries/zed/assets/1894248/d9ba8d27-fd17-4c74-b22c-a4de124739a3 Release Notes: - N/A
This commit is contained in:
parent
6eb8e83411
commit
08123a270a
1 changed files with 1 additions and 0 deletions
|
@ -2,6 +2,7 @@
|
||||||
(class "end" @end) @indent
|
(class "end" @end) @indent
|
||||||
(module "end" @end) @indent
|
(module "end" @end) @indent
|
||||||
(begin "end" @end) @indent
|
(begin "end" @end) @indent
|
||||||
|
(singleton_method "end" @end) @indent
|
||||||
(do_block "end" @end) @indent
|
(do_block "end" @end) @indent
|
||||||
|
|
||||||
(then) @indent
|
(then) @indent
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue