From 73ad16b98543817f995399852fd3b88d316b8df0 Mon Sep 17 00:00:00 2001 From: Ruslan Date: Sat, 27 Jun 2026 12:29:38 +0300 Subject: [PATCH] refactor(filetype): reorganize mappings --- lua/crentist/filetype.lua | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/lua/crentist/filetype.lua b/lua/crentist/filetype.lua index dc470db..6d0538c 100644 --- a/lua/crentist/filetype.lua +++ b/lua/crentist/filetype.lua @@ -6,19 +6,27 @@ vim.filetype.add({ 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', - -- values files - ['.*/helm/.*values.*%.ya?ml'] = 'yaml.helm-values', - ['values%.ya?ml'] = 'yaml.helm-values', - -- gitlab-ci - ['%.gitlab%-ci%.ya?ml'] = 'yaml.gitlab', - ['pipelines/.*%.ya?ml'] = 'yaml.gitlab', - }, + }, })