From 1350f5ea97de12a7d3ba96556251c65d7b064050 Mon Sep 17 00:00:00 2001 From: Mars Date: Wed, 9 Oct 2024 14:52:14 -0400 Subject: [PATCH] sum more improvmeents --- config.org | 49 +++++++++++++++++++++++++++---------------------- 1 file changed, 27 insertions(+), 22 deletions(-) diff --git a/config.org b/config.org index e623e9f..49a8738 100644 --- a/config.org +++ b/config.org @@ -155,8 +155,21 @@ (electric-indent-mode -1) (electric-pair-mode 1) - (setq-default tab-width 2) - (setq-default indent-tabs-mode nil) + (setq-default evil-auto-indent t + indent-line-function 'evil-indent-line + indent-tabs-mode nil + tab-width 2 + org-src-tab-acts-natively t + org-indent-indentation-per-level 2 + org-indent-mode-turns-on-hiding-stars nil) + + (defun indent-tabs-hook () + (setq tab-width 2 + indent-tabs-mode t + evil-auto-indent t + c-basic-offset 2)) + + (dolist (hook '(c++-mode-hook c-mode-hook c++-ts-mode-hook c-ts-mode-hook)) (add-hook hook 'indent-tabs-hook)) (use-package evil :ensure t @@ -178,25 +191,6 @@ (evil-define-key 'normal 'global (kbd "gr") 'diff-hl-revert-hunk) (evil-define-key 'normal 'global (kbd "gs") 'diff-hl-stage-current-hunk)) - (defun my-set-indent-width () - (setq-local tab-width 2) - (setq-local evil-shift-width 2) - (setq-local indent-tabs-mode nil)) - - (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 '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) - ;; Set whitespace actions. (setq-default whitespace-action '(cleanup auto-cleanup)) @@ -258,6 +252,13 @@ *** Eglot #+begin_src emacs-lisp + (use-package markdown-mode + :ensure t + :mode ("README\\.md\\'" . gfm-mode) + :init (setq markdown-command "multimarkdown") + :bind (:map markdown-mode-map + ("C-c C-e" . markdown-do))) + (use-package eglot-booster :after eglot :ensure (eglot-booster :type git :host github :repo "jdtsmith/eglot-booster") @@ -303,12 +304,16 @@ (c++-mode . eglot-ensure) (c++-ts-mode . eglot-ensure) (c3-ts-mode . eglot-ensure) + (rust-mode . eglot-ensure) (go-mode . eglot-ensure) (go-ts-mode . eglot-ensure)) + (use-package rust-mode + :ensure t) + (use-package eldoc-box :custom - (eldoc-box-max-pixel-width 1024) + (eldoc-box-max-pixel-width 1280) :config (setq eldoc-message-function #'ignore) (setq eldoc-idle-delay 0)