From 1dbb0cfd1d1d565705fd8540c394791b77172082 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20R=C3=B6ger?= Date: Sun, 21 Sep 2025 16:40:28 +0200 Subject: [PATCH] Home Gen38 @ 2025-08-17-14:42 by jonas@monolith --- modules/home/doom/doom.nix | 2 +- modules/home/doom/static/config.el | 130 ++++++++++++++--------------- modules/home/doom/static/init.el | 10 +-- 3 files changed, 71 insertions(+), 71 deletions(-) diff --git a/modules/home/doom/doom.nix b/modules/home/doom/doom.nix index cbca165..1592e94 100644 --- a/modules/home/doom/doom.nix +++ b/modules/home/doom/doom.nix @@ -204,7 +204,7 @@ in { "doom-emacs" = { source = builtins.fetchGit { url = "https://github.com/doomemacs/doomemacs"; - rev = "8406c1ff22b95bd0f816de4a0223fa3ce3c82568"; + rev = "c27621a777c11354a4913c7eb455db3766984709"; }; onChange = "${doom-setup} --force sync -u -e"; }; diff --git a/modules/home/doom/static/config.el b/modules/home/doom/static/config.el index fec267a..b820198 100644 --- a/modules/home/doom/static/config.el +++ b/modules/home/doom/static/config.el @@ -165,71 +165,71 @@ :server-id 'nixd))) ;;Use TS-modes -(after! treesit - (load! "packages/treesit-docgen.el") - (setq treesit-font-lock-level 4)) - -(defconst mode-ts-mode-mapping - '((python-mode . python-ts-mode) - (css-mode . css-ts-mode) - (typescript-mode . typescript-ts-mode) - (js-mode . typescript-ts-mode) - (js2-mode . typescript-ts-mode) - (c-mode . c-ts-mode) - (c++-mode . c++-ts-mode) - (c-or-c++-mode . c-or-c++-ts-mode) - (bash-mode . bash-ts-mode) - (css-mode . css-ts-mode) - (json-mode . json-ts-mode) - (js-json-mode . json-ts-mode) - (sh-mode . bash-ts-mode) - (c-or-c++-mode . c-or-c++-ts-mode) - (sh-base-mode . bash-ts-mode)) - "A map from original mode to the ts-mode") - -(use-package! treesit - :defer t - :mode (("\\.tsx\\'" . tsx-ts-mode) - ("\\.js\\'" . typescript-ts-mode) - ("\\.mjs\\'" . typescript-ts-mode) - ("\\.mts\\'" . typescript-ts-mode) - ("\\.cjs\\'" . typescript-ts-mode) - ("\\.ts\\'" . typescript-ts-mode) - ("\\.jsx\\'" . tsx-ts-mode) - ("\\.json\\'" . json-ts-mode) - ("\\.Dockerfile\\'" . dockerfile-ts-mode) - ("\\.c\\'" . c-ts-mode) - ("\\.h\\'" . c-or-c++-ts-mode) - ("\\.cpp\\'" . c++-ts-mode) - ("\\.py\\'" . python-ts-mode) - ("\\.sh\\'" . bash-ts-mode) - ) - :preface - (dolist (mapping mode-ts-mode-mapping) - (add-to-list 'major-mode-remap-alist mapping))) - -;; Integrate with legacy tree-sitter mode -(use-package! tree-sitter - :hook ((c++-ts-mode . tree-sitter-mode) - (c-ts-mode . tree-sitter-mode) - (c-or-c++-ts-mode . tree-sitter-mode) - (python-ts-mode . tree-sitter-mode) - (css-ts-mode . tree-sitter-mode) - (typescript-ts-mode . tree-sitter-mode) - (js-ts-mode . tree-sitter-mode) - (bash-ts-mode . tree-sitter-mode) - (json-ts-mode . tree-sitter-mode) - (tree-sitter-mode . tree-sitter-hl-mode)) - :config - (let (result) - (dolist (mapping tree-sitter-major-mode-language-alist) - (let* ((pre-mode (car mapping)) - (ts-lang (cdr mapping)) - (post-mode (cdr (assoc pre-mode mode-ts-mode-mapping)))) - (when post-mode - (push (cons post-mode ts-lang) result)))) - (dolist (mapping result) - (add-to-list 'tree-sitter-major-mode-language-alist mapping)))) +;;(after! treesit +;; (load! "packages/treesit-docgen.el") +;; (setq treesit-font-lock-level 4)) +;; +;;(defconst mode-ts-mode-mapping +;; '((python-mode . python-ts-mode) +;; (css-mode . css-ts-mode) +;; (typescript-mode . typescript-ts-mode) +;; (js-mode . typescript-ts-mode) +;; (js2-mode . typescript-ts-mode) +;; (c-mode . c-ts-mode) +;; (c++-mode . c++-ts-mode) +;; (c-or-c++-mode . c-or-c++-ts-mode) +;; (bash-mode . bash-ts-mode) +;; (css-mode . css-ts-mode) +;; (json-mode . json-ts-mode) +;; (js-json-mode . json-ts-mode) +;; (sh-mode . bash-ts-mode) +;; (c-or-c++-mode . c-or-c++-ts-mode) +;; (sh-base-mode . bash-ts-mode)) +;; "A map from original mode to the ts-mode") +;; +;;(use-package! treesit +;; :defer t +;; :mode (("\\.tsx\\'" . tsx-ts-mode) +;; ("\\.js\\'" . typescript-ts-mode) +;; ("\\.mjs\\'" . typescript-ts-mode) +;; ("\\.mts\\'" . typescript-ts-mode) +;; ("\\.cjs\\'" . typescript-ts-mode) +;; ("\\.ts\\'" . typescript-ts-mode) +;; ("\\.jsx\\'" . tsx-ts-mode) +;; ("\\.json\\'" . json-ts-mode) +;; ("\\.Dockerfile\\'" . dockerfile-ts-mode) +;; ("\\.c\\'" . c-ts-mode) +;; ("\\.h\\'" . c-or-c++-ts-mode) +;; ("\\.cpp\\'" . c++-ts-mode) +;; ("\\.py\\'" . python-ts-mode) +;; ("\\.sh\\'" . bash-ts-mode) +;; ) +;; :preface +;; (dolist (mapping mode-ts-mode-mapping) +;; (add-to-list 'major-mode-remap-alist mapping))) +;; +;;;; Integrate with legacy tree-sitter mode +;;(use-package! tree-sitter +;; :hook ((c++-ts-mode . tree-sitter-mode) +;; (c-ts-mode . tree-sitter-mode) +;; (c-or-c++-ts-mode . tree-sitter-mode) +;; (python-ts-mode . tree-sitter-mode) +;; (css-ts-mode . tree-sitter-mode) +;; (typescript-ts-mode . tree-sitter-mode) +;; (js-ts-mode . tree-sitter-mode) +;; (bash-ts-mode . tree-sitter-mode) +;; (json-ts-mode . tree-sitter-mode) +;; (tree-sitter-mode . tree-sitter-hl-mode)) +;; :config +;; (let (result) +;; (dolist (mapping tree-sitter-major-mode-language-alist) +;; (let* ((pre-mode (car mapping)) +;; (ts-lang (cdr mapping)) +;; (post-mode (cdr (assoc pre-mode mode-ts-mode-mapping)))) +;; (when post-mode +;; (push (cons post-mode ts-lang) result)))) +;; (dolist (mapping result) +;; (add-to-list 'tree-sitter-major-mode-language-alist mapping)))) ;; Integrate with lsp-mode diff --git a/modules/home/doom/static/init.el b/modules/home/doom/static/init.el index 5ca7bf4..ec4e5fd 100644 --- a/modules/home/doom/static/init.el +++ b/modules/home/doom/static/init.el @@ -142,7 +142,7 @@ ;;(haskell +lsp) ; a language that's lazier than I am ;;hy ; readability of scheme w/ speed of python ;;idris ; a language you can depend on - json ; At least it ain't XML + (json +tree-sitter) ; At least it ain't XML (java +lsp +tree-sitter) ; the poster child for carpal tunnel syndrome ;;javascript ; all(hope(abandon(ye(who(enter(here)))))) ;;julia ; a better, faster MATLAB @@ -151,7 +151,7 @@ ;;lean ; for folks with too much to prove ;;ledger ; be audit you can be ;;lua ; one-based indices? one-based indices - markdown ; writing docs for people to ignore + (markdown +tree-sitter) ; writing docs for people to ignore ;;nim ; python + lisp at the speed of c (nix +tree-sitter +lsp) ; I hereby declare "nix geht mehr!" ;;ocaml ; an objective camel @@ -166,16 +166,16 @@ ;;rest ; Emacs as a REST client ;;rst ; ReST in peace ;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"} - (rust +lsp) ; Fe2O3.unwrap().unwrap().unwrap().unwrap() + (rust +lsp +tree-sitter) ; Fe2O3.unwrap().unwrap().unwrap().unwrap() ;;scala ; java, but good ;;(scheme +guile) ; a fully conniving family of lisps - sh ; she sells {ba,z,fi}sh shells on the C xor + (sh +tree-sitter) ; she sells {ba,z,fi}sh shells on the C xor ;;sml ;;solidity ; do you need a blockchain? No. ;;swift ; who asked for emoji variables? ;;terra ; Earth and Moon in alignment for performance. ;;web ; the tubes - yaml ; JSON, but readable + (yaml +tree-sitter) ; JSON, but readable ;;zig ; C, but simpler :email