Update .emacs.d/config.org

This commit is contained in:
Anthony Rodriguez 2024-06-26 23:57:05 +02:00
parent 7015684b5d
commit 59aed25776

View file

@ -230,7 +230,6 @@ I use org-superstar-mode, as it makes headlines and bullets look really nice.
(setq lsp-keymap-prefix "C-c l") (setq lsp-keymap-prefix "C-c l")
(setq read-process-output-max (* 1024 1024)) (setq read-process-output-max (* 1024 1024))
(setq gc-cons-threshold 100000000)) (setq gc-cons-threshold 100000000))
(use-package lsp-ui) (use-package lsp-ui)
#+end_src #+end_src
@ -268,21 +267,49 @@ Magit is a git client in Emacs.
*** Languages *** Languages
**** Rust **** Rust
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package rust-mode (use-package rust-mode
:init :init
(setq rust-format-on-save t)) (setq rust-format-on-save t))
#+end_src #+end_src
**** Typescript **** tree-sitter
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package typescript-mode (setq treesit-language-source-alist
:hook (typescript-mode . lsp) '((bash "https://github.com/tree-sitter/tree-sitter-bash")
:config (cmake "https://github.com/uyha/tree-sitter-cmake")
(setq typescript-indent-level 2)) (css "https://github.com/tree-sitter/tree-sitter-css")
(elisp "https://github.com/Wilfred/tree-sitter-elisp")
(go "https://github.com/tree-sitter/tree-sitter-go")
(html "https://github.com/tree-sitter/tree-sitter-html")
(javascript "https://github.com/tree-sitter/tree-sitter-javascript" "master" "src")
(json "https://github.com/tree-sitter/tree-sitter-json")
(make "https://github.com/alemuller/tree-sitter-make")
(markdown "https://github.com/ikatyang/tree-sitter-markdown")
(python "https://github.com/tree-sitter/tree-sitter-python")
(toml "https://github.com/tree-sitter/tree-sitter-toml")
(tsx "https://github.com/tree-sitter/tree-sitter-typescript" "master" "tsx/src")
(typescript "https://github.com/tree-sitter/tree-sitter-typescript" "master" "typescript/src")
(yaml "https://github.com/ikatyang/tree-sitter-yaml")))
(add-to-list 'auto-mode-alist '("\\.ts\\'" . tsx-ts-mode))
(add-to-list 'auto-mode-alist '("\\.tsx\\'" . tsx-ts-mode))
#+end_src #+end_src
#+begin_src sh #+begin_src sh
npm install -g typescript-language-server npm install -g typescript-language-server
#+end_src #+end_src
**** Alapheia
#+begin_src emacs-lisp
(use-package apheleia
:ensure t
:config
(apheleia-global-mode +1)
(setf (alist-get 'prettier apheleia-formatters)
'(npx "prettier" file))
(setf (alist-get 'prettier-typescript apheleia-formatters)
'(npx "prettier" file)))
(use-package dtrt-indent)
#+end_src