summaryrefslogtreecommitdiff
path: root/emacs/inits/20-programming.el
diff options
context:
space:
mode:
authortslil clingman <tslil@posteo.de>2024-01-14 12:51:02 +0100
committertslil clingman <tslil@posteo.de>2024-01-14 12:51:02 +0100
commit4275e1f189a8b3c0379ef541d88e72a0a5b514d3 (patch)
treeec2d6ccb3b739a1370437eeb374916561b7c9f01 /emacs/inits/20-programming.el
parent50e4b5ce6ea77b3044ad32a74cf64ca5478fbd36 (diff)
[emacs] rm projects frm consult-buffer-sources (slow), rm tressitter-auto
Diffstat (limited to 'emacs/inits/20-programming.el')
-rw-r--r--emacs/inits/20-programming.el29
1 files changed, 10 insertions, 19 deletions
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)))