Set fill-column for doom configuration to 80
This commit is contained in:
parent
8a588cbd4c
commit
61b4dd0437
1
.dir-locals.el
Normal file
1
.dir-locals.el
Normal file
@ -0,0 +1 @@
|
|||||||
|
((nil . ((fill-column . 80))))
|
48
config.el
48
config.el
@ -35,12 +35,11 @@
|
|||||||
(setq doom-theme 'doom-one)
|
(setq doom-theme 'doom-one)
|
||||||
(add-hook 'doom-load-theme-hook
|
(add-hook 'doom-load-theme-hook
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(progn
|
(set-face-attribute 'font-lock-constant-face nil :weight 'bold)
|
||||||
(set-face-attribute 'font-lock-constant-face nil :weight 'bold)
|
(set-face-attribute 'font-lock-function-name-face nil :weight 'bold)
|
||||||
(set-face-attribute 'font-lock-function-name-face nil :weight 'bold)
|
(set-face-attribute 'font-lock-keyword-face nil :weight 'bold)
|
||||||
(set-face-attribute 'font-lock-keyword-face nil :weight 'bold)
|
(set-face-attribute 'font-lock-type-face nil :weight 'bold)
|
||||||
(set-face-attribute 'font-lock-type-face nil :weight 'bold)
|
(set-face-attribute 'show-paren-match nil :background nil)))
|
||||||
(set-face-attribute 'show-paren-match nil :background nil))))
|
|
||||||
(after! whitespace (set-face-attribute 'whitespace-line nil :background nil))
|
(after! whitespace (set-face-attribute 'whitespace-line nil :background nil))
|
||||||
|
|
||||||
;; This determines the style of line numbers in effect. If set to `nil', line
|
;; This determines the style of line numbers in effect. If set to `nil', line
|
||||||
@ -95,7 +94,8 @@
|
|||||||
(delete org-agenda-section +doom-dashboard-menu-sections))
|
(delete org-agenda-section +doom-dashboard-menu-sections))
|
||||||
|
|
||||||
;; Remove the silly doom newline advice.
|
;; Remove the silly doom newline advice.
|
||||||
(advice-remove 'newline-and-indent #'+default--newline-indent-and-continue-comments-a)
|
(advice-remove 'newline-and-indent
|
||||||
|
#'+default--newline-indent-and-continue-comments-a)
|
||||||
|
|
||||||
;; I actually like it when Emacs recenters the screen while scrolling. This may
|
;; I actually like it when Emacs recenters the screen while scrolling. This may
|
||||||
;; be an issue in large files. When that becomes an issue add an exception here.
|
;; be an issue in large files. When that becomes an issue add an exception here.
|
||||||
@ -113,23 +113,25 @@
|
|||||||
;; -----------------------------------------------------------------------------
|
;; -----------------------------------------------------------------------------
|
||||||
|
|
||||||
;; Always open magit in other window.
|
;; Always open magit in other window.
|
||||||
(after! magit (setq magit-display-buffer-function #'magit-display-buffer-traditional))
|
(after! magit
|
||||||
|
(setq magit-display-buffer-function #'magit-display-buffer-traditional))
|
||||||
|
|
||||||
;; Don't use the LSP formatter.
|
;; Don't use the LSP formatter.
|
||||||
(after! lsp (setq +format-with-lsp nil))
|
(after! lsp (setq +format-with-lsp nil))
|
||||||
|
|
||||||
;; Python virtualenv configuration.
|
;; Python virtualenv configuration.
|
||||||
(after! lsp-pyright (setq lsp-pyright-venv-path (concat (getenv "HOME") "/.virtualenvs")))
|
(after! lsp-pyright
|
||||||
|
(setq lsp-pyright-venv-path (concat (getenv "HOME") "/.virtualenvs")))
|
||||||
|
|
||||||
;; Rainbow delimiters in all prog-mode buffers.
|
;; Rainbow delimiters in all prog-mode buffers.
|
||||||
(add-hook! prog-mode #'rainbow-delimiters-mode-enable)
|
(add-hook! prog-mode #'rainbow-delimiters-mode-enable)
|
||||||
|
|
||||||
;; Make TRAMP easier to use for sudo on remote hosts.
|
;; Make TRAMP easier to use for sudo on remote hosts.
|
||||||
(after! tramp
|
(after! tramp
|
||||||
;; This line proxies all sudo connections via an ssh connection to the provided hostname.
|
;; Proxy all sudo connections via an ssh connection to the provided hostname.
|
||||||
(add-to-list 'tramp-default-proxies-alist '(nil "\\`root\\'" "/ssh:%h:"))
|
(add-to-list 'tramp-default-proxies-alist '(nil "\\`root\\'" "/ssh:%h:"))
|
||||||
;; This rule is an exception to the above so that local sudo does not proxy via ssh. This has to
|
;; This rule is an exception to the above so that local sudo does not proxy
|
||||||
;; be added last so that it is the first element of the list.
|
;; via ssh. This has to be added last so that it is the first element.
|
||||||
(add-to-list 'tramp-default-proxies-alist '("localhost" "\\`root\\'" nil)))
|
(add-to-list 'tramp-default-proxies-alist '("localhost" "\\`root\\'" nil)))
|
||||||
|
|
||||||
;; Extra VTerm configuration.
|
;; Extra VTerm configuration.
|
||||||
@ -200,9 +202,12 @@
|
|||||||
;; Always indent. Why would I ever want to insert a tab?
|
;; Always indent. Why would I ever want to insert a tab?
|
||||||
tab-always-indent t
|
tab-always-indent t
|
||||||
;; Default indentation size - applies even when indent-tabs-mode is nil.
|
;; Default indentation size - applies even when indent-tabs-mode is nil.
|
||||||
tab-width 8
|
tab-width 8)
|
||||||
;; Highlight lines that are too long in whitespace mode.
|
|
||||||
whitespace-line-column fill-column)
|
;; Highlight lines that are too long in whitespace mode. We set this with a hook
|
||||||
|
;; after local variables as fill-column is often set through dir-locals.
|
||||||
|
(add-hook 'hack-local-variables-hook
|
||||||
|
(lambda () (setq-local whitespace-line-column fill-column)))
|
||||||
|
|
||||||
;; CamelCase as separate words.
|
;; CamelCase as separate words.
|
||||||
(global-subword-mode +1)
|
(global-subword-mode +1)
|
||||||
@ -210,9 +215,9 @@
|
|||||||
;; Doom emacs recommends `visual-line-mode' as it claims wrapping is expensive.
|
;; Doom emacs recommends `visual-line-mode' as it claims wrapping is expensive.
|
||||||
(global-visual-line-mode +1)
|
(global-visual-line-mode +1)
|
||||||
|
|
||||||
;; But "C-e" behaves differently in `visual-line-mode' than when they are
|
;; But "C-e" behaves differently in `visual-line-mode' than when wrapping. It
|
||||||
;; wrapped. It goes to the end of the visual line, not the logical line. This
|
;; goes to the end of the visual line, not the logical line. This can be fixed
|
||||||
;; can be fixed by defining the following aliases.
|
;; by defining the following aliases.
|
||||||
(defalias #'end-of-visual-line #'end-of-line)
|
(defalias #'end-of-visual-line #'end-of-line)
|
||||||
(defalias #'beginning-of-visual-line #'beginning-of-line)
|
(defalias #'beginning-of-visual-line #'beginning-of-line)
|
||||||
|
|
||||||
@ -245,9 +250,10 @@
|
|||||||
"M-o" #'other-window
|
"M-o" #'other-window
|
||||||
"C-x o" #'other-popup
|
"C-x o" #'other-popup
|
||||||
;; Kill current buffer without prompting.
|
;; Kill current buffer without prompting.
|
||||||
:desc "kill-buffer" "C-x k" (lambda ()
|
:desc "kill-buffer"
|
||||||
(interactive)
|
"C-x k" (lambda ()
|
||||||
(let (kill-buffer-query-functions) (kill-buffer)))
|
(interactive)
|
||||||
|
(let (kill-buffer-query-functions) (kill-buffer)))
|
||||||
;; Scroll up/down, but keep point in place.
|
;; Scroll up/down, but keep point in place.
|
||||||
"C-<" (lambda()
|
"C-<" (lambda()
|
||||||
(interactive)
|
(interactive)
|
||||||
|
22
init.el
22
init.el
@ -41,7 +41,7 @@
|
|||||||
;;nav-flash ; blink cursor line after big motions
|
;;nav-flash ; blink cursor line after big motions
|
||||||
;;neotree ; a project drawer, like NERDTree for vim
|
;;neotree ; a project drawer, like NERDTree for vim
|
||||||
ophints ; highlight the region an operation acts on
|
ophints ; highlight the region an operation acts on
|
||||||
(popup +defaults) ; tame sudden yet inevitable temporary windows
|
(popup +defaults) ; tame sudden yet inevitable temporary windows
|
||||||
;;tabs ; a tab bar for Emacs
|
;;tabs ; a tab bar for Emacs
|
||||||
;;treemacs ; a project drawer, like neotree but cooler
|
;;treemacs ; a project drawer, like neotree but cooler
|
||||||
;;unicode ; extended unicode support for various languages
|
;;unicode ; extended unicode support for various languages
|
||||||
@ -55,7 +55,7 @@
|
|||||||
;;(evil +everywhere); come to the dark side, we have cookies
|
;;(evil +everywhere); come to the dark side, we have cookies
|
||||||
file-templates ; auto-snippets for empty files
|
file-templates ; auto-snippets for empty files
|
||||||
fold ; (nigh) universal code folding
|
fold ; (nigh) universal code folding
|
||||||
format ; automated prettiness
|
format ; automated prettiness
|
||||||
;;god ; run Emacs commands without modifier keys
|
;;god ; run Emacs commands without modifier keys
|
||||||
;;lispy ; vim for lisp, for people who don't like vim
|
;;lispy ; vim for lisp, for people who don't like vim
|
||||||
;;multiple-cursors ; editing in many places at once
|
;;multiple-cursors ; editing in many places at once
|
||||||
@ -68,8 +68,8 @@
|
|||||||
:emacs
|
:emacs
|
||||||
dired ; making dired pretty [functional]
|
dired ; making dired pretty [functional]
|
||||||
electric ; smarter, keyword-based electric-indent
|
electric ; smarter, keyword-based electric-indent
|
||||||
(ibuffer +icons) ; interactive buffer management
|
(ibuffer +icons) ; interactive buffer management
|
||||||
(undo +tree) ; persistent, smarter undo for your inevitable mistakes
|
(undo +tree) ; persistent, smarter undo for your inevitable mistakes
|
||||||
vc ; version-control and Emacs, sitting in a tree
|
vc ; version-control and Emacs, sitting in a tree
|
||||||
|
|
||||||
:term
|
:term
|
||||||
@ -79,7 +79,7 @@
|
|||||||
vterm ; the best terminal emulation in Emacs
|
vterm ; the best terminal emulation in Emacs
|
||||||
|
|
||||||
:checkers
|
:checkers
|
||||||
syntax ; tasing you for every semicolon you forget
|
syntax ; tasing you for every semicolon you forget
|
||||||
;;(spell +flyspell) ; tasing you for misspelling mispelling
|
;;(spell +flyspell) ; tasing you for misspelling mispelling
|
||||||
;;grammar ; tasing grammar mistake every you make
|
;;grammar ; tasing grammar mistake every you make
|
||||||
|
|
||||||
@ -91,9 +91,9 @@
|
|||||||
;;docker
|
;;docker
|
||||||
;;editorconfig ; let someone else argue about tabs vs spaces
|
;;editorconfig ; let someone else argue about tabs vs spaces
|
||||||
;;ein ; tame Jupyter notebooks with emacs
|
;;ein ; tame Jupyter notebooks with emacs
|
||||||
(eval +overlay) ; run code, run (also, repls)
|
(eval +overlay) ; run code, run (also, repls)
|
||||||
;;gist ; interacting with github gists
|
;;gist ; interacting with github gists
|
||||||
lookup ; navigate your code and its documentation
|
lookup ; navigate your code and its documentation
|
||||||
lsp ; M-x vscode
|
lsp ; M-x vscode
|
||||||
magit ; a git porcelain for Emacs
|
magit ; a git porcelain for Emacs
|
||||||
;;make ; run make tasks from Emacs
|
;;make ; run make tasks from Emacs
|
||||||
@ -107,7 +107,7 @@
|
|||||||
;;upload ; map local to remote projects via ssh/ftp
|
;;upload ; map local to remote projects via ssh/ftp
|
||||||
|
|
||||||
:os
|
:os
|
||||||
(:if IS-MAC macos) ; improve compatibility with macOS
|
(:if IS-MAC macos); improve compatibility with macOS
|
||||||
;;tty ; improve the terminal Emacs experience
|
;;tty ; improve the terminal Emacs experience
|
||||||
|
|
||||||
:lang
|
:lang
|
||||||
@ -143,7 +143,7 @@
|
|||||||
;;javascript ; all(hope(abandon(ye(who(enter(here))))))
|
;;javascript ; all(hope(abandon(ye(who(enter(here))))))
|
||||||
;;julia ; a better, faster MATLAB
|
;;julia ; a better, faster MATLAB
|
||||||
;;kotlin ; a better, slicker Java(Script)
|
;;kotlin ; a better, slicker Java(Script)
|
||||||
(latex +latexmk) ; writing papers in Emacs has never been so fun
|
(latex +latexmk) ; writing papers in Emacs has never been so fun
|
||||||
;;lean ; for folks with too much to prove
|
;;lean ; for folks with too much to prove
|
||||||
;;ledger ; be audit you can be
|
;;ledger ; be audit you can be
|
||||||
;;lua ; one-based indices? one-based indices
|
;;lua ; one-based indices? one-based indices
|
||||||
@ -155,14 +155,14 @@
|
|||||||
;;php ; perl's insecure younger brother
|
;;php ; perl's insecure younger brother
|
||||||
;;plantuml ; diagrams for confusing people more
|
;;plantuml ; diagrams for confusing people more
|
||||||
;;purescript ; javascript, but functional
|
;;purescript ; javascript, but functional
|
||||||
(python +lsp +pyright) ; beautiful is better than ugly
|
(python +lsp +pyright); beautiful is better than ugly
|
||||||
;;qt ; the 'cutest' gui framework ever
|
;;qt ; the 'cutest' gui framework ever
|
||||||
;;racket ; a DSL for DSLs
|
;;racket ; a DSL for DSLs
|
||||||
;;raku ; the artist formerly known as perl6
|
;;raku ; the artist formerly known as perl6
|
||||||
;;rest ; Emacs as a REST client
|
;;rest ; Emacs as a REST client
|
||||||
;;rst ; ReST in peace
|
;;rst ; ReST in peace
|
||||||
;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"}
|
;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"}
|
||||||
(rust +lsp) ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
|
(rust +lsp) ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
|
||||||
;;scala ; java, but good
|
;;scala ; java, but good
|
||||||
;;(scheme +guile) ; a fully conniving family of lisps
|
;;(scheme +guile) ; a fully conniving family of lisps
|
||||||
sh ; she sells {ba,z,fi}sh shells on the C xor
|
sh ; she sells {ba,z,fi}sh shells on the C xor
|
||||||
|
@ -18,9 +18,11 @@ This module provides a terminal emulator powered by libvterm.
|
|||||||
The following commands are available to open it:
|
The following commands are available to open it:
|
||||||
|
|
||||||
+ ~+vterm/other-window~ (=C-c o t=): Opens vterm in other window
|
+ ~+vterm/other-window~ (=C-c o t=): Opens vterm in other window
|
||||||
+ ~+vterm/project/other-window~ (=C-c o p=): Opens vterm in the current project in other window
|
+ ~+vterm/project/other-window~ (=C-c o p=): Opens vterm in the current project
|
||||||
|
in other window
|
||||||
+ ~+vterm/here~ (=C-c o T=): Opens vterm in the current window
|
+ ~+vterm/here~ (=C-c o T=): Opens vterm in the current window
|
||||||
+ ~+vterm/project/here~ (=C-c o P=): Opens vterm in the current project in the current window
|
+ ~+vterm/project/here~ (=C-c o P=): Opens vterm in the current project in the
|
||||||
|
current window
|
||||||
|
|
||||||
These commands will first try to find an existing suitable vterm buffer and open
|
These commands will first try to find an existing suitable vterm buffer and open
|
||||||
it. If one does not exist, they will create a new one. If the current buffer is
|
it. If one does not exist, they will create a new one. If the current buffer is
|
||||||
|
@ -35,7 +35,8 @@ If current buffer is not in vterm-mode:
|
|||||||
|
|
||||||
Returns the vterm buffer"
|
Returns the vterm buffer"
|
||||||
(unless (fboundp 'module-load)
|
(unless (fboundp 'module-load)
|
||||||
(user-error "Your build of Emacs lacks dynamic modules support and cannot load vterm"))
|
(user-error
|
||||||
|
"Your build of Emacs lacks dynamic modules support and cannot load vterm"))
|
||||||
(let ((vterm-buffer-name (+vterm--buffer-name)))
|
(let ((vterm-buffer-name (+vterm--buffer-name)))
|
||||||
(if (string= major-mode "vterm-mode")
|
(if (string= major-mode "vterm-mode")
|
||||||
(funcall spawn-fn vterm-buffer-name)
|
(funcall spawn-fn vterm-buffer-name)
|
||||||
@ -45,17 +46,20 @@ Returns the vterm buffer"
|
|||||||
(funcall spawn-fn vterm-buffer-name))))))
|
(funcall spawn-fn vterm-buffer-name))))))
|
||||||
|
|
||||||
(defun +vterm--spawn-or-switch-with-project (spawn-fn switch-fn)
|
(defun +vterm--spawn-or-switch-with-project (spawn-fn switch-fn)
|
||||||
"Open using `spawn-fn' or switch to active vterm using `switch-fn' in a project.
|
"Open with `spawn-fn' or switch to active vterm with `switch-fn' in a project.
|
||||||
|
|
||||||
Returns the vterm buffer"
|
Returns the vterm buffer"
|
||||||
(let ((project-root (doom-project-root)))
|
(let ((project-root (doom-project-root)))
|
||||||
(unless project-root
|
(unless project-root
|
||||||
(user-error "vterm/project/* cannot find a project, because you are not in a project"))
|
(user-error
|
||||||
|
"vterm/project cannot find a project, because you are not in a project"))
|
||||||
(let ((default-directory project-root))
|
(let ((default-directory project-root))
|
||||||
(+vterm--spawn-or-switch spawn-fn switch-fn))))
|
(+vterm--spawn-or-switch spawn-fn switch-fn))))
|
||||||
|
|
||||||
(defun +vterm--other-window (other-window-fn current-window-fn)
|
(defun +vterm--other-window (other-window-fn current-window-fn)
|
||||||
"Open or switch using `other-window-fn' unless current buffer is doom-dashboard.
|
"Open or switch with `other-window-fn'.
|
||||||
|
|
||||||
|
Unless current buffer is doom-dashboard.
|
||||||
|
|
||||||
Returns the vterm buffer."
|
Returns the vterm buffer."
|
||||||
(if (equal major-mode #'+doom-dashboard-mode)
|
(if (equal major-mode #'+doom-dashboard-mode)
|
||||||
@ -73,12 +77,13 @@ buffer is the doom-dashboard, vterm opens in the current window.
|
|||||||
|
|
||||||
Returns the vterm buffer."
|
Returns the vterm buffer."
|
||||||
(interactive)
|
(interactive)
|
||||||
(+vterm--other-window (lambda ()
|
(+vterm--other-window
|
||||||
(+vterm--spawn-or-switch #'vterm-other-window
|
(lambda ()
|
||||||
#'switch-to-buffer-other-window))
|
(+vterm--spawn-or-switch #'vterm-other-window
|
||||||
(lambda ()
|
#'switch-to-buffer-other-window))
|
||||||
(+vterm--spawn-or-switch #'+vterm--vterm
|
(lambda ()
|
||||||
#'switch-to-buffer))))
|
(+vterm--spawn-or-switch #'+vterm--vterm
|
||||||
|
#'switch-to-buffer))))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun +vterm/project/other-window ()
|
(defun +vterm/project/other-window ()
|
||||||
@ -91,12 +96,13 @@ buffer is the doom-dashboard, vterm opens in the current window.
|
|||||||
|
|
||||||
Returns the vterm buffer."
|
Returns the vterm buffer."
|
||||||
(interactive)
|
(interactive)
|
||||||
(+vterm--other-window (lambda ()
|
(+vterm--other-window
|
||||||
(+vterm--spawn-or-switch-with-project #'vterm-other-window
|
(lambda ()
|
||||||
#'switch-to-buffer-other-window))
|
(+vterm--spawn-or-switch-with-project #'vterm-other-window
|
||||||
(lambda ()
|
#'switch-to-buffer-other-window))
|
||||||
(+vterm--spawn-or-switch-with-project #'+vterm--window
|
(lambda ()
|
||||||
#'switch-to-buffer))))
|
(+vterm--spawn-or-switch-with-project #'+vterm--window
|
||||||
|
#'switch-to-buffer))))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun +vterm/here ()
|
(defun +vterm/here ()
|
||||||
|
Loading…
Reference in New Issue
Block a user