mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-11 16:00:02 -04:00
Add tree-sitter parser and queries for the Concerto Modelling Language (.cto files) by the Accord Project. Concerto is a schema language for defining data models used in smart legal contracts and business networks. Queries: - highlights.scm — full syntax highlighting - folds.scm — code folding for declaration bodies and block comments - locals.scm — scope, definition, and reference tracking - indents.scm — auto-indentation for declaration bodies Grammar source: https://github.com/accordproject/concerto-tree-sitter Language spec: https://concerto.accordproject.org Note: Neovim does not yet detect .cto files natively. Users need to add: vim.filetype.add({ extension = { cto = 'concerto' } })
15 lines
251 B
Scheme
15 lines
251 B
Scheme
; Concerto Language - Indent Queries
|
|
; ===================================
|
|
; Indent inside declaration bodies
|
|
[
|
|
(class_body)
|
|
(enum_body)
|
|
(map_body)
|
|
(decorator_arguments)
|
|
] @indent.begin
|
|
|
|
; Outdent at closing braces
|
|
[
|
|
"}"
|
|
")"
|
|
] @indent.end
|