mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-23 05:40:11 -04:00
feat(parsers): Add objectscript
This commit is contained in:
parent
65a266bf69
commit
b8085c5aec
7 changed files with 444 additions and 0 deletions
35
runtime/queries/objectscript/indents.scm
Normal file
35
runtime/queries/objectscript/indents.scm
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
; Indentation rules for ObjectScript UDL (nvim-treesitter)
|
||||
; --- Class Definition ---
|
||||
(class_body
|
||||
"{" @indent.begin
|
||||
"}" @indent.end)
|
||||
|
||||
; --- Block-style commands with braces ---
|
||||
(command_while
|
||||
"{" @indent.begin
|
||||
"}" @indent.end)
|
||||
|
||||
(command_for
|
||||
"{" @indent.begin
|
||||
"}" @indent.end)
|
||||
|
||||
(command_if
|
||||
"{" @indent.begin
|
||||
"}" @indent.end)
|
||||
|
||||
(elseif_block
|
||||
"{" @indent.begin
|
||||
"}" @indent.end)
|
||||
|
||||
(else_block
|
||||
"{" @indent.begin
|
||||
"}" @indent.end)
|
||||
|
||||
; --- Generic brace and parenthesis handling ---
|
||||
"{" @indent.begin
|
||||
|
||||
"}" @indent.end
|
||||
|
||||
("(" @indent.align
|
||||
(#set! indent.open_delimiter "(")
|
||||
(#set! indent.close_delimiter ")"))
|
||||
Loading…
Add table
Add a link
Reference in a new issue