mirror of
https://github.com/NotAShelf/direnv.nvim.git
synced 2024-11-26 18:06:44 +00:00
treesitter powered highlighting
This commit is contained in:
parent
3e38d855c7
commit
ad5e325dc4
2 changed files with 40 additions and 0 deletions
|
@ -26,6 +26,7 @@ M.setup = function(user_config)
|
|||
local config = vim.tbl_deep_extend("force", {
|
||||
bin = "direnv",
|
||||
autoload_direnv = false,
|
||||
setFiletype = false,
|
||||
keybindings = {
|
||||
allow = "<Leader>da",
|
||||
deny = "<Leader>dd",
|
||||
|
@ -92,6 +93,12 @@ M.setup = function(user_config)
|
|||
end,
|
||||
})
|
||||
end
|
||||
|
||||
if config.setFiletype then
|
||||
vim.filetype.add({
|
||||
filename = { [".envrc"] = "direnv" },
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
M.allow_direnv = function()
|
||||
|
|
33
lua/queries/direnv/highlights.scm
Normal file
33
lua/queries/direnv/highlights.scm
Normal file
|
@ -0,0 +1,33 @@
|
|||
; inherits bash
|
||||
[
|
||||
"has"
|
||||
"expand_path"
|
||||
"dotenv"
|
||||
"dotenv_if_exists"
|
||||
"user_rel_path"
|
||||
"find_up"
|
||||
"source_env"
|
||||
"source_env_if_exists"
|
||||
"env_vars_required"
|
||||
"source_up"
|
||||
"source_up_if_exists"
|
||||
"source_url"
|
||||
"fetchurl"
|
||||
"direnv_apply_dump"
|
||||
"direnv_load"
|
||||
"PATH_add"
|
||||
"MANPATH_add"
|
||||
"path_add"
|
||||
"PATH_rm"
|
||||
"load_prefix"
|
||||
"semver_search"
|
||||
"layout"
|
||||
"use"
|
||||
"rvm"
|
||||
"watch_file"
|
||||
"direnv_version"
|
||||
"strict_env"
|
||||
"unstrict_env"
|
||||
"on_git_branch"
|
||||
|
||||
] @keyword
|
Loading…
Reference in a new issue