mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-21 12:50:09 -04:00
Add remaining Clojure indent node types
This commit is contained in:
parent
5fe901f76b
commit
6d611df386
1 changed files with 13 additions and 3 deletions
|
|
@ -4,12 +4,13 @@
|
|||
((list_lit open: _ @indent.open close: _ @indent.close) @indent.align)
|
||||
((vec_lit open: _ @indent.open close: _ @indent.close) @indent.align)
|
||||
((map_lit open: _ @indent.open close: _ @indent.close) @indent.align)
|
||||
((ns_map_lit open: _ @indent.open close: _ @indent.close) @indent.align)
|
||||
((set_lit open: _ @indent.open close: _ @indent.close) @indent.align)
|
||||
((anon_fn_lit open: _ @indent.open close: _ @indent.close) @indent.align)
|
||||
((read_cond_lit open: _ @indent.open close: _ @indent.close) @indent.align)
|
||||
((splicing_read_cond_lit open: _ @indent.open close: _ @indent.close) @indent.align)
|
||||
|
||||
([(map_lit) (set_lit) (vec_lit) (list_lit) (anon_fn_lit) (read_cond_lit) (splicing_read_cond_lit)]
|
||||
([(list_lit) (vec_lit) (map_lit) (ns_map_lit) (set_lit) (anon_fn_lit) (read_cond_lit) (splicing_read_cond_lit)]
|
||||
@indent.align
|
||||
; Align lines even when parent open_delimiter is hanging
|
||||
(#set! indent.align_hanging 1)
|
||||
|
|
@ -22,5 +23,14 @@
|
|||
@indent.align
|
||||
(#set! indent.increment 2))
|
||||
|
||||
; Indent form on line following #_
|
||||
((dis_expr) @indent.begin @indent.end)
|
||||
; Indent 1 space for forms: ', `, ~, #, @
|
||||
([(quoting_lit) (syn_quoting_lit) (unquoting_lit) (tagged_or_ctor_lit) (derefing_lit) ]
|
||||
@indent.begin @indent.end
|
||||
(#set! indent.increment 1)
|
||||
(#set! indent.propagate 1))
|
||||
|
||||
; Indent 2 space for forms: ~@, #', #_, #=, #^, ##
|
||||
([(unquote_splicing_lit) (var_quoting_lit) (dis_expr) (evaling_lit) (old_meta_lit) (sym_val_lit)]
|
||||
@indent.begin @indent.end
|
||||
(#set! indent.increment 2)
|
||||
(#set! indent.propagate 1))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue