even more things yay

This commit is contained in:
Mars 2024-10-06 01:27:04 -04:00
parent 5c39aa2bfa
commit 41d3ea0a24
Signed by: pupbrained
GPG key ID: 0FF5B8826803F895

View file

@ -202,6 +202,12 @@
(setq indent-tabs-mode nil) ;; Use spaces instead of tabs (setq indent-tabs-mode nil) ;; Use spaces instead of tabs
(setq tab-width 2)) ;; Set tab width to your desired value (setq tab-width 2)) ;; Set tab width to your desired value
(add-hook 'prog-mode-hook 'my-set-indent-width)
(defun my-org-src-edit-hook ()
"Set indent width for Org source blocks."
(setq indent-tabs-mode nil) ;; Use spaces instead of tabs
(setq tab-width 2)) ;; Set tab width to your desired value
(add-hook 'org-src-mode-hook 'my-org-src-edit-hook) (add-hook 'org-src-mode-hook 'my-org-src-edit-hook)
@ -246,6 +252,18 @@
make-backup-files nil) make-backup-files nil)
#+end_src #+end_src
** Ligatures
#+begin_src emacs-lisp
(use-package ligature
:config
(ligature-set-ligatures 'prog-mode '("<---" "<--" "<<-" "<-" "->" "-->" "--->" "<->" "<-->" "<--->" "<---->" "<!--"
"<==" "<===" "<=" "=>" "=>>" "==>" "===>" ">=" "<=>" "<==>" "<===>" "<====>" "<!---"
"<~~" "<~" "~>" "~~>" "::" ":::" "==" "!=" "===" "!=="
":=" ":-" ":+" "<*" "<*>" "*>" "<|" "<|>" "|>" "+:" "-:" "=:" "<******>" "++" "+++"))
(global-ligature-mode t))
#+end_src
** LSP ** LSP
*** LSP-Bridge *** LSP-Bridge
@ -260,8 +278,6 @@
:ensure '(lsp-bridge :type git :host github :repo "manateelazycat/lsp-bridge" :files (:defaults "*")) :ensure '(lsp-bridge :type git :host github :repo "manateelazycat/lsp-bridge" :files (:defaults "*"))
:init :init
(defun lsp-bridge-mode-hook-func () (defun lsp-bridge-mode-hook-func ()
(with-eval-after-load 'corfu (corfu-mode -1))
(local-set-key (kbd "M-[") #'lsp-bridge-return-from-def) (local-set-key (kbd "M-[") #'lsp-bridge-return-from-def)
(local-set-key (kbd "M-]") #'lsp-bridge-find-def) (local-set-key (kbd "M-]") #'lsp-bridge-find-def)
(local-set-key [remap xref-find-definitions] #'lsp-bridge-find-def) (local-set-key [remap xref-find-definitions] #'lsp-bridge-find-def)
@ -276,11 +292,17 @@
(evil-define-key 'normal 'local (kbd "K") #'lsp-bridge-popup-documentation)) (evil-define-key 'normal 'local (kbd "K") #'lsp-bridge-popup-documentation))
(setq lsp-bridge-enable-log t (setq lsp-bridge-enable-log t
lsp-bridge-enable-inlay-hint t
lsp-bridge-nix-lsp-server "nil" lsp-bridge-nix-lsp-server "nil"
acm-enable-icon t acm-enable-icon t
acm-enable-doc t acm-enable-doc t
acm-enable-tabnine nil acm-enable-copilot t
acm-enable-quick-access t) acm-enable-quick-access t
acm-completion-backend-merge-order '("codeium-candidates"
"mode-first-part-candidates"
"template-first-part-candidates"
"template-second-part-candidates"
"mode-second-part-candidates"))
(require 'lsp-bridge) (require 'lsp-bridge)
(evil-set-initial-state 'lsp-bridge-ref-mode 'insert) (evil-set-initial-state 'lsp-bridge-ref-mode 'insert)
@ -289,6 +311,25 @@
(add-hook 'prog-mode-hook #'lsp-bridge-mode)) (add-hook 'prog-mode-hook #'lsp-bridge-mode))
#+end_src #+end_src
*** Apheleia
#+begin_src emacs-lisp
(use-package apheleia
:ensure t
:config
(add-to-list 'apheleia-formatters
'(alejandra "alejandra" "--quiet" "-"))
(add-to-list 'apheleia-formatters
'(clang-format "clang-format"))
(add-to-list 'apheleia-mode-alist
'(nix-mode . alejandra))
(add-to-list 'apheleia-mode-alist
'(c-mode . clang-format))
(add-to-list 'apheleia-mode-alist
'(c++-mode . clang-format))
(apheleia-global-mode +1))
#+end_src
*** TreeSitter *** TreeSitter
#+begin_src emacs-lisp #+begin_src emacs-lisp