From 2d8253100b2ceee407743f197901f722eb232ead Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Thu, 30 Nov 2023 13:44:48 +0000 Subject: [PATCH] Make fill-column setting language-specific Add consult-info bind --- home/emacs/init.el | 11 ++++++++--- home/emacs/init.org | 14 +++++++++++--- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/home/emacs/init.el b/home/emacs/init.el index 4bf51c5b..c74d596f 100644 --- a/home/emacs/init.el +++ b/home/emacs/init.el @@ -11,7 +11,6 @@ global-auto-revert-non-file-buffers t dired-auto-revert-buffer t dired-dwim-target t - fill-column 79 tab-always-indent 'complete completion-cycle-threshold 3 completions-detailed t @@ -101,7 +100,6 @@ ("C-c j l" . avy-goto-line))) (setq use-dialog-box nil - fill-column 80 truncate-lines nil truncate-partial-width-windows nil) @@ -460,7 +458,6 @@ :hook ((nix-mode fortran-mode shell-script-mode - markdown-mode lua-mode python-mode python-ts-mode @@ -558,6 +555,7 @@ ("C-c s f" . consult-fd) ("C-c s g" . consult-ripgrep) ("C-c s e" . consult-flymake) + ("C-c s i" . consult-info) ("C-c s t" . consult-theme) :map minibuffer-local-map ("C-r" . consult-history)) @@ -608,6 +606,13 @@ lisp-data-mode rust-mode)) +(defun my/enable-fill-column (col) + "Set and enable fill column" + (set-fill-column col) + (display-fill-column-indicator-mode +1)) + +(add-hook 'python-mode-hook (lambda () (my/enable-fill-column 88))) + (setq gnus-select-method '(nnrss "http://www.fsf.org/static/fsforg/rss/news.xml")) (setq sendmail-program (executable-find "msmtp") diff --git a/home/emacs/init.org b/home/emacs/init.org index 84722f20..18a6e2ef 100644 --- a/home/emacs/init.org +++ b/home/emacs/init.org @@ -19,7 +19,6 @@ global-auto-revert-non-file-buffers t dired-auto-revert-buffer t dired-dwim-target t - fill-column 79 tab-always-indent 'complete completion-cycle-threshold 3 completions-detailed t @@ -131,7 +130,6 @@ * UI #+begin_src emacs-lisp (setq use-dialog-box nil - fill-column 80 truncate-lines nil truncate-partial-width-windows nil) @@ -551,7 +549,6 @@ For reference information, see [[https://orgmode.com][Org-mode website]] :hook ((nix-mode fortran-mode shell-script-mode - markdown-mode lua-mode python-mode python-ts-mode @@ -672,6 +669,7 @@ For reference information, see [[https://orgmode.com][Org-mode website]] ("C-c s f" . consult-fd) ("C-c s g" . consult-ripgrep) ("C-c s e" . consult-flymake) + ("C-c s i" . consult-info) ("C-c s t" . consult-theme) :map minibuffer-local-map ("C-r" . consult-history)) @@ -729,7 +727,17 @@ For reference information, see [[https://orgmode.com][Org-mode website]] lisp-data-mode rust-mode)) #+end_src +** Language-specific settings +*** Python +Set fill column to 88 and enable display in python buffers +#+begin_src emacs-lisp :tangle yes + (defun my/enable-fill-column (col) + "Set and enable fill column" + (set-fill-column col) + (display-fill-column-indicator-mode +1)) + (add-hook 'python-mode-hook (lambda () (my/enable-fill-column 88))) +#+end_src * Internet ** TODO Gnus