From 84851a018c9c53a6637437402b8f7cd9f70c81d4 Mon Sep 17 00:00:00 2001 From: ttyS3 Date: Fri, 14 Oct 2022 18:05:28 +0800 Subject: [PATCH] fix: fix *.nomad filetype --- lua/general.lua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lua/general.lua b/lua/general.lua index 2772933..613d5e4 100644 --- a/lua/general.lua +++ b/lua/general.lua @@ -517,6 +517,15 @@ vim.api.nvim_create_autocmd("FileType", { end, }) +vim.api.nvim_create_autocmd("BufRead,BufNewFile", { + group = vim.api.nvim_create_augroup("FixNomadFileType", { clear = false }), + pattern = { "*.nomad" }, + callback = function() + vim.bo.filetype = "nomad" + -- vim.api.nvim_command "set filetype=nomad" + end, +}) + vim.api.nvim_create_autocmd("FileType", { group = vim.api.nvim_create_augroup("CommentString", { clear = false }), pattern = { "toml,nomad" },