A bunch of changes (mostly for calc config)
This commit is contained in:
parent
45259861a1
commit
f019f4b243
63
init.el
63
init.el
@ -230,7 +230,7 @@ visual states."
|
|||||||
:predicate '((not magit-mode dired-mode
|
:predicate '((not magit-mode dired-mode
|
||||||
proced-mode mu4e-main-mode
|
proced-mode mu4e-main-mode
|
||||||
mu4e-view-mode mu4e-headers-mode
|
mu4e-view-mode mu4e-headers-mode
|
||||||
ibuffer-mode) t))
|
ibuffer-mode calc-mode calc-trail-mode) t))
|
||||||
(my/evil-avy-global-mode 1)
|
(my/evil-avy-global-mode 1)
|
||||||
:config
|
:config
|
||||||
(avy-setup-default))
|
(avy-setup-default))
|
||||||
@ -524,7 +524,8 @@ visual states."
|
|||||||
:init
|
:init
|
||||||
(setq lsp-completion-provider :none
|
(setq lsp-completion-provider :none
|
||||||
lsp-headerline-breadcrumb-enable nil
|
lsp-headerline-breadcrumb-enable nil
|
||||||
lsp-inlay-hint-enable nil)
|
lsp-inlay-hint-enable nil
|
||||||
|
lsp-signature-doc-lines 1)
|
||||||
(defun my/-setup-lsp-mode-buffer ()
|
(defun my/-setup-lsp-mode-buffer ()
|
||||||
"Called by `lsp-mode-hook' to setup lsp-mode buffers."
|
"Called by `lsp-mode-hook' to setup lsp-mode buffers."
|
||||||
(evil-define-key '(normal visual motion) 'local
|
(evil-define-key '(normal visual motion) 'local
|
||||||
@ -666,6 +667,64 @@ COMMAND and COMINT are like `compile'."
|
|||||||
(save-excursion (sly))))
|
(save-excursion (sly))))
|
||||||
(setq inferior-lisp-program "/usr/bin/sbcl"))
|
(setq inferior-lisp-program "/usr/bin/sbcl"))
|
||||||
|
|
||||||
|
;; calc
|
||||||
|
(use-package calc
|
||||||
|
:ensure nil
|
||||||
|
:bind (:map calc-mode-map
|
||||||
|
("M-<tab>" . calc-roll-up)
|
||||||
|
("M-TAB" . calc-roll-up))
|
||||||
|
:hook ((calc-mode calc-trail-mode) . my/setup-calc-calc-trail-mode)
|
||||||
|
:init
|
||||||
|
(defun my/setup-calc-calc-trail-mode ()
|
||||||
|
(setq-local doom-modeline-percent-position '()
|
||||||
|
truncate-partial-width-windows nil)
|
||||||
|
(visual-line-mode -1)
|
||||||
|
(display-line-numbers-mode -1)
|
||||||
|
(line-number-mode -1)
|
||||||
|
(column-number-mode -1)
|
||||||
|
(toggle-truncate-lines 1))
|
||||||
|
:config
|
||||||
|
(evil-define-key '(normal visual motion) calc-edit-mode-map
|
||||||
|
(kbd "RET") 'calc-edit-return
|
||||||
|
(kbd "<return>") 'calc-edit-return)
|
||||||
|
(defun my/-calc-float-mode-string ()
|
||||||
|
(cl-destructuring-bind (mode prec) calc-float-format
|
||||||
|
(concat
|
||||||
|
(upcase-initials (symbol-name mode))
|
||||||
|
(unless (zerop prec)
|
||||||
|
(concat ": " (number-to-string prec))))))
|
||||||
|
(doom-modeline-def-segment calc
|
||||||
|
"Display calculator icons and info.
|
||||||
|
Take directly from doom-modeline."
|
||||||
|
(concat
|
||||||
|
(doom-modeline-spc)
|
||||||
|
(when-let ((icon (doom-modeline-icon 'faicon "nf-fa-calculator" "🖩" "")))
|
||||||
|
(concat
|
||||||
|
(doom-modeline-display-icon icon)
|
||||||
|
(doom-modeline-vspc)))
|
||||||
|
(doom-modeline--buffer-simple-name)
|
||||||
|
(when (eq major-mode 'calc-mode)
|
||||||
|
(concat
|
||||||
|
(doom-modeline-spc)
|
||||||
|
(number-to-string calc-internal-prec)
|
||||||
|
(doom-modeline-spc)
|
||||||
|
(upcase-initials (symbol-name calc-angle-mode))
|
||||||
|
(doom-modeline-spc)
|
||||||
|
(my/-calc-float-mode-string)
|
||||||
|
(when calc-prefer-frac
|
||||||
|
(concat
|
||||||
|
(doom-modeline-spc)
|
||||||
|
"Frac"))
|
||||||
|
(cond
|
||||||
|
(calc-algebraic-mode
|
||||||
|
(concat
|
||||||
|
(doom-modeline-spc)
|
||||||
|
"Alg"))
|
||||||
|
(calc-incomplete-algebraic-mode
|
||||||
|
(concat
|
||||||
|
(doom-modeline-spc)
|
||||||
|
"IAlg"))))))))
|
||||||
|
|
||||||
;; vterm
|
;; vterm
|
||||||
(use-package vterm
|
(use-package vterm
|
||||||
:hook (vterm-mode . with-editor-export-editor)
|
:hook (vterm-mode . with-editor-export-editor)
|
||||||
|
Loading…
Reference in New Issue
Block a user