mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
Associate flake.lock with json-mode/js-mode
This commit is contained in:
@ -10,6 +10,14 @@
|
||||
(use-package! nix-mode
|
||||
:interpreter ("\\(?:cached-\\)?nix-shell" . +nix-shell-init-mode)
|
||||
:mode "\\.nix\\'"
|
||||
:init
|
||||
;; Treat flake.lock files as json. Fall back to js-mode because it's faster
|
||||
;; than js2-mode, and its extra features aren't needed there.
|
||||
(add-to-list 'auto-mode-alist
|
||||
(cons "/flake\\.lock\\'"
|
||||
(if (featurep! :lang json)
|
||||
'json-mode
|
||||
'js-mode)))
|
||||
:config
|
||||
(set-repl-handler! 'nix-mode #'+nix/open-repl)
|
||||
(set-company-backend! 'nix-mode 'company-nixos-options)
|
||||
|
Reference in New Issue
Block a user