corfu and style tweaks
This commit is contained in:
parent
b7657c3746
commit
be00557604
7 changed files with 41 additions and 36 deletions
|
@ -1,4 +1,3 @@
|
|||
;; stand-in
|
||||
(global-set-key [C-tab] #'other-window)
|
||||
(global-set-key [C-S-tab] #'sother-window)
|
||||
(global-set-key [C-iso-lefttab] #'sother-window)
|
||||
|
@ -9,9 +8,11 @@
|
|||
(setq-default fill-column 100)
|
||||
(turn-on-auto-fill)
|
||||
(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)
|
||||
(fset 'yes-or-no-p 'y-or-n-p)
|
||||
(global-set-key (kbd "C-1")
|
||||
"//-************************************************************************
|
||||
//
|
||||
//-************************************************************************")
|
||||
|
||||
(provide 'nebkor-personal)
|
||||
|
|
|
@ -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...
|
||||
|
||||
#+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
|
||||
|
||||
** The =nebkor-theme.el= section for highlighting lines (~lin~)
|
||||
|
@ -876,7 +876,7 @@ Another section defines some complementary functionality
|
|||
|
||||
(setq fontaine-presets
|
||||
'((small
|
||||
:default-family "Noto Sans"
|
||||
:default-family "Noto Sans Mono"
|
||||
:default-height 130)
|
||||
(regular
|
||||
:default-height 130)
|
||||
|
@ -897,7 +897,7 @@ Another section defines some complementary functionality
|
|||
;; I keep all properties for didactic purposes, but most can be
|
||||
;; omitted. See the fontaine manual for the technicalities:
|
||||
;; <https://protesilaos.com/emacs/fontaine>.
|
||||
:default-family "Noto Sans"
|
||||
:default-family "Noto Sans Mono"
|
||||
:default-weight regular
|
||||
:default-slant normal
|
||||
:default-width normal
|
||||
|
@ -1338,7 +1338,6 @@ process.
|
|||
("M-w" . easy-kill)) ; re-map kill-ring-save
|
||||
#+end_src
|
||||
|
||||
|
||||
** The =nebkor-essentials.el= section about auto management of treesit modules (~treesit-auto~)
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: h:C9748AB2-AEFB-46E7-A3AD-0910D9CB153A
|
||||
|
@ -1347,10 +1346,7 @@ process.
|
|||
:END:
|
||||
|
||||
~treesit-auto~ automatically downloads and installs tree-sitter
|
||||
modules. Tree-sitter is amazing new tech that is built into Emacs from
|
||||
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.
|
||||
modules.
|
||||
|
||||
#+begin_src emacs-lisp :tangle "nebkor-modules/nebkor-essentials.el"
|
||||
;;; 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.
|
||||
#+end_quote
|
||||
|
||||
I expect ~expreg~ to eventually completely replace ~easy-kill~ ()
|
||||
|
||||
#+begin_src emacs-lisp :tangle "nebkor-modules/nebkor-essentials.el"
|
||||
;;; Mark syntactic constructs efficiently if tree-sitter is available (expreg)
|
||||
(use-package expreg
|
||||
:ensure t
|
||||
: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
|
||||
(defun prot/expreg-expand (n)
|
||||
"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.
|
||||
:bind (:map corfu-map ("<tab>" . corfu-complete))
|
||||
: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-preselect 'prompt
|
||||
corfu-on-exact-match nil
|
||||
|
@ -3514,8 +3512,6 @@ Finally, we ~provide~ the module.
|
|||
:CUSTOM_ID: h:d799c3c0-bd6a-40bb-bd1a-ba4ea5367840
|
||||
:END:
|
||||
|
||||
Watch these talks that I've given about Org:
|
||||
|
||||
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)
|
||||
|
@ -3602,8 +3598,8 @@ Org is far more capable, so I switched to it completely.
|
|||
calendar-longitude 33.36)
|
||||
|
||||
(require 'cal-dst)
|
||||
(setq calendar-standard-time-zone-name "+0200")
|
||||
(setq calendar-daylight-time-zone-name "+0300"))
|
||||
(setq calendar-standard-time-zone-name "+0700")
|
||||
(setq calendar-daylight-time-zone-name "+0800"))
|
||||
#+end_src
|
||||
|
||||
** 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-mode-line t
|
||||
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-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-first-completion nil)
|
||||
(setq-default tab-width 4
|
||||
indent-tabs-mode nil))
|
||||
indent-tabs-mode nil)
|
||||
(electric-pair-mode 1))
|
||||
#+end_src
|
||||
|
||||
** 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-closure-return-type-hints t
|
||||
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
|
||||
(
|
||||
(lsp-mode . lsp-enable-which-key-integration)
|
||||
|
@ -6590,7 +6588,6 @@ figure it out.
|
|||
:END:
|
||||
|
||||
#+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-S-tab] #'sother-window)
|
||||
(global-set-key [C-iso-lefttab] #'sother-window)
|
||||
|
@ -6601,11 +6598,12 @@ figure it out.
|
|||
(setq-default fill-column 100)
|
||||
(turn-on-auto-fill)
|
||||
(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)
|
||||
(fset 'yes-or-no-p 'y-or-n-p)
|
||||
|
||||
(global-set-key (kbd "C-1")
|
||||
"//-************************************************************************
|
||||
//
|
||||
//-************************************************************************")
|
||||
#+end_src
|
||||
|
||||
*** Finally, we provide the =nebkor-personal.el= module
|
||||
|
|
|
@ -194,7 +194,11 @@
|
|||
;; when it does not need to perform an indentation change.
|
||||
:bind (:map corfu-map ("<tab>" . corfu-complete))
|
||||
: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-preselect 'prompt
|
||||
corfu-on-exact-match nil
|
||||
|
|
|
@ -130,7 +130,7 @@
|
|||
(use-package expreg
|
||||
:ensure t
|
||||
: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
|
||||
(defun prot/expreg-expand (n)
|
||||
"Expand to N syntactic units, defaulting to 1 if none is provided interactively."
|
||||
|
|
|
@ -6,7 +6,8 @@
|
|||
(setq tab-always-indent 'complete)
|
||||
(setq tab-first-completion nil)
|
||||
(setq-default tab-width 4
|
||||
indent-tabs-mode nil))
|
||||
indent-tabs-mode nil)
|
||||
(electric-pair-mode 1))
|
||||
|
||||
;;;; Parentheses (show-paren-mode)
|
||||
(use-package paren
|
||||
|
@ -207,7 +208,8 @@
|
|||
lsp-rust-analyzer-display-lifetime-elision-hints-use-parameter-names t
|
||||
lsp-rust-analyzer-display-closure-return-type-hints t
|
||||
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
|
||||
(
|
||||
(lsp-mode . lsp-enable-which-key-integration)
|
||||
|
|
|
@ -18,8 +18,8 @@
|
|||
calendar-longitude 33.36)
|
||||
|
||||
(require 'cal-dst)
|
||||
(setq calendar-standard-time-zone-name "+0200")
|
||||
(setq calendar-daylight-time-zone-name "+0300"))
|
||||
(setq calendar-standard-time-zone-name "+0700")
|
||||
(setq calendar-daylight-time-zone-name "+0800"))
|
||||
|
||||
;;; Appt (appointment reminders which also integrate with Org agenda)
|
||||
(use-package appt
|
||||
|
@ -30,7 +30,7 @@
|
|||
appt-display-format nil
|
||||
appt-display-mode-line t
|
||||
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-message-warning-time 6)
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;; 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
|
||||
;; Read the lin manual: <https://protesilaos.com/emacs/lin>.
|
||||
|
@ -101,7 +101,7 @@
|
|||
|
||||
(setq fontaine-presets
|
||||
'((small
|
||||
:default-family "Noto Sans"
|
||||
:default-family "Noto Sans Mono"
|
||||
:default-height 130)
|
||||
(regular
|
||||
:default-height 130)
|
||||
|
@ -122,7 +122,7 @@
|
|||
;; I keep all properties for didactic purposes, but most can be
|
||||
;; omitted. See the fontaine manual for the technicalities:
|
||||
;; <https://protesilaos.com/emacs/fontaine>.
|
||||
:default-family "Noto Sans"
|
||||
:default-family "Noto Sans Mono"
|
||||
:default-weight regular
|
||||
:default-slant normal
|
||||
:default-width normal
|
||||
|
|
Loading…
Reference in a new issue