diff options
| author | tslil clingman <tslil@posteo.de> | 2024-01-14 12:51:02 +0100 |
|---|---|---|
| committer | tslil clingman <tslil@posteo.de> | 2024-01-14 12:51:02 +0100 |
| commit | 4275e1f189a8b3c0379ef541d88e72a0a5b514d3 (patch) | |
| tree | ec2d6ccb3b739a1370437eeb374916561b7c9f01 | |
| parent | 50e4b5ce6ea77b3044ad32a74cf64ca5478fbd36 (diff) | |
[emacs] rm projects frm consult-buffer-sources (slow), rm tressitter-auto
| -rw-r--r-- | emacs/inits/11-completion.el | 9 | ||||
| -rw-r--r-- | emacs/inits/20-programming.el | 29 |
2 files changed, 18 insertions, 20 deletions
diff --git a/emacs/inits/11-completion.el b/emacs/inits/11-completion.el index 00bc708..cc6f339 100644 --- a/emacs/inits/11-completion.el +++ b/emacs/inits/11-completion.el @@ -1,4 +1,4 @@ -;; Time-stamp: <2023-11-02 16h49 CET (anker)> +;; Time-stamp: <2024-01-14 12h49 CET (anker)> (use-package savehist :ensure t @@ -138,6 +138,13 @@ (autoload 'projectile-project-root "projectile") (setq consult-project-function #'projectile-project-root) + (setq consult-buffer-sources '(consult--source-hidden-buffer + consult--source-modified-buffer + consult--source-buffer + consult--source-recent-file + consult--source-file-register + consult--source-bookmark)) + ;; Ues consult for capfs (setq completion-in-region-function #'consult-completion-in-region)) diff --git a/emacs/inits/20-programming.el b/emacs/inits/20-programming.el index c146f74..520325a 100644 --- a/emacs/inits/20-programming.el +++ b/emacs/inits/20-programming.el @@ -1,4 +1,4 @@ -;; Time-stamp: <2024-01-07 15h17 CET (anker)> +;; Time-stamp: <2024-01-10 14h20 CET (anker)> ;; ----------------------------------------------------------------------------- ;; General setup @@ -38,6 +38,8 @@ (hs-minor-mode) (display-line-numbers-mode 1) (setq auto-hscroll-mode t) + (when (not (eq major-mode 'python-mode)) + (keymap-set (current-local-map) "M-/" 'completion-at-point)) (yas-minor-mode-on)) (add-hook 'prog-mode-hook #'programming-setup) @@ -95,7 +97,7 @@ (use-package cc-mode :defer t :bind (:map c-mode-map - ("M-/" . lh-matching-delim)) + ("M-m" . lh-matching-delim)) :hook ((c-mode c++-mode) . (lambda () (when (string-match-p (regexp-quote "rdx-code") (buffer-file-name)) (c-set-style "radix")) @@ -206,15 +208,16 @@ :ensure t :defer t :config - (setq highlight-indent-guides-auto-odd-face-perc 10 - highlight-indent-guides-auto-even-face-perc 15)) + (setq highlight-indent-guides-auto-odd-face-perc 3 + highlight-indent-guides-auto-even-face-perc 5)) (use-package python :hook (python-mode . (lambda () (highlight-indent-guides-mode t) (visual-line-mode))) :bind (:map python-mode-map - ("C-c C-f" . nil))) + ("C-c C-f" . nil) + ("M-/" . hippie-expand))) ;; ----------------------------------------------------------------------------- ;; Rust @@ -233,13 +236,12 @@ :bind (:map rust-mode-map ("M-," . lh-backward-delim) ("M-." . lh-forward-delim) - ("M-/" . lh-matching-delim) + ("M-m" . lh-matching-delim) ("M-p" . beginning-of-defun) ("M-n" . end-of-defun) ("C-c r c" . rust-compile) ("C-c r r" . rust-run)) :hook (rust-mode . (lambda () - (require 'rust-mode) (cargo-minor-mode) ;; Pair {} in rust format strings ... ? (setq-local electric-pair-text-pairs @@ -283,7 +285,7 @@ :bind (:map zig-mode-map ("M-," . lh-backward-delim) ("M-." . lh-forward-delim) - ("M-/" . lh-matching-delim) + ("M-m" . lh-matching-delim) ("M-p" . beginning-of-defun) ("M-n" . end-of-defun) ("C-c C-c" . zig-compile) @@ -342,14 +344,3 @@ :defer t :config (setq uxntal-mode-strict-comments t)) - -;; ------------------------------------------------------------------- -;; This goes last so that we can recover major mode hooks correctly - -(use-package treesit-auto - :ensure t - :config - (global-treesit-auto-mode) - (setq treesit-auto-install t) - (setq rust-ts-mode-hook rust-mode-hook - rust-ts-mode-map (make-composed-keymap rust-ts-mode-map rust-mode-map))) |
