mirror of
https://github.com/NotAShelf/direnv.nvim.git
synced 2026-02-23 20:12:09 +00:00
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I9469167a04228dc43f4b67d8bddc090a6a6a6964
9 lines
353 B
Lua
9 lines
353 B
Lua
-- 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,
|
|
})
|