Skip to content

Commit bdb6420

Browse files
committed
feat(event): add custom filetype yaml.gitlab
1 parent 0b962a6 commit bdb6420

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lua/core/event.lua

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,14 @@ vim.api.nvim_create_autocmd("BufEnter", {
4949
end,
5050
})
5151

52+
-- create custom filetype for gitlab_ci_ls
53+
vim.api.nvim_create_autocmd({ "BufRead", "BufNewFile" }, {
54+
pattern = "*.gitlab-ci*.{yml,yaml}",
55+
callback = function()
56+
vim.bo.filetype = "yaml.gitlab"
57+
end,
58+
})
59+
5260
-- auto close some filetype with <q>
5361
vim.api.nvim_create_autocmd("FileType", {
5462
pattern = {

0 commit comments

Comments
 (0)