Closed leungbk closed 4 years ago
Yep, probably so.
Could this benefit of some extra font locking as well? I am doing it like this at the moment:
(defvar mu-direnv-keywords
'("MANPATH_add" "PATH_add" "direnv_layout_dir" "direnv_load" "dotenv"
"expand_path" "find_up" "has" "join_args" "layout" "load_prefix"
"log_error" "log_status" "path_add" "rvm" "source_env" "source_up"
"use" "use_guix" "use_nix" "user_rel_path" "watch_file")
"Useful direnv keywords to be highlighted.")
(define-derived-mode mu-direnv-rc-mode sh-mode "envrc"
"Major mode for .envrc files."
(font-lock-add-keywords
nil `((,(regexp-opt mu-direnv-keywords 'symbols)
(0 font-lock-keyword-face)))))
Edit: sorry, this is for direnv-mode
, but still something like this for envrc-file-mode
could be useful I guess. :)
Done, thanks @manuel-uberti !
Awesome. :)
The
direnv.el
package has the following:I feel like this package should include a major mode for
.envrc
files as well.