corfu and style tweaks

This commit is contained in:
Joe Ardent 2025-01-04 11:17:01 -08:00
parent b7657c3746
commit be00557604
7 changed files with 41 additions and 36 deletions

View file

@ -1,4 +1,3 @@
;; stand-in
(global-set-key [C-tab] #'other-window) (global-set-key [C-tab] #'other-window)
(global-set-key [C-S-tab] #'sother-window) (global-set-key [C-S-tab] #'sother-window)
(global-set-key [C-iso-lefttab] #'sother-window) (global-set-key [C-iso-lefttab] #'sother-window)
@ -9,9 +8,11 @@
(setq-default fill-column 100) (setq-default fill-column 100)
(turn-on-auto-fill) (turn-on-auto-fill)
(add-hook 'prog-mode-hook (lambda () (auto-fill-mode -1))) (add-hook 'prog-mode-hook (lambda () (auto-fill-mode -1)))
;;(define-key icomplete-fido-mode-map (kbd "SPC") 'self-insert-command)
(add-hook 'before-save-hook #'delete-trailing-whitespace) (add-hook 'before-save-hook #'delete-trailing-whitespace)
(fset 'yes-or-no-p 'y-or-n-p) (fset 'yes-or-no-p 'y-or-n-p)
(global-set-key (kbd "C-1")
"//-************************************************************************
//
//-************************************************************************")
(provide 'nebkor-personal) (provide 'nebkor-personal)

View file

@ -684,7 +684,7 @@ I have an ancient color scheme that's mostly inside the custom.el file, but I'd
proper theme some day. Until then... proper theme some day. Until then...
#+begin_src emacs-lisp :tangle "nebkor-modules/nebkor-theme.el" #+begin_src emacs-lisp :tangle "nebkor-modules/nebkor-theme.el"
(add-to-list 'default-frame-alist '(background-color . "snow")) ;;(add-to-list 'default-frame-alist '(background-color . "snow"))
#+end_src #+end_src
** The =nebkor-theme.el= section for highlighting lines (~lin~) ** The =nebkor-theme.el= section for highlighting lines (~lin~)
@ -876,7 +876,7 @@ Another section defines some complementary functionality
(setq fontaine-presets (setq fontaine-presets
'((small '((small
:default-family "Noto Sans" :default-family "Noto Sans Mono"
:default-height 130) :default-height 130)
(regular (regular
:default-height 130) :default-height 130)
@ -897,7 +897,7 @@ Another section defines some complementary functionality
;; I keep all properties for didactic purposes, but most can be ;; I keep all properties for didactic purposes, but most can be
;; omitted. See the fontaine manual for the technicalities: ;; omitted. See the fontaine manual for the technicalities:
;; <https://protesilaos.com/emacs/fontaine>. ;; <https://protesilaos.com/emacs/fontaine>.
:default-family "Noto Sans" :default-family "Noto Sans Mono"
:default-weight regular :default-weight regular
:default-slant normal :default-slant normal
:default-width normal :default-width normal
@ -1338,7 +1338,6 @@ process.
("M-w" . easy-kill)) ; re-map kill-ring-save ("M-w" . easy-kill)) ; re-map kill-ring-save
#+end_src #+end_src
** The =nebkor-essentials.el= section about auto management of treesit modules (~treesit-auto~) ** The =nebkor-essentials.el= section about auto management of treesit modules (~treesit-auto~)
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: h:C9748AB2-AEFB-46E7-A3AD-0910D9CB153A :CUSTOM_ID: h:C9748AB2-AEFB-46E7-A3AD-0910D9CB153A
@ -1347,10 +1346,7 @@ process.
:END: :END:
~treesit-auto~ automatically downloads and installs tree-sitter ~treesit-auto~ automatically downloads and installs tree-sitter
modules. Tree-sitter is amazing new tech that is built into Emacs from modules.
v29 onwards, and enables much better syntax highlighting and
code-navigation. I'll write more about tree-sitter in this section at
a later date.
#+begin_src emacs-lisp :tangle "nebkor-modules/nebkor-essentials.el" #+begin_src emacs-lisp :tangle "nebkor-modules/nebkor-essentials.el"
;;; Install and use tree-sitter major modes where possible ;;; Install and use tree-sitter major modes where possible
@ -1379,14 +1375,12 @@ designed for tree-sitter (Lisp seems to work regardless).
The package offers the ~expreg-expand~ and ~expreg-contract~ commands. The package offers the ~expreg-expand~ and ~expreg-contract~ commands.
#+end_quote #+end_quote
I expect ~expreg~ to eventually completely replace ~easy-kill~ ()
#+begin_src emacs-lisp :tangle "nebkor-modules/nebkor-essentials.el" #+begin_src emacs-lisp :tangle "nebkor-modules/nebkor-essentials.el"
;;; Mark syntactic constructs efficiently if tree-sitter is available (expreg) ;;; Mark syntactic constructs efficiently if tree-sitter is available (expreg)
(use-package expreg (use-package expreg
:ensure t :ensure t
:functions (prot/expreg-expand prot/expreg-expand-dwim) :functions (prot/expreg-expand prot/expreg-expand-dwim)
:bind ("C-M-SPC" . prot/expreg-expand-dwim) ; overrides `mark-sexp' :bind ("C-=" . prot/expreg-expand-dwim) ; overrides `mark-sexp'
:config :config
(defun prot/expreg-expand (n) (defun prot/expreg-expand (n)
"Expand to N syntactic units, defaulting to 1 if none is provided interactively." "Expand to N syntactic units, defaulting to 1 if none is provided interactively."
@ -2036,7 +2030,11 @@ Also see [[#h:567bb00f-1d82-4746-93e5-e0f60721728a][the =nebkor-completion.el= s
;; when it does not need to perform an indentation change. ;; when it does not need to perform an indentation change.
:bind (:map corfu-map ("<tab>" . corfu-complete)) :bind (:map corfu-map ("<tab>" . corfu-complete))
:config :config
(setq corfu-preview-current #'insert (setq corfu-auto t
corfu-auto-delay 0.3
corfu-auto-prefix 1
corfu-count 15
corfu-preview-current #'insert
corfu-min-width 20 corfu-min-width 20
corfu-preselect 'prompt corfu-preselect 'prompt
corfu-on-exact-match nil corfu-on-exact-match nil
@ -3514,8 +3512,6 @@ Finally, we ~provide~ the module.
:CUSTOM_ID: h:d799c3c0-bd6a-40bb-bd1a-ba4ea5367840 :CUSTOM_ID: h:d799c3c0-bd6a-40bb-bd1a-ba4ea5367840
:END: :END:
Watch these talks that I've given about Org:
Watch these talks by Prot: Watch these talks by Prot:
- [[https://protesilaos.com/codelog/2023-12-18-emacs-org-advanced-literate-conf/][Advanced literate configuration with Org]] (2023-12-18) - [[https://protesilaos.com/codelog/2023-12-18-emacs-org-advanced-literate-conf/][Advanced literate configuration with Org]] (2023-12-18)
@ -3602,8 +3598,8 @@ Org is far more capable, so I switched to it completely.
calendar-longitude 33.36) calendar-longitude 33.36)
(require 'cal-dst) (require 'cal-dst)
(setq calendar-standard-time-zone-name "+0200") (setq calendar-standard-time-zone-name "+0700")
(setq calendar-daylight-time-zone-name "+0300")) (setq calendar-daylight-time-zone-name "+0800"))
#+end_src #+end_src
** The =nebkor-org.el= section about appointment reminders (~appt~) ** The =nebkor-org.el= section about appointment reminders (~appt~)
@ -3644,7 +3640,7 @@ done at a specific time, such as coaching sessions ([[#h:f8f06938-0dfe-45c3-b4cf
appt-display-format nil appt-display-format nil
appt-display-mode-line t appt-display-mode-line t
appt-display-interval 3 appt-display-interval 3
appt-audible nil ; TODO 2023-01-25: t does nothing because I disable `ring-bell-function'? appt-audible nil
appt-warning-time-regexp "appt \\([0-9]+\\)" ; This is for the diary appt-warning-time-regexp "appt \\([0-9]+\\)" ; This is for the diary
appt-message-warning-time 6) appt-message-warning-time 6)
@ -4566,7 +4562,8 @@ title of the task, and the like. The documentation string of
(setq tab-always-indent 'complete) (setq tab-always-indent 'complete)
(setq tab-first-completion nil) (setq tab-first-completion nil)
(setq-default tab-width 4 (setq-default tab-width 4
indent-tabs-mode nil)) indent-tabs-mode nil)
(electric-pair-mode 1))
#+end_src #+end_src
** The =nebkor-langs.el= settings highlighting parens (~show-paren-mode~) ** The =nebkor-langs.el= settings highlighting parens (~show-paren-mode~)
@ -4975,7 +4972,8 @@ colors (you can use tree-sitter to do *syntactic* highlighting, but that's diffe
lsp-rust-analyzer-display-lifetime-elision-hints-use-parameter-names t lsp-rust-analyzer-display-lifetime-elision-hints-use-parameter-names t
lsp-rust-analyzer-display-closure-return-type-hints t lsp-rust-analyzer-display-closure-return-type-hints t
lsp-rust-analyzer-display-parameter-hints nil lsp-rust-analyzer-display-parameter-hints nil
lsp-rust-analyzer-display-reborrow-hints t) lsp-rust-analyzer-display-reborrow-hints t
read-process-output-max (* 1024 1024))
:hook :hook
( (
(lsp-mode . lsp-enable-which-key-integration) (lsp-mode . lsp-enable-which-key-integration)
@ -6590,7 +6588,6 @@ figure it out.
:END: :END:
#+begin_src emacs-lisp :tangle "custom-lisp/nebkor-personal.el" :mkdirp yes #+begin_src emacs-lisp :tangle "custom-lisp/nebkor-personal.el" :mkdirp yes
;; stand-in
(global-set-key [C-tab] #'other-window) (global-set-key [C-tab] #'other-window)
(global-set-key [C-S-tab] #'sother-window) (global-set-key [C-S-tab] #'sother-window)
(global-set-key [C-iso-lefttab] #'sother-window) (global-set-key [C-iso-lefttab] #'sother-window)
@ -6601,11 +6598,12 @@ figure it out.
(setq-default fill-column 100) (setq-default fill-column 100)
(turn-on-auto-fill) (turn-on-auto-fill)
(add-hook 'prog-mode-hook (lambda () (auto-fill-mode -1))) (add-hook 'prog-mode-hook (lambda () (auto-fill-mode -1)))
;;(define-key icomplete-fido-mode-map (kbd "SPC") 'self-insert-command)
(add-hook 'before-save-hook #'delete-trailing-whitespace) (add-hook 'before-save-hook #'delete-trailing-whitespace)
(fset 'yes-or-no-p 'y-or-n-p) (fset 'yes-or-no-p 'y-or-n-p)
(global-set-key (kbd "C-1")
"//-************************************************************************
//
//-************************************************************************")
#+end_src #+end_src
*** Finally, we provide the =nebkor-personal.el= module *** Finally, we provide the =nebkor-personal.el= module

View file

@ -194,7 +194,11 @@
;; when it does not need to perform an indentation change. ;; when it does not need to perform an indentation change.
:bind (:map corfu-map ("<tab>" . corfu-complete)) :bind (:map corfu-map ("<tab>" . corfu-complete))
:config :config
(setq corfu-preview-current #'insert (setq corfu-auto t
corfu-auto-delay 0.3
corfu-auto-prefix 1
corfu-count 15
corfu-preview-current #'insert
corfu-min-width 20 corfu-min-width 20
corfu-preselect 'prompt corfu-preselect 'prompt
corfu-on-exact-match nil corfu-on-exact-match nil

View file

@ -130,7 +130,7 @@
(use-package expreg (use-package expreg
:ensure t :ensure t
:functions (prot/expreg-expand prot/expreg-expand-dwim) :functions (prot/expreg-expand prot/expreg-expand-dwim)
:bind ("C-M-SPC" . prot/expreg-expand-dwim) ; overrides `mark-sexp' :bind ("C-=" . prot/expreg-expand-dwim) ; overrides `mark-sexp'
:config :config
(defun prot/expreg-expand (n) (defun prot/expreg-expand (n)
"Expand to N syntactic units, defaulting to 1 if none is provided interactively." "Expand to N syntactic units, defaulting to 1 if none is provided interactively."

View file

@ -6,7 +6,8 @@
(setq tab-always-indent 'complete) (setq tab-always-indent 'complete)
(setq tab-first-completion nil) (setq tab-first-completion nil)
(setq-default tab-width 4 (setq-default tab-width 4
indent-tabs-mode nil)) indent-tabs-mode nil)
(electric-pair-mode 1))
;;;; Parentheses (show-paren-mode) ;;;; Parentheses (show-paren-mode)
(use-package paren (use-package paren
@ -207,7 +208,8 @@
lsp-rust-analyzer-display-lifetime-elision-hints-use-parameter-names t lsp-rust-analyzer-display-lifetime-elision-hints-use-parameter-names t
lsp-rust-analyzer-display-closure-return-type-hints t lsp-rust-analyzer-display-closure-return-type-hints t
lsp-rust-analyzer-display-parameter-hints nil lsp-rust-analyzer-display-parameter-hints nil
lsp-rust-analyzer-display-reborrow-hints t) lsp-rust-analyzer-display-reborrow-hints t
read-process-output-max (* 1024 1024))
:hook :hook
( (
(lsp-mode . lsp-enable-which-key-integration) (lsp-mode . lsp-enable-which-key-integration)

View file

@ -18,8 +18,8 @@
calendar-longitude 33.36) calendar-longitude 33.36)
(require 'cal-dst) (require 'cal-dst)
(setq calendar-standard-time-zone-name "+0200") (setq calendar-standard-time-zone-name "+0700")
(setq calendar-daylight-time-zone-name "+0300")) (setq calendar-daylight-time-zone-name "+0800"))
;;; Appt (appointment reminders which also integrate with Org agenda) ;;; Appt (appointment reminders which also integrate with Org agenda)
(use-package appt (use-package appt
@ -30,7 +30,7 @@
appt-display-format nil appt-display-format nil
appt-display-mode-line t appt-display-mode-line t
appt-display-interval 3 appt-display-interval 3
appt-audible nil ; TODO 2023-01-25: t does nothing because I disable `ring-bell-function'? appt-audible nil
appt-warning-time-regexp "appt \\([0-9]+\\)" ; This is for the diary appt-warning-time-regexp "appt \\([0-9]+\\)" ; This is for the diary
appt-message-warning-time 6) appt-message-warning-time 6)

View file

@ -1,6 +1,6 @@
;;; Everything related to the look of Emacs ;;; Everything related to the look of Emacs
(add-to-list 'default-frame-alist '(background-color . "snow")) ;;(add-to-list 'default-frame-alist '(background-color . "snow"))
;;;; Lin ;;;; Lin
;; Read the lin manual: <https://protesilaos.com/emacs/lin>. ;; Read the lin manual: <https://protesilaos.com/emacs/lin>.
@ -101,7 +101,7 @@
(setq fontaine-presets (setq fontaine-presets
'((small '((small
:default-family "Noto Sans" :default-family "Noto Sans Mono"
:default-height 130) :default-height 130)
(regular (regular
:default-height 130) :default-height 130)
@ -122,7 +122,7 @@
;; I keep all properties for didactic purposes, but most can be ;; I keep all properties for didactic purposes, but most can be
;; omitted. See the fontaine manual for the technicalities: ;; omitted. See the fontaine manual for the technicalities:
;; <https://protesilaos.com/emacs/fontaine>. ;; <https://protesilaos.com/emacs/fontaine>.
:default-family "Noto Sans" :default-family "Noto Sans Mono"
:default-weight regular :default-weight regular
:default-slant normal :default-slant normal
:default-width normal :default-width normal