doom: replace Nix module with nix-ts-mode custom config

The new config is much smaller, the new mode uses native tree-sitter
integration, and appears to be actively developed. It does not have all
the features as the doom module, but I didn't seem to use any of it
anyway.
This commit is contained in:
Payas Relekar 2023-11-11 16:35:45 +05:30
parent eaf4ebbfad
commit b515b7a807
2 changed files with 25 additions and 9 deletions

View file

@ -191,6 +191,17 @@ Tangle ~packages.el~ from within org-mode.
:recipe (:type git :host github :repo "gleam-lang/gleam-mode"))
(package! eat)
(package! nix-ts-mode)
(package! nix3
:recipe (:type git :host github :repo "emacs-twist/nix3.el"))
(package! magit-nix3
:recipe (:type git
:host github
:repo "emacs-twist/nix3.el"
:files ("extra/magit-nix3.el")))
#+end_src
* Modus-themes
Customize Modus-themes a little to make it more peppy and vibrant.
@ -925,12 +936,17 @@ All the modifications that are necessary enough to exist, but not big enough to
#+end_src
** Nix
- Use ~nixpkgs-fmt~ for .nix file formatting
Nixpkgs PRs use this instead of ~nixfmt~ and gave me many a wondering annoyances on my PRs. So fudge it, I'm switching to it full-time.
#+begin_src emacs-lisp :lexical t
(use-package! nix-mode
:custom
(nix-nixfmt-bin "nixpkgs-fmt" "Path to nixfmt executable."))
(after! tramp
(add-to-list 'tramp-remote-path "/run/current-system/sw/bin"))
(use-package! nix-ts-mode
:mode "\\.nix\\'"
:init
;; Treat flake.lock files as json
(add-to-list 'auto-mode-alist (cons "/flake\\.lock\\'" 'json-ts-mode))
:config
(add-hook 'nix-ts-mode-hook #'eglot-ensure'append))
#+end_src
** EditorConfig
@ -1102,7 +1118,7 @@ When Emacs is opened in Windows Subsystem for Linux, open web links in Firefox o
;; You can manually enable Combobulate with `M-x
;; combobulate-mode'.
:after (treesit)
:hook ((nix-mode . combobulate-mode)
:hook ((nix-ts-mode . combobulate-mode)
(python-ts-mode . combobulate-mode)
(js-ts-mode . combobulate-mode)
(css-ts-mode . combobulate-mode)

View file

@ -168,9 +168,9 @@
lua ; one-based indices? one-based indices
;;markdown ; writing docs for people to ignore
;;nim ; python + lisp at the speed of c
(nix ; I hereby declare "nix geht mehr!"
+lsp
+tree-sitter)
;;(nix ; I hereby declare "nix geht mehr!"
;; +lsp
;; +tree-sitter)
;;ocaml ; an objective camel
(org ; organize your plain life in plain text
+babel ; run inline code from org files