Skip to content

Commit

Permalink
feat(autocmds): Add filetype for .hurl files
Browse files Browse the repository at this point in the history
  • Loading branch information
jellydn committed Mar 1, 2024
1 parent d182f54 commit 141edf7
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions lua/config/autocmds.lua
Expand Up @@ -14,3 +14,19 @@ vim.api.nvim_create_autocmd({ "BufRead", "BufNewFile" }, {
vim.opt_local.filetype = "sh"
end,
})

local is_stable_version = true
if vim.fn.has("nvim-0.10.0") == 1 then
is_stable_version = false
end

if is_stable_version then
-- Set filetype for .hurl files
vim.api.nvim_create_autocmd({ "BufRead", "BufNewFile" }, {
group = augroup("env_filetype"),
pattern = { "*.hurl" },
callback = function()
vim.opt_local.filetype = "sh"
end,
})
end

0 comments on commit 141edf7

Please sign in to comment.