mirror of
https://github.com/NotAShelf/direnv.nvim.git
synced 2026-02-24 04:15:22 +00:00
initial syntax highlighting work
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I9469167a04228dc43f4b67d8bddc090a6a6a6964
This commit is contained in:
parent
39d6c5c225
commit
10c63bf633
3 changed files with 145 additions and 0 deletions
9
ftdetect/direnv.lua
Normal file
9
ftdetect/direnv.lua
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
-- Detect .envrc, .direnvrc, direnvrc files and set filetype to 'direnv'
|
||||
local group = vim.api.nvim_create_augroup("direnv_ftdetect", { clear = true })
|
||||
vim.api.nvim_create_autocmd({ "BufRead", "BufNewFile" }, {
|
||||
group = group,
|
||||
pattern = { ".envrc*", ".direnvrc*", "direnvrc*" },
|
||||
callback = function()
|
||||
vim.bo.filetype = "direnv"
|
||||
end,
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue