From 4ee0a6380b6b5132fd4ab7a65225709646325b4e Mon Sep 17 00:00:00 2001 From: Swarsel Date: Sat, 7 Dec 2024 01:14:59 +0100 Subject: [PATCH] feat: add nixd --- SwarselSystems.org | 10 ++++++++-- profiles/common/home/emacs.nix | 2 ++ profiles/common/nixos/packages.nix | 2 ++ programs/emacs/init.el | 5 ++++- 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/SwarselSystems.org b/SwarselSystems.org index 2a1d06b..e548c64 100644 --- a/SwarselSystems.org +++ b/SwarselSystems.org @@ -3766,6 +3766,8 @@ Mostly used to install some compilers and lsp's that I want to have available wh # go go gopls + # nix + nixd # zig zig zls @@ -7833,6 +7835,8 @@ Lastly, I am defining some more packages here that the parser has problems findi epkgs.use-package # epkgs.lsp-bridge epkgs.doom-themes + epkgs.vterm + epkgs.treesit-grammars.with-all-grammars # build the rest of the packages myself # org-calfw is severely outdated on MELPA and throws many warnings on emacs startup @@ -11357,9 +11361,10 @@ This adds a rudimentary nix-mode to Emacs. I have not really tried this out, as #+begin_src emacs-lisp - (use-package nix-mode - :mode "\\.nix\\'") + (use-package nix-mode) + (use-package nix-ts-mode + :mode "\\.nix\\'") #+end_src *** HCL Mode @@ -11615,6 +11620,7 @@ In order to update the language grammars, run the next command below. (latex . ("https://github.com/latex-lsp/tree-sitter-latex")) (make . ("https://github.com/alemuller/tree-sitter-make")) (markdown . ("https://github.com/ikatyang/tree-sitter-markdown")) + (nix . ("https://github.com/nix-community/tree-sitter-nix")) (R . ("https://github.com/r-lib/tree-sitter-r")) (python . ("https://github.com/tree-sitter/tree-sitter-python")) (typescript . ("https://github.com/tree-sitter/tree-sitter-typescript" "typescript/src" "typescript")) diff --git a/profiles/common/home/emacs.nix b/profiles/common/home/emacs.nix index 30da4e3..8adda00 100644 --- a/profiles/common/home/emacs.nix +++ b/profiles/common/home/emacs.nix @@ -14,6 +14,8 @@ epkgs.use-package # epkgs.lsp-bridge epkgs.doom-themes + epkgs.vterm + epkgs.treesit-grammars.with-all-grammars # build the rest of the packages myself # org-calfw is severely outdated on MELPA and throws many warnings on emacs startup diff --git a/profiles/common/nixos/packages.nix b/profiles/common/nixos/packages.nix index 20b2c91..45f83e9 100644 --- a/profiles/common/nixos/packages.nix +++ b/profiles/common/nixos/packages.nix @@ -57,6 +57,8 @@ # go go gopls + # nix + nixd # zig zig zls diff --git a/programs/emacs/init.el b/programs/emacs/init.el index f6ae6c7..b8fa6ff 100644 --- a/programs/emacs/init.el +++ b/programs/emacs/init.el @@ -1165,7 +1165,9 @@ create a new one." (add-hook 'org-present-mode-quit-hook 'swarsel/org-present-end) (add-hook 'org-present-after-navigate-functions 'swarsel/org-present-slide) -(use-package nix-mode +(use-package nix-mode) + +(use-package nix-ts-mode :mode "\\.nix\\'") (use-package hcl-mode @@ -1299,6 +1301,7 @@ create a new one." (latex . ("https://github.com/latex-lsp/tree-sitter-latex")) (make . ("https://github.com/alemuller/tree-sitter-make")) (markdown . ("https://github.com/ikatyang/tree-sitter-markdown")) + (nix . ("https://github.com/nix-community/tree-sitter-nix")) (R . ("https://github.com/r-lib/tree-sitter-r")) (python . ("https://github.com/tree-sitter/tree-sitter-python")) (typescript . ("https://github.com/tree-sitter/tree-sitter-typescript" "typescript/src" "typescript"))