vim-patch:9.2.0217: filetype: cto files are not recognized (#38400)

Problem:  filetype: cto files are not recognized
Solution: Detect *.cto as concerto filetype (Jamie Shorten)

Add filetype detection for the Concerto Modelling Language. Concerto
is a schema language by the Accord Project for defining data models
used in smart legal contracts and business networks.

Reference:
Language spec: https://concerto.accordproject.org
Tree-sitter grammar: https://github.com/accordproject/concerto-tree-sitter

closes: vim/vim#19760

68f9dedba4

Co-authored-by: Jamie Shorten <jamie@jamieshorten.com>
This commit is contained in:
zeertzjq
2026-03-21 08:50:15 +08:00
committed by GitHub
parent 6d84209eae
commit 0655a359ae
2 changed files with 2 additions and 0 deletions

View File

@@ -330,6 +330,7 @@ local extension = {
cbl = 'cobol',
atg = 'coco',
recipe = 'conaryrecipe',
cto = 'concerto',
ctags = 'conf',
hook = function(_path, bufnr)
return M._getline(bufnr, 1) == '[Trigger]' and 'confini' or nil

View File

@@ -194,6 +194,7 @@ func s:GetFilenameChecks() abort
\ 'coco': ['file.atg'],
\ 'codeowners': ['CODEOWNERS'],
\ 'conaryrecipe': ['file.recipe'],
\ 'concerto': ['file.cto'],
\ 'conf': ['auto.master', 'file.conf', 'texdoc.cnf', '.x11vncrc', '.chktexrc', '.ripgreprc', 'ripgreprc', 'file.ctags'],
\ 'config': ['/etc/hostname.file', 'any/etc/hostname.file', 'configure.in', 'configure.ac', 'file.at', 'aclocal.m4'],
\ 'confini': ['pacman.conf', 'paru.conf', 'mpv.conf', 'any/.aws/config', 'any/.aws/credentials', 'any/.aws/cli/alias', 'file.nmconnection',