From 215eb3f797035195c46e3a0d238806f72586a98f Mon Sep 17 00:00:00 2001 From: Alexander Heldt Date: Fri, 24 Nov 2023 17:37:46 +0100 Subject: [PATCH] pinwheel: Use `typescript-ts-mode` for typescript in `emacs` --- hosts/pinwheel/modules/emacs/config.org | 3 +++ hosts/pinwheel/modules/emacs/default.nix | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/hosts/pinwheel/modules/emacs/config.org b/hosts/pinwheel/modules/emacs/config.org index fba55be..d2ddcd1 100644 --- a/hosts/pinwheel/modules/emacs/config.org +++ b/hosts/pinwheel/modules/emacs/config.org @@ -495,6 +495,7 @@ Setup prefix for keybindings. (javascript-mode . eglot-ensure) (js-mode . eglot-ensure) (js-jsx-mode . eglot-ensure) + (typescript-ts-mode . eglot-ensure) (rust-mode . eglot-ensure) ) ) @@ -546,6 +547,8 @@ Setup prefix for keybindings. (setq js-indent-level 2 js2-basic-offset 2) + + (add-to-list 'auto-mode-alist '("\\.ts\\'" . typescript-ts-mode)) #+END_SRC ** Rust #+BEGIN_SRC emacs-lisp diff --git a/hosts/pinwheel/modules/emacs/default.nix b/hosts/pinwheel/modules/emacs/default.nix index 49fbf66..695f376 100644 --- a/hosts/pinwheel/modules/emacs/default.nix +++ b/hosts/pinwheel/modules/emacs/default.nix @@ -7,7 +7,10 @@ let alwaysEnsure = true; alwaysTangle = true; - extraEmacsPackages = epkgs: [ epkgs.flymake-go-staticcheck ]; + extraEmacsPackages = epkgs: [ + epkgs.flymake-go-staticcheck + epkgs.treesit-grammars.with-all-grammars + ]; }; e = pkgs.writeShellScriptBin "e" ''