Home Gen38 @ 2025-08-17-14:42 by jonas@monolith
This commit is contained in:
parent
f3550e65b0
commit
1dbb0cfd1d
@ -204,7 +204,7 @@ in {
|
|||||||
"doom-emacs" = {
|
"doom-emacs" = {
|
||||||
source = builtins.fetchGit {
|
source = builtins.fetchGit {
|
||||||
url = "https://github.com/doomemacs/doomemacs";
|
url = "https://github.com/doomemacs/doomemacs";
|
||||||
rev = "8406c1ff22b95bd0f816de4a0223fa3ce3c82568";
|
rev = "c27621a777c11354a4913c7eb455db3766984709";
|
||||||
};
|
};
|
||||||
onChange = "${doom-setup} --force sync -u -e";
|
onChange = "${doom-setup} --force sync -u -e";
|
||||||
};
|
};
|
||||||
|
|||||||
@ -165,71 +165,71 @@
|
|||||||
:server-id 'nixd)))
|
:server-id 'nixd)))
|
||||||
|
|
||||||
;;Use TS-modes
|
;;Use TS-modes
|
||||||
(after! treesit
|
;;(after! treesit
|
||||||
(load! "packages/treesit-docgen.el")
|
;; (load! "packages/treesit-docgen.el")
|
||||||
(setq treesit-font-lock-level 4))
|
;; (setq treesit-font-lock-level 4))
|
||||||
|
;;
|
||||||
(defconst mode-ts-mode-mapping
|
;;(defconst mode-ts-mode-mapping
|
||||||
'((python-mode . python-ts-mode)
|
;; '((python-mode . python-ts-mode)
|
||||||
(css-mode . css-ts-mode)
|
;; (css-mode . css-ts-mode)
|
||||||
(typescript-mode . typescript-ts-mode)
|
;; (typescript-mode . typescript-ts-mode)
|
||||||
(js-mode . typescript-ts-mode)
|
;; (js-mode . typescript-ts-mode)
|
||||||
(js2-mode . typescript-ts-mode)
|
;; (js2-mode . typescript-ts-mode)
|
||||||
(c-mode . c-ts-mode)
|
;; (c-mode . c-ts-mode)
|
||||||
(c++-mode . c++-ts-mode)
|
;; (c++-mode . c++-ts-mode)
|
||||||
(c-or-c++-mode . c-or-c++-ts-mode)
|
;; (c-or-c++-mode . c-or-c++-ts-mode)
|
||||||
(bash-mode . bash-ts-mode)
|
;; (bash-mode . bash-ts-mode)
|
||||||
(css-mode . css-ts-mode)
|
;; (css-mode . css-ts-mode)
|
||||||
(json-mode . json-ts-mode)
|
;; (json-mode . json-ts-mode)
|
||||||
(js-json-mode . json-ts-mode)
|
;; (js-json-mode . json-ts-mode)
|
||||||
(sh-mode . bash-ts-mode)
|
;; (sh-mode . bash-ts-mode)
|
||||||
(c-or-c++-mode . c-or-c++-ts-mode)
|
;; (c-or-c++-mode . c-or-c++-ts-mode)
|
||||||
(sh-base-mode . bash-ts-mode))
|
;; (sh-base-mode . bash-ts-mode))
|
||||||
"A map from original mode to the ts-mode")
|
;; "A map from original mode to the ts-mode")
|
||||||
|
;;
|
||||||
(use-package! treesit
|
;;(use-package! treesit
|
||||||
:defer t
|
;; :defer t
|
||||||
:mode (("\\.tsx\\'" . tsx-ts-mode)
|
;; :mode (("\\.tsx\\'" . tsx-ts-mode)
|
||||||
("\\.js\\'" . typescript-ts-mode)
|
;; ("\\.js\\'" . typescript-ts-mode)
|
||||||
("\\.mjs\\'" . typescript-ts-mode)
|
;; ("\\.mjs\\'" . typescript-ts-mode)
|
||||||
("\\.mts\\'" . typescript-ts-mode)
|
;; ("\\.mts\\'" . typescript-ts-mode)
|
||||||
("\\.cjs\\'" . typescript-ts-mode)
|
;; ("\\.cjs\\'" . typescript-ts-mode)
|
||||||
("\\.ts\\'" . typescript-ts-mode)
|
;; ("\\.ts\\'" . typescript-ts-mode)
|
||||||
("\\.jsx\\'" . tsx-ts-mode)
|
;; ("\\.jsx\\'" . tsx-ts-mode)
|
||||||
("\\.json\\'" . json-ts-mode)
|
;; ("\\.json\\'" . json-ts-mode)
|
||||||
("\\.Dockerfile\\'" . dockerfile-ts-mode)
|
;; ("\\.Dockerfile\\'" . dockerfile-ts-mode)
|
||||||
("\\.c\\'" . c-ts-mode)
|
;; ("\\.c\\'" . c-ts-mode)
|
||||||
("\\.h\\'" . c-or-c++-ts-mode)
|
;; ("\\.h\\'" . c-or-c++-ts-mode)
|
||||||
("\\.cpp\\'" . c++-ts-mode)
|
;; ("\\.cpp\\'" . c++-ts-mode)
|
||||||
("\\.py\\'" . python-ts-mode)
|
;; ("\\.py\\'" . python-ts-mode)
|
||||||
("\\.sh\\'" . bash-ts-mode)
|
;; ("\\.sh\\'" . bash-ts-mode)
|
||||||
)
|
;; )
|
||||||
:preface
|
;; :preface
|
||||||
(dolist (mapping mode-ts-mode-mapping)
|
;; (dolist (mapping mode-ts-mode-mapping)
|
||||||
(add-to-list 'major-mode-remap-alist mapping)))
|
;; (add-to-list 'major-mode-remap-alist mapping)))
|
||||||
|
;;
|
||||||
;; Integrate with legacy tree-sitter mode
|
;;;; Integrate with legacy tree-sitter mode
|
||||||
(use-package! tree-sitter
|
;;(use-package! tree-sitter
|
||||||
:hook ((c++-ts-mode . tree-sitter-mode)
|
;; :hook ((c++-ts-mode . tree-sitter-mode)
|
||||||
(c-ts-mode . tree-sitter-mode)
|
;; (c-ts-mode . tree-sitter-mode)
|
||||||
(c-or-c++-ts-mode . tree-sitter-mode)
|
;; (c-or-c++-ts-mode . tree-sitter-mode)
|
||||||
(python-ts-mode . tree-sitter-mode)
|
;; (python-ts-mode . tree-sitter-mode)
|
||||||
(css-ts-mode . tree-sitter-mode)
|
;; (css-ts-mode . tree-sitter-mode)
|
||||||
(typescript-ts-mode . tree-sitter-mode)
|
;; (typescript-ts-mode . tree-sitter-mode)
|
||||||
(js-ts-mode . tree-sitter-mode)
|
;; (js-ts-mode . tree-sitter-mode)
|
||||||
(bash-ts-mode . tree-sitter-mode)
|
;; (bash-ts-mode . tree-sitter-mode)
|
||||||
(json-ts-mode . tree-sitter-mode)
|
;; (json-ts-mode . tree-sitter-mode)
|
||||||
(tree-sitter-mode . tree-sitter-hl-mode))
|
;; (tree-sitter-mode . tree-sitter-hl-mode))
|
||||||
:config
|
;; :config
|
||||||
(let (result)
|
;; (let (result)
|
||||||
(dolist (mapping tree-sitter-major-mode-language-alist)
|
;; (dolist (mapping tree-sitter-major-mode-language-alist)
|
||||||
(let* ((pre-mode (car mapping))
|
;; (let* ((pre-mode (car mapping))
|
||||||
(ts-lang (cdr mapping))
|
;; (ts-lang (cdr mapping))
|
||||||
(post-mode (cdr (assoc pre-mode mode-ts-mode-mapping))))
|
;; (post-mode (cdr (assoc pre-mode mode-ts-mode-mapping))))
|
||||||
(when post-mode
|
;; (when post-mode
|
||||||
(push (cons post-mode ts-lang) result))))
|
;; (push (cons post-mode ts-lang) result))))
|
||||||
(dolist (mapping result)
|
;; (dolist (mapping result)
|
||||||
(add-to-list 'tree-sitter-major-mode-language-alist mapping))))
|
;; (add-to-list 'tree-sitter-major-mode-language-alist mapping))))
|
||||||
|
|
||||||
|
|
||||||
;; Integrate with lsp-mode
|
;; Integrate with lsp-mode
|
||||||
|
|||||||
@ -142,7 +142,7 @@
|
|||||||
;;(haskell +lsp) ; a language that's lazier than I am
|
;;(haskell +lsp) ; a language that's lazier than I am
|
||||||
;;hy ; readability of scheme w/ speed of python
|
;;hy ; readability of scheme w/ speed of python
|
||||||
;;idris ; a language you can depend on
|
;;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
|
(java +lsp +tree-sitter) ; the poster child for carpal tunnel syndrome
|
||||||
;;javascript ; all(hope(abandon(ye(who(enter(here))))))
|
;;javascript ; all(hope(abandon(ye(who(enter(here))))))
|
||||||
;;julia ; a better, faster MATLAB
|
;;julia ; a better, faster MATLAB
|
||||||
@ -151,7 +151,7 @@
|
|||||||
;;lean ; for folks with too much to prove
|
;;lean ; for folks with too much to prove
|
||||||
;;ledger ; be audit you can be
|
;;ledger ; be audit you can be
|
||||||
;;lua ; one-based indices? one-based indices
|
;;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
|
;;nim ; python + lisp at the speed of c
|
||||||
(nix +tree-sitter +lsp) ; I hereby declare "nix geht mehr!"
|
(nix +tree-sitter +lsp) ; I hereby declare "nix geht mehr!"
|
||||||
;;ocaml ; an objective camel
|
;;ocaml ; an objective camel
|
||||||
@ -166,16 +166,16 @@
|
|||||||
;;rest ; Emacs as a REST client
|
;;rest ; Emacs as a REST client
|
||||||
;;rst ; ReST in peace
|
;;rst ; ReST in peace
|
||||||
;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"}
|
;;(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
|
;;scala ; java, but good
|
||||||
;;(scheme +guile) ; a fully conniving family of lisps
|
;;(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
|
;;sml
|
||||||
;;solidity ; do you need a blockchain? No.
|
;;solidity ; do you need a blockchain? No.
|
||||||
;;swift ; who asked for emoji variables?
|
;;swift ; who asked for emoji variables?
|
||||||
;;terra ; Earth and Moon in alignment for performance.
|
;;terra ; Earth and Moon in alignment for performance.
|
||||||
;;web ; the tubes
|
;;web ; the tubes
|
||||||
yaml ; JSON, but readable
|
(yaml +tree-sitter) ; JSON, but readable
|
||||||
;;zig ; C, but simpler
|
;;zig ; C, but simpler
|
||||||
|
|
||||||
:email
|
:email
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user