refactor: use Doom utility function for indentation vars
This commit is contained in:
parent
5b065e68ef
commit
b5504e4fdc
1 changed files with 26 additions and 5 deletions
31
config.org
31
config.org
|
|
@ -974,7 +974,6 @@ fold
|
|||
:tools
|
||||
biblio
|
||||
debugger
|
||||
editorconfig
|
||||
(eval +overlay)
|
||||
(lookup +dictionary +docsets)
|
||||
make
|
||||
|
|
@ -1464,6 +1463,25 @@ Corfu's posframe buffer shouldn't be numbered by =winum=:
|
|||
(push " *corfu*" winum-ignored-buffers))
|
||||
#+end_src
|
||||
|
||||
** EditorConfig
|
||||
|
||||
#+call: confpkg("Pkg: editorconfig")
|
||||
|
||||
#+begin_src emacs-lisp :noweb-ref doom-module
|
||||
:tools editorconfig
|
||||
#+end_src
|
||||
|
||||
The convenience function ~set-editorconfig-indent-var!~ provided by Doom is just wrong. Here's a patch.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(defpatch! (symbol-function #'set-editorconfig-indent-var!)
|
||||
(defun set-editorconfig-indent-var!) (mode &rest vars)
|
||||
"Add (MODE VARS...) to `editorconfig-indentation-alist'."
|
||||
(after! editorconfig
|
||||
(nconc editorconfig-indentation-alist
|
||||
(el-patch-wrap 1 (list (cons mode vars))))))
|
||||
#+end_src
|
||||
|
||||
** Eldoc
|
||||
|
||||
#+call: confpkg("Pkg: eldoc")
|
||||
|
|
@ -4533,11 +4551,8 @@ The Agda integration with Markdown specifically requires some changes to the pol
|
|||
|
||||
*** Indentation
|
||||
|
||||
EditorConfig can't find this mode's indentation variables itself, so we'll have to tell it where they are.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(after! editorconfig
|
||||
(push '(nix-ts-mode nix-ts-mode-indent-offset) editorconfig-indentation-alist))
|
||||
(set-editorconfig-indent-var! 'nix-ts-mode 'nix-ts-mode-indent-offset)
|
||||
#+end_src
|
||||
|
||||
** Python
|
||||
|
|
@ -4556,6 +4571,12 @@ EditorConfig can't find this mode's indentation variables itself, so we'll have
|
|||
:lang (qt +lsp +tree-sitter)
|
||||
#+end_src
|
||||
|
||||
*** Indentation
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(set-editorconfig-indent-var! 'qml-ts-mode 'qml-ts-mode-indent-offset)
|
||||
#+end_src
|
||||
|
||||
** Rust
|
||||
|
||||
#+call: confpkg("Mode: Rust")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue