fixed lsp, orderless, corfu

irrelevant elements are now correctly filtered out of lsp by
orderless,corfu.

fixed some whitespace, indentation
This commit is contained in:
2026-08-12 00:12:21 +02:00
parent 811637003b
commit e82959cc66
9 changed files with 687 additions and 666 deletions
+10 -6
View File
@@ -14,13 +14,14 @@
(add-hook
'after-init-hook
(lambda ()
(with-demoted-errors "Error in after-init-hook: %S"
(require 'visuals-packages) ; ui, eye candy
(require 'editing-packages) ; text editing
(require 'system-packages) ; emacs itself
(require 'tutilities-packages) ; tertiary utilities
(require 'completion-packages) ; ui, functional
(require 'dev-packages) ; lsp, treesitter
)
))
)
;; ============================================================
;; Keybindings
@@ -40,6 +41,8 @@
;"C-m" nil can't be rebound because is same as ret
"C->" nil ;end of buffer
"C-<" nil ;start of buffer
"C-<right>" nil
"C-<left>" nil
)
(general-def
@@ -108,11 +111,12 @@
(read-file-name-completion-ignore-case t)
(read-buffer-completion-ignore-case t)
(text-mode-ispell-word-completion nil)
(completion-category-overrides '((point (styles orderless basic))))
;; --- Backup & Auto-save ---
;; Centralize all backup files to a single directory to avoid cluttering projects
(backup-directory-alist '(("." . "~/MyEmacsBackups")))
(auto-save-list-file-prefix "~/MyEmacsBackups")
(backup-directory-alist '(("." . "~/MyEmacsBackups/")))
(auto-save-list-file-prefix "~/MyEmacsBackups/")
(backup-by-copying t)
(create-lockfiles nil)
(make-backup-files nil)
@@ -187,6 +191,8 @@
;; 5. Hooks, Modes & Theming
;; ============================================================
(add-hook 'text-mode-hook #'jit-spell-mode)
(add-hook
'after-init-hook
(lambda ()
@@ -200,10 +206,8 @@
(yas-global-mode t) ; yasnippets
(repeat-mode 1) ; repeat key without modifier
(electric-pair-mode t) ; automatically handle pairs
(jit-spell-mode t) ; spellcheck
(fringe-mode '(0 . 8)) ; fringe only on right edge
(delete-selection-mode 1)
(auto-revert-mode t)
;; --- Special UI Settings ---
(setq ispell-program-name "hunspell"
@@ -258,4 +262,4 @@
)
)
(setq nerd-icons-font-family "Symbols Nerd Font Mono")
(setq nerd-icons-font-family "Symbols Nerd Font Mono")
+7 -5
View File
@@ -63,7 +63,6 @@
(elpaca nerd-icons-dired)
(elpaca nerd-icons-corfu)
(elpaca doom-modeline)
(elpaca base16-theme)
;; ==============================================================================
;; EDITING & NAVIGATION
@@ -82,7 +81,7 @@
(elpaca embark) ; Contextual actions
(elpaca embark-consult)
(elpaca wgrep) ; allow writeable grep buffers
;(elpaca lsp-embark)
;(elpaca lsp-embark)
(elpaca kirigami) ; folding meta utility
(elpaca pcre2el) ; fix regex
;; ==============================================================================
@@ -97,7 +96,8 @@
(elpaca highlight-parentheses) ; delimiters around point
(elpaca rainbow-delimiters) ; rainbow colours for pairs
(elpaca outline-indent) ;
(elpaca (svg-margin :repo "chiply/svg-margin"
(elpaca (svg-margin
:repo "chiply/svg-margin"
:host github))
;; ==============================================================================
;; LSP & DEVELOPMENT
@@ -129,9 +129,11 @@
(elpaca ghostel) ; terminal
(elpaca shell-pop)
(elpaca colorful-mode) ; colourise color codes
(elpaca (dirvish :repo "latiagertrutis/dirvish"
(elpaca (dirvish
:repo "latiagertrutis/dirvish"
:host github)) ; broken on emacs 30, fixed by using fork
(elpaca (dired-clipboard :repo "kn66/dired-clipboard.el" ;system clipboard in dired
(elpaca (dired-clipboard
:repo "kn66/dired-clipboard.el" ;system clipboard in dired
:host github))
(elpaca transient) ; bindings in modes
(elpaca magit) ; git client
+16 -7
View File
@@ -4,12 +4,12 @@
:config
(global-corfu-mode)
(corfu-popupinfo-mode)
(setq corfu-quit-at-boundary 'seperator
corfu-quit-no-match 'seperator)
(setq corfu-quit-at-boundary 'separator
corfu-quit-no-match 'separator)
:custom
(corfu-auto t)
(corfu-auto-delay 0.2)
(corfu-auto-prefix 2)
(corfu-auto-delay 0.1)
(corfu-auto-prefix 1)
(corfu-popupinfo-delay '(0.5 . 0.3)))
(use-package vertico
@@ -36,7 +36,7 @@
vertico-scroll-margin 4)
)
;use consult + vertico instead of corfu if in terminal
;use consult + vertico instead of corfu if in terminal
(use-package consult
:defer t
:init
@@ -45,7 +45,7 @@
:config
(add-hook 'after-change-major-mode-hook
(lambda ()
(setq completion-in-region-function #'consult-completion-in-regionc)))
(setq completion-in-region-function #'consult-completion-in-region)))
)
(use-package marginalia
@@ -55,6 +55,15 @@
(use-package orderless
:custom
(completion-styles '(orderless basic))
(completion-pcm-leading-wildcard t))
(completion-pcm-leading-wildcard t)
(completion-category-defaults nil)
(orderless-matching-styles '(orderless-prefixes orderless-literal))
:config
;;necessary to force filtering of lsp-mode candidates
(add-to-list 'completion-category-overrides
'(lsp-capf (styles orderless)
(orderless-matching-styles orderless-prefixes orderless-literal)))
)
(provide 'completion-packages)
+14 -6
View File
@@ -65,15 +65,23 @@
:init
(setq lsp-keymap-prefix "C-l")
:config
(add-hook 'lsp-mode-hook #'lsp-enable-which-key-integration))
(add-hook 'lsp-mode-hook #'lsp-enable-which-key-integration)
(setq lsp-clients-clangd-executable "clangd"
lsp-clangd-binary-path "/usr/bin/clangd"
lsp-clients--clangd-default-executable "/usr/bind/clangd"
lsp-clients--clangd-default-executable "/usr/bin/clangd"
lsp-completion-provider :none
lsp-clients-clangd-args '("--header-insertion=iwyu" "--fallback-style=LLVM")
)
lsp-completion-enable-filtering nil
lsp-completion-sort-initial-results t
lsp-clients-clangd-args '("--header-insertion=iwyu"
"--fallback-style=LLVM"
"-query-driver=/usr/bin/c++"
"--header-insertion-decorators")
(with-eval-after-load 'lsp-mode
lsp-enable-indentation t
lsp-enable-on-type-formatting nil
))
(with-eval-after-load 'lsp-mode
(define-key lsp-command-map (kbd "a") #'lsp-execute-code-action)
(define-key lsp-command-map (kbd "d") #'lsp-ui-doc-glance)
(define-key lsp-command-map (kbd "r") #'lsp-rename)
@@ -102,7 +110,7 @@
:new-connection (lsp-stdio-connection '("clangd" "--header-insertion=never"))
:activation-fn (lsp-activate-on "arduino")
:server-id 'lsp-arduino-clangd
))))
)))
(use-package lsp-ui
:defer t
+1 -1
View File
@@ -5,7 +5,7 @@
:config
(setq avy-timeout-seconds 0.25
avy-style 'at-full
avy-keys '(?a ?s ?d ?f ?g ?h ?j ?k ?l ?A ?S ?D ?F ?G ?H ?J ?K ?L)
avy-keys '(?a ?s ?d ?f ?g ?h ?j ?k ?l)
avy-orders-alist nil)
)
-1
View File
@@ -1,4 +1,3 @@
(use-package denote
:defer t
:config
-1
View File
@@ -65,4 +65,3 @@ t
(provide 'visuals-packages)