From 631b46db6fd9362042b77ae1012fb7413f94a3a3 Mon Sep 17 00:00:00 2001 From: Frieder Schlesier Date: Mon, 29 Apr 2024 14:29:41 +0200 Subject: [PATCH] update init and TODO.org --- TODO.org | 18 ++++++++++++++++++ init.el | 3 ++- init.org | 36 +++++++++++++++++------------------- 3 files changed, 37 insertions(+), 20 deletions(-) diff --git a/TODO.org b/TODO.org index f3fde7b..8a88058 100644 --- a/TODO.org +++ b/TODO.org @@ -22,6 +22,16 @@ solution, e.g. set it up to auto-tangle all .org files within/below *** TODO IDE +**** TODO try eglot instead of lsp-mode +- [ ] for rust https://unwoundstack.com/blog/emacs-as-a-rust-ide.html +- [ ] example for python: https://whatacold.io/blog/2022-01-22-emacs-eglot-lsp/ +- [ ] with rust-mode instead of rustig https://github.com/rust-lang/rust-mode?tab=readme-ov-file#lsp +- [ ] eglot commands: https://www.gnu.org/software/emacs/manual/html_node/eglot/Eglot-Commands.html + +**** TODO smart movement with smartparens/paredit + +- http://danmidwood.com/content/2014/11/21/animated-paredit.html + **** TODO LSP per language **** TODO AutoComplete, easy compile, unit test @@ -31,6 +41,14 @@ solution, e.g. set it up to auto-tangle all .org files within/below *** TODO flyspell languages (de, en) is it possible to detect based on existing content? +*** TODO add easily switchable themes (light/dark) + +https://github.com/emacs-tw/awesome-emacs?tab=readme-ov-file#theme +top contenders: +- https://github.com/kuanyui/moe-theme.el?tab=readme-ov-file +- https://github.com/bbatsov/zenburn-emacs +- solarized dark/light, e.g. via doom-themes + *** TODO snippets? *** TODO flycheck for code diff --git a/init.el b/init.el index 8f2f57e..88f9dce 100644 --- a/init.el +++ b/init.el @@ -43,7 +43,7 @@ (string-suffix-p "Android" (string-trim (shell-command-to-string "uname -a")))) (defvar dw/is-guix-system (and (eq system-type 'gnu/linux) - (file-exists-p "/etc/os-release") + (file-exists-p "/etc/os-release") (with-temp-buffer (insert-file-contents "/etc/os-release") (search-forward "ID=guix" nil t)) @@ -51,6 +51,7 @@ (keymap-global-unset "M-#") +(define-key global-map (kbd "M-#") 'comment-line) (define-key global-map (kbd "s-b") 'switch-to-buffer) (define-key global-map (kbd "s-w") 'kill-current-buffer) (define-key global-map (kbd "s-W") 'kill-buffer-and-window) diff --git a/init.org b/init.org index 41e9d4e..4966e1c 100644 --- a/init.org +++ b/init.org @@ -62,34 +62,32 @@ Some of my personal configuration depends on the system we're running on. - [ ] add windows #+begin_src emacs-lisp + (defvar dw/is-termux + (string-suffix-p "Android" (string-trim (shell-command-to-string "uname -a")))) -(defvar dw/is-termux - (string-suffix-p "Android" (string-trim (shell-command-to-string "uname -a")))) - -(defvar dw/is-guix-system (and (eq system-type 'gnu/linux) - (file-exists-p "/etc/os-release") - (with-temp-buffer - (insert-file-contents "/etc/os-release") - (search-forward "ID=guix" nil t)) - t)) - + (defvar dw/is-guix-system (and (eq system-type 'gnu/linux) + (file-exists-p "/etc/os-release") + (with-temp-buffer + (insert-file-contents "/etc/os-release") + (search-forward "ID=guix" nil t)) + t)) #+end_src ** Custom key remap - #+begin_src emacs-lisp - (keymap-global-unset "M-#") +#+begin_src emacs-lisp + (keymap-global-unset "M-#") - (define-key global-map (kbd "s-b") 'switch-to-buffer) - (define-key global-map (kbd "s-w") 'kill-current-buffer) - (define-key global-map (kbd "s-W") 'kill-buffer-and-window) - (define-key global-map (kbd "s-o") 'other-window) - (define-key global-map (kbd "C-z") nil) - #+end_src + (define-key global-map (kbd "M-#") 'comment-line) + (define-key global-map (kbd "s-b") 'switch-to-buffer) + (define-key global-map (kbd "s-w") 'kill-current-buffer) + (define-key global-map (kbd "s-W") 'kill-buffer-and-window) + (define-key global-map (kbd "s-o") 'other-window) + (define-key global-map (kbd "C-z") nil) + #+end_src ** Dired #+begin_src emacs-lisp - (use-package all-the-icons-dired) (use-package dired-ranger)