Update .emacs.d/config.org

This commit is contained in:
Anthony Rodriguez 2024-07-02 16:39:16 +02:00
parent 6bb79a03d0
commit 8e83ef53da

View file

@ -24,6 +24,13 @@ Here, we're initializing MELPA, as well as package.el and use-package.
#+end_src #+end_src
** General config ** General config
*** no-littering
no-littering is a useful package that allows to put all of the autosave files and temporary files in one directory (the files ending with ~ for instance)
#+begin_src emacs-lisp
(use-package no-littering)
#+end_src
*** Minimal interface *** Minimal interface
We disable a lot of interface elements, to make the editor more minimal looking. We disable a lot of interface elements, to make the editor more minimal looking.
@ -157,6 +164,15 @@ I use vertico as my completion framework. It's minimal, fast and tells me all I
;; useful beyond Vertico. ;; useful beyond Vertico.
(setq read-extended-command-predicate #'command-completion-default-include-p)) (setq read-extended-command-predicate #'command-completion-default-include-p))
;; Optionally use the `orderless' completion style.
(use-package orderless
:init
;; Configure a custom style dispatcher (see the Consult wiki)
;; (setq orderless-style-dispatchers '(+orderless-consult-dispatch orderless-affix-dispatch)
;; orderless-component-separator #'orderless-escapable-split-on-space)
(setq completion-styles '(orderless basic)
completion-category-defaults nil
completion-category-overrides '((file (styles partial-completion)))))
#+end_src #+end_src
*** which-key *** which-key
@ -273,6 +289,14 @@ Magit is a git client in Emacs.
(setq rust-format-on-save t)) (setq rust-format-on-save t))
#+end_src #+end_src
**** Typst
#+begin_src emacs-lisp
(use-package typst-ts-mode
:quelpa (typst-ts-mode :fetcher git :url "https://git.sr.ht/~meow_king/typst-ts-mode" :files ("*.el"))
:custom
(typst-ts-mode-grammar-location (expand-file-name "tree-sitter/libtree-sitter-typst.so" user-emacs-directory)))
#+end_src
**** tree-sitter **** tree-sitter
#+begin_src emacs-lisp #+begin_src emacs-lisp
(setq treesit-language-source-alist (setq treesit-language-source-alist
@ -290,11 +314,11 @@ Magit is a git client in Emacs.
(toml "https://github.com/tree-sitter/tree-sitter-toml") (toml "https://github.com/tree-sitter/tree-sitter-toml")
(tsx "https://github.com/tree-sitter/tree-sitter-typescript" "master" "tsx/src") (tsx "https://github.com/tree-sitter/tree-sitter-typescript" "master" "tsx/src")
(typescript "https://github.com/tree-sitter/tree-sitter-typescript" "master" "typescript/src") (typescript "https://github.com/tree-sitter/tree-sitter-typescript" "master" "typescript/src")
(typst "https://github.com/uben0/tree-sitter-typst")
(yaml "https://github.com/ikatyang/tree-sitter-yaml"))) (yaml "https://github.com/ikatyang/tree-sitter-yaml")))
(add-to-list 'auto-mode-alist '("\\.ts\\'" . tsx-ts-mode)) (add-to-list 'auto-mode-alist '("\\.ts\\'" . tsx-ts-mode))
(add-to-list 'auto-mode-alist '("\\.tsx\\'" . tsx-ts-mode)) (add-to-list 'auto-mode-alist '("\\.tsx\\'" . tsx-ts-mode))
#+end_src #+end_src
#+begin_src sh #+begin_src sh
@ -313,3 +337,10 @@ Magit is a git client in Emacs.
'(npx "prettier" file))) '(npx "prettier" file)))
(use-package dtrt-indent) (use-package dtrt-indent)
#+end_src #+end_src
**** expand-region
#+begin_src emacs-lisp
(use-package expand-region
:bind ("C-=" . er/expand-region))
#+end_src