mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-17 10:50:06 -04:00
feat(roc)!: bump parser and queries
Adapt to https://github.com/faldor20/tree-sitter-roc/pull/30 Also synchronize queries with upstream and add indents
This commit is contained in:
parent
f06adcf572
commit
afe977dadd
5 changed files with 107 additions and 11 deletions
60
queries/roc/indents.scm
Normal file
60
queries/roc/indents.scm
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
; (value_declaration(expr_body(anon_fun_expr)))@indent.ignore
|
||||
[
|
||||
(when_is_expr)
|
||||
(when_is_branch)
|
||||
(record_expr)
|
||||
(anon_fun_expr)
|
||||
(list_expr)
|
||||
(parenthesized_expr)
|
||||
(function_call_pnc_expr)
|
||||
(tuple_expr)
|
||||
(imports)
|
||||
(exposes)
|
||||
(exposes_list)
|
||||
(exposing)
|
||||
;patterns
|
||||
(record_pattern)
|
||||
(tuple_pattern)
|
||||
(list_pattern)
|
||||
;ability stuff
|
||||
(ability_implementation)
|
||||
(opaque_type_def)
|
||||
;types
|
||||
(record_type)
|
||||
(tags_type)
|
||||
(record_expr)
|
||||
(implements_implementation)
|
||||
"{"
|
||||
"("
|
||||
"["
|
||||
] @indent.begin
|
||||
|
||||
; ((record_type)
|
||||
; @indent.align
|
||||
; (#set! indent.open_delimiter "{")
|
||||
; (#set! indent.close_delimiter "}"))
|
||||
; ((record_expr)
|
||||
; @indent.align
|
||||
; (#set! indent.open_delimiter "{")
|
||||
; (#set! indent.close_delimiter "}"))
|
||||
; ((tags_type) @indent.align
|
||||
; (#set! indent.open_delimiter "[")
|
||||
; (#set! indent.close_delimiter "]"))
|
||||
; ((implements_implementation) @indent.align
|
||||
; (#set! indent.open_delimiter "[")
|
||||
; (#set! indent.close_delimiter "]"))
|
||||
(expr_body) @indent.begin
|
||||
|
||||
(ERROR
|
||||
"=") @indent.begin
|
||||
|
||||
(then) @indent.begin
|
||||
|
||||
(else) @indent.begin
|
||||
|
||||
[
|
||||
; result:(_)
|
||||
"]"
|
||||
"}"
|
||||
")"
|
||||
] @indent.branch
|
||||
Loading…
Add table
Add a link
Reference in a new issue