5 Commits 480c43eeeb ... 5d94242376

Autor SHA1 Mensaje Fecha
  Distopico Vegan 5d94242376 improve visual lines in erc/jabber and git hace 1 año
  Distopico Vegan e92e5fe79b change how to define local var hace 1 año
  Distopico Vegan 19a232f0a8 enable auto-fill for comments hace 1 año
  Distopico Vegan 4312a99147 remove eglot -inlay-hints hace 1 año
  Distopico Vegan d85b39fff9 remove unnecessary global org-mode keybindings hace 1 año
Se han modificado 7 ficheros con 33 adiciones y 11 borrados
  1. 1 0
      core/packages.el
  2. 5 7
      core/setup-keybindings.el
  3. 6 0
      modes/conf-erc.el
  4. 4 1
      modes/conf-jabber.el
  5. 7 1
      modes/conf-magit.el
  6. 3 2
      modes/conf-prog.el
  7. 7 0
      modes/conf-rust.el

+ 1 - 0
core/packages.el

@@ -43,6 +43,7 @@
     highlight-symbol
     hlinum
     linum-off
+    visual-fill-column
     message-view-patch
     perspective
     powerline

+ 5 - 7
core/setup-keybindings.el

@@ -214,15 +214,13 @@
   (let ((map (make-sparse-keymap)))
     (define-key map "f" 'org-switchb)
     (define-key map "a" 'distopico:org-show-agenda)
-    (define-key map "v" 'org-agenda)
     (define-key map "A" 'org-agenda-list)
+    (define-key map "v" 'org-agenda)
     (define-key map "c" 'org-capture)
-    (define-key map "C" 'org-clock-goto)
-    (define-key map "p" 'pomodoro-org)
-    (define-key map "u" 'distopico:org-update-appt)
-    (define-key map "P" 'org-projectile-project-todo-completing-read)
-    (define-key map "r" 'org-refile)
-    (define-key map "R" 'distopico:org-capture-refile-and-jump)
+    (define-key map "t" 'org-clock-goto)
+    (define-key map "P" 'pomodoro-org)
+    (define-key map "u" 'distopico:org-run-appt)
+    (define-key map "p" 'org-projectile-project-todo-completing-read)
     (define-key map "n" 'org-annotate-file)
     (define-key map "l" 'org-store-link)
     (define-key map "L" 'org-insert-link-global)

+ 6 - 0
modes/conf-erc.el

@@ -394,6 +394,11 @@ even if the server closed it in `HOSTNAME' by `REASON'."
   (setq distopico:erc-reconnect-timer
         (run-at-time nil (* 10 erc-server-reconnect-timeout) #'distopico:erc-reconnect)))
 
+(defun distopico:erc-mode-hook ()
+  "Hook for `erc-mode' to setup mode settings."
+  (visual-line-mode +1)
+  (auto-fill-mode +1))
+
 (defun distopico:erc-init-load-hook ()
   "Hook when Emacs load."
   (distopico:erc-define-alerts)
@@ -403,6 +408,7 @@ even if the server closed it in `HOSTNAME' by `REASON'."
 ;;(add-hook 'erc-before-connect #'distopico:erc-before-connect-hook)
 ;;(add-hook 'erc-insert-pre-hook #'erc-ignore-unimportant)
 ;;(add-hook 'erc-disconnected-hook #'distopico:erc-disconnected-hook)
+(add-hook 'erc-mode-hook #'distopico:erc-mode-hook)
 (add-hook 'erc-insert-post-hook #'erc-truncate-buffer)
 (add-hook 'erc-text-matched-hook 'distopico:erc-matched-or-insert-hook)
 (add-hook 'erc-insert-modify-hook 'distopico:erc-matched-or-insert-hook)

+ 4 - 1
modes/conf-jabber.el

@@ -2,6 +2,7 @@
 (require 'jabber)
 (require 'jabber-otr)
 (require 'autosmiley)
+(require 'visual-fill-column)
 
 ;; Costom vars
 (defcustom distopico:jabber-default-account "vxcamiloxv@disroot.org"
@@ -336,7 +337,9 @@ This display each jabber activity name in a list when own click action activity.
 (defun distopico:jabber-chat-mode-hook ()
   "Hooks for `jabber-chat-mode'."
   (autosmiley-mode)
-  (visual-fill-column))
+  (visual-line-mode +1)
+  (visual-fill-column-mode +1)
+  (auto-fill-mode +1))
 
 (defun distopico:jabber-init-load-hook ()
   "Hooks on init jabber for connect all accounts."

+ 7 - 1
modes/conf-magit.el

@@ -5,7 +5,9 @@
       transient-history-file (in-emacs-d ".cache/transientl/history.el")
       magit-completing-read-function 'magit-ido-completing-read)
 
-(add-to-list 'git-commit-setup-hook 'git-commit-turn-on-flyspell);
+(add-to-list 'git-commit-setup-hook 'git-commit-turn-on-flyspell)
+(add-to-list 'git-commit-setup-hook 'git-commit-turn-on-auto-fill)
+(add-to-list 'git-commit-setup-hook #'distopico:git--commit-setup-hook)
 
 ;; By default the diff for the changes that are about to be committed
 ;;  are automatically shown when invoking the commit
@@ -19,6 +21,10 @@
 ;;   (if (equal "emacs-giteditor" (frame-parameter nil 'name))
 ;;       (delete-frame)))
 
+(defun distopico:git--commit-setup-hook ()
+  "Commit setup hook for `git-commit'."
+  (setq-local fill-column 68))
+
 (defun distopico:magit-popup-mode-hook ()
   "Hook when a magit popup is open."
   (tabbar-local-mode))

+ 3 - 2
modes/conf-prog.el

@@ -30,8 +30,9 @@
 
 ;; Functions
 (defun distopico:local-comment-auto-fill ()
-  "Set comment style."
-  (set (make-local-variable 'comment-auto-fill-only-comments) t))
+  "Auto-fill just comments."
+  (setq-local comment-auto-fill-only-comments t)
+  (auto-fill-mode +1))
 
 (defun distopico:prog-mode-hook ()
   "Hook for all modes derivate of `prog-mode'."

+ 7 - 0
modes/conf-rust.el

@@ -9,6 +9,7 @@
   (eglot-ensure))
 
 (defun distopico:try-cargo-toml(dir)
+  "Find rust workspace root for `project' based in the current `DIR'."
   (when-let* (((eq major-mode 'rust-mode))
               (output
                (let ((default-directory dir))
@@ -17,9 +18,15 @@
               (found (cdr (assq 'workspace_root json))))
     (cons 'transient  found)))
 
+(defun distopico:eglot--managed-mode-hook ()
+  "Hooks for eglot managed-mode to disable `eglot-inlay-hints-mode'."
+  ;; Too noise for me
+  (eglot-inlay-hints-mode -1))
+
 ;; Hooks
 (add-hook 'rust-mode-hook #'distopico:rust-mode-hook)
 (add-hook 'project-find-functions #'distopico:try-cargo-toml)
+(add-hook 'eglot-managed-mode-hook #'distopico:eglot--managed-mode-hook)
 
 (provide 'conf-rust)
 ;;; conf-rust.el ends here