Fixed some issues with C formatting.
This commit is contained in:
parent
3a334a79e4
commit
60c2306e20
3 changed files with 10 additions and 1 deletions
|
|
@ -74,7 +74,9 @@ Might as well highlight the parentheses to make them easier to spot.
|
|||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package apheleia
|
||||
:config
|
||||
(apheleia-global-mode +1))
|
||||
(apheleia-global-mode +1)
|
||||
(setf (alist-get 'c-ts-mode apheleia-mode-alist) '(clang-format))
|
||||
(setf (alist-get 'c++-ts-mode apheleia-mode-alist) '(clang-format)))
|
||||
#+END_SRC
|
||||
|
||||
** Indentation Level
|
||||
|
|
|
|||
|
|
@ -30,6 +30,10 @@ the package.
|
|||
;; if you want which-key integration
|
||||
(lsp-mode . lsp-enable-which-key-integration))
|
||||
:commands lsp-deferred
|
||||
:custom
|
||||
;; Let apheleia handle formatting; disable LSP's competing formatters
|
||||
(lsp-enable-on-type-formatting nil)
|
||||
(lsp-before-save-edits nil)
|
||||
:config
|
||||
(setq lsp-elixir-server-command '("elixir-ls")))
|
||||
|
||||
|
|
|
|||
|
|
@ -23,6 +23,9 @@ bother with an explanation on each.
|
|||
|
||||
;; C
|
||||
(use-feature c-ts-mode
|
||||
:custom
|
||||
(c-ts-mode-indent-offset 2)
|
||||
(c-ts-mode-indent-style 'k&r)
|
||||
:config
|
||||
(with-eval-after-load 'c-ts-mode
|
||||
(setq-local treesit-primary-parser 'c)))
|
||||
|
|
|
|||
Loading…
Reference in a new issue