From af404f232939a636e34a846fbab66df5fc134bf7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Jane=C5=BEi=C4=8D?= Date: Sat, 23 Nov 2024 01:41:27 +0100 Subject: [PATCH] feat: add filetype autocmd for gitlab ci and sshconfig --- lua/autocmd.lua | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lua/autocmd.lua b/lua/autocmd.lua index 8af95f2..d27f4e9 100644 --- a/lua/autocmd.lua +++ b/lua/autocmd.lua @@ -13,3 +13,17 @@ vim.api.nvim_create_autocmd('TextYankPost', { group = highlight_group, pattern = '*', }) + +vim.api.nvim_create_autocmd({ 'BufRead', 'BufNewFile' }, { + pattern = '*.gitlab-ci*.{yml,yaml}', + callback = function() + vim.bo.filetype = 'yaml.gitlab' + end, +}) + +vim.api.nvim_create_autocmd({ 'BufRead', 'BufNewFile' }, { + pattern = vim.fn.expand '~' .. '/.ssh/config.d/*.config', + callback = function() + vim.bo.filetype = 'sshconfig' + end, +})