Files
my-nvim/lua/crentist/filetype.lua
T

33 lines
1.0 KiB
Lua

vim.filetype.add({
extension = {
['tf'] = 'terraform',
j2 = 'jinja',
jinja = 'jinja',
jinja2 = 'jinja',
},
pattern = {
-- gitlab-ci
['%.gitlab%-ci%.ya?ml'] = 'yaml.gitlab',
['pipelines/.*%.ya?ml'] = 'yaml.gitlab',
-- values files
['.*/helm/.*values.*%.ya?ml'] = 'yaml.helm-values',
['values%.ya?ml'] = 'yaml.helm-values',
-- ansible
['.*/molecule/.*%.ya?ml'] = 'yaml.ansible',
['.*/roles/.*%.ya?ml'] = 'yaml.ansible',
['.*/tasks/.*%.ya?ml'] = 'yaml.ansible',
['.*/plays/.*%.ya?ml'] = 'yaml.ansible',
['.*/plays/.*/files/.*%.ya?ml'] = { 'yaml', { priority = 10 } }, -- these are not ansible files
-- protobuf
['buf.yaml'] = 'buf-config',
['buf.gen.yaml'] = 'buf-config',
['buf.policy.yaml'] = 'buf-config',
['buf.lock'] = 'buf-config',
-- templates
['.*/templates/.*%.ya?ml'] = 'helm',
['.*/templates/.*%.tpl'] = 'helm',
['helmfile%.ya?ml'] = 'helm',
},
})