enable evil mode again
This commit is contained in:
parent
f81d6ee7c9
commit
b644b412a0
1 changed files with 138 additions and 44 deletions
182
init.org
182
init.org
|
@ -35,6 +35,12 @@ one to use.
|
|||
- [[https://github.com/jwiegley/dot-emacs/blob/master/init.org][John Wiegley's .emacs file]]
|
||||
- [[https://github.com/TheBB/dotemacs/blob/master/init.el][Eivind Fonn's init.el]]
|
||||
|
||||
** Global Configuration
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(setq snm-enable-evil t) ;; enable evil bindings
|
||||
#+END_SRC
|
||||
|
||||
* First Things First
|
||||
|
||||
** Bootstrapping Emacs Configuration
|
||||
|
@ -194,8 +200,9 @@ then load it.
|
|||
|
||||
Needs to load early so the ~:general~ keyword is available for ~use-package~.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp :tangle no
|
||||
(use-package general :ensure t :demand t)
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(when snm-enable-evil
|
||||
(use-package general :ensure t :demand t))
|
||||
#+END_SRC
|
||||
|
||||
#+RESULTS:
|
||||
|
@ -209,7 +216,6 @@ Needs to load early so the ~:general~ keyword is available for ~use-package~.
|
|||
(elpaca-wait)
|
||||
#+END_SRC
|
||||
|
||||
|
||||
** Utility Functions
|
||||
|
||||
|
||||
|
@ -226,7 +232,6 @@ Needs to load early so the ~:general~ keyword is available for ~use-package~.
|
|||
#+RESULTS:
|
||||
: snm-reload-dir-locals-for-current-buffer
|
||||
|
||||
|
||||
** Get latest version of a github released project
|
||||
|
||||
Many projects nowadays use github to release their software. However
|
||||
|
@ -255,7 +260,7 @@ metadata and get the version number from the JSON.
|
|||
#+END_SRC
|
||||
|
||||
#+RESULTS:
|
||||
: v1.2025.0
|
||||
: v1.2025.1
|
||||
|
||||
* Integration with Environment
|
||||
|
||||
|
@ -371,12 +376,19 @@ up, which a totally different can of worms). A function
|
|||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package eat
|
||||
:ensure t
|
||||
:defer 5)
|
||||
:commands eat
|
||||
:ensure (eat
|
||||
:host codeberg
|
||||
:repo "akib/emacs-eat"
|
||||
:files ("*.el" ("term" "term/*.el") "*.texi"
|
||||
"*.ti" ("terminfo/e" "terminfo/e/*")
|
||||
("terminfo/65" "terminfo/65/*")
|
||||
("integration" "integration/*")
|
||||
(:exclude ".dir-locals.el" "*-tests.el"))))
|
||||
#+END_SRC
|
||||
|
||||
#+RESULTS:
|
||||
: [nil 26285 20099 685413 nil elpaca-process-queues nil nil 626000 nil]
|
||||
: [nil 26538 15682 653403 nil elpaca-process-queues nil nil 807000 nil]
|
||||
|
||||
|
||||
** Enable editing textareas in browsers with Emacs
|
||||
|
@ -683,8 +695,6 @@ See the excellent documentation on [[https://github.com/minad/consult][Minad's c
|
|||
** Evil Vim Keybindings
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(setq snm-enable-evil nil)
|
||||
|
||||
(when snm-enable-evil
|
||||
;; load evil
|
||||
(use-package evil
|
||||
|
@ -856,7 +866,7 @@ screen.
|
|||
(("<f5>" . #'catppuccin-toggle)))
|
||||
#+END_SRC
|
||||
|
||||
#+BEGIN_SRC emacs-lisp :tangle yes
|
||||
#+BEGIN_SRC emacs-lisp :tangle no
|
||||
(use-package modus-themes
|
||||
:ensure t
|
||||
:demand t
|
||||
|
@ -891,6 +901,60 @@ There is a keybinding on *<F5>* to toggle between light and dark mode.
|
|||
#+RESULTS:
|
||||
: modus-themes-toggle
|
||||
|
||||
|
||||
*** EF Themes
|
||||
|
||||
#+BEGIN_SRC emacs-lisp :tangle yes
|
||||
(use-package ef-themes
|
||||
:ensure t
|
||||
:init
|
||||
;; If you like two specific themes and want to switch between them, you
|
||||
;; can specify them in `ef-themes-to-toggle' and then invoke the command
|
||||
;; `ef-themes-toggle'. All the themes are included in the variable
|
||||
;; `ef-themes-collection'.
|
||||
(setq ef-themes-to-toggle '(ef-day ef-night))
|
||||
|
||||
(setq ef-themes-headings ; read the manual's entry or the doc string
|
||||
'((0 variable-pitch light 1.9)
|
||||
(1 variable-pitch light 1.8)
|
||||
(2 variable-pitch regular 1.7)
|
||||
(3 variable-pitch regular 1.6)
|
||||
(4 variable-pitch regular 1.5)
|
||||
(5 variable-pitch 1.4) ; absence of weight means `bold'
|
||||
(6 variable-pitch 1.3)
|
||||
(7 variable-pitch 1.2)
|
||||
(t variable-pitch 1.1)))
|
||||
|
||||
;; They are nil by default...
|
||||
(setq ef-themes-mixed-fonts t
|
||||
ef-themes-variable-pitch-ui t)
|
||||
:config
|
||||
;; Disable all other themes to avoid awkward blending:
|
||||
(mapc #'disable-theme custom-enabled-themes)
|
||||
|
||||
;; load the theme which also calls `ef-themes-post-load-hook':
|
||||
(ef-themes-select 'ef-night)
|
||||
|
||||
:bind
|
||||
("<f5>" . #'ef-themes-toggle)
|
||||
|
||||
)
|
||||
#+END_SRC
|
||||
|
||||
#+RESULTS:
|
||||
: [nil 26538 31881 746655 nil elpaca-process-queues nil nil 312000 nil]
|
||||
|
||||
*** Spacious Padding
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package spacious-padding
|
||||
:ensure t
|
||||
:bind (("<f8>" . #'spacious-padding-mode)))
|
||||
#+END_SRC
|
||||
|
||||
#+RESULTS:
|
||||
: [nil 26538 30896 455747 nil elpaca-process-queues nil nil 302000 nil]
|
||||
|
||||
*** Limit Height of Selected Popup Windows
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(push '("\\*Occur\\*"
|
||||
|
@ -1247,6 +1311,18 @@ provides a way to replay them.
|
|||
#+RESULTS:
|
||||
: [nil 26503 37477 396927 nil elpaca-process-queues nil nil 128000 nil]
|
||||
|
||||
** Abbrev Files
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package abbrev
|
||||
:ensure nil
|
||||
:config
|
||||
(setq abbrev-file-name (expand-file-name "abbrev_defs" user-emacs-directory))
|
||||
(setq save-abbrevs 'silently)
|
||||
(if (file-exists-p abbrev-file-name)
|
||||
(quietly-read-abbrev-file)))
|
||||
#+END_SRC
|
||||
|
||||
* Programming
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
|
@ -1509,7 +1585,7 @@ see also [[https://www.masteringemacs.org/article/how-to-get-started-tree-sitter
|
|||
(go-ts . eglot-ensure))
|
||||
#+END_SRC
|
||||
*** Javascript, Typescript, TSC, etc...
|
||||
#+BEGIN_SRC emacs-lisp :tangle no
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
;; configure typescript support
|
||||
(use-package typescript-ts-mode
|
||||
:init
|
||||
|
@ -1531,6 +1607,10 @@ see also [[https://www.masteringemacs.org/article/how-to-get-started-tree-sitter
|
|||
:hook
|
||||
(tsx-ts-mode . eglot-ensure))
|
||||
#+END_SRC
|
||||
|
||||
#+RESULTS:
|
||||
| eglot-ensure |
|
||||
|
||||
*** Java and other JVM languages
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
;; configure java support
|
||||
|
@ -1829,7 +1909,7 @@ throw an error that it cannot comply when multiple threads are active.
|
|||
For each project using this you need to define some helper function to
|
||||
stop the repl threads before saving the image like the following:
|
||||
|
||||
#+BEGIN_SRC emacs-lisp :tangle no
|
||||
#+BEGIN_SRC common-lisp :tangle no
|
||||
(defun sbcl-save-sly-and-die ()
|
||||
"Save a sbcl image, even when running from inside Sly.
|
||||
This function should only be used in the *inferior-buffer* buffer,
|
||||
|
@ -1837,7 +1917,7 @@ inside emacs."
|
|||
(mapcar #'(lambda (x)
|
||||
(slynk::close-connection
|
||||
x nil nil))
|
||||
-evil slynk::*connections*)
|
||||
slynk::*connections*)
|
||||
(dolist (thread (remove
|
||||
(slynk-backend::current-thread)
|
||||
(slynk-backend::all-threads)))
|
||||
|
@ -1851,7 +1931,7 @@ inside emacs."
|
|||
|
||||
This function has to be called in the *sly-inferior-lisp*
|
||||
|
||||
#+BEGIN_SRC emacs-lisp :tangle no
|
||||
#+BEGIN_SRC common-lisp :tangle no
|
||||
;; in *sly-inferior-lisp* buffer
|
||||
(sbcl-save-sly-and-die)
|
||||
#+END_SRC
|
||||
|
@ -2069,11 +2149,21 @@ There is a lot of positive hubbub around [[https://github.com/crazywolf132/super
|
|||
#+BEGIN_SRC emacs-lisp :tangle no
|
||||
(use-package supermaven
|
||||
:ensure (supermaven :host github :repo "crazywolf132/supermaven.el"
|
||||
:branch "main"
|
||||
:files ("dist" "*.el"))
|
||||
:branch "main")
|
||||
:init
|
||||
(setq supermaven-ignore-filetypes '("org" "txt"))
|
||||
(setq supermaven-disable-inline-completion nil)
|
||||
(setq supermaven-keymaps
|
||||
'((accept-suggestion . "TAB")
|
||||
(clear-suggestion . "C-]")
|
||||
(accept-word . "C-j")))
|
||||
(setq supermaven-log-level 'debug)
|
||||
:hook (prog-mode . supermaven-mode))
|
||||
#+END_SRC
|
||||
|
||||
#+RESULTS:
|
||||
: [nil 26528 36711 407251 nil elpaca-process-queues nil nil 656000 nil]
|
||||
|
||||
|
||||
<2025-01-28 Tue> Tried it out but did not work. I got following
|
||||
errors :
|
||||
|
@ -2102,7 +2192,11 @@ errors :
|
|||
#+END_SRC
|
||||
|
||||
In a separate terminal I see the pid change every 2 seconds. It seems
|
||||
to work fine in vscode. Not tested in neovim yet.
|
||||
to work fine in vscode. +Not tested in neovim yet+. It works just fine
|
||||
in Neovim.
|
||||
|
||||
Supermaven requires company support at the moment. There is a [[https://github.com/crazywolf132/supermaven.el/issues/12][Feature
|
||||
Request open]] to add corfu support.
|
||||
|
||||
** Gemini Code Completion
|
||||
|
||||
|
@ -2273,11 +2367,11 @@ npm install -g @mermaid-js/mermaid-cli
|
|||
#+END_SRC
|
||||
|
||||
#+RESULTS:
|
||||
| | | | | | |
|
||||
| changed | 194 | packages | in | 6s | |
|
||||
| | | | | | |
|
||||
| 39 | packages | are | looking | for | funding |
|
||||
| run | `npm | fund` | for | details | |
|
||||
| | | | | | | | | | | | |
|
||||
| added | 281 | packages, | removed | 60 | packages, | and | changed | 134 | packages | in | 18s |
|
||||
| | | | | | | | | | | | |
|
||||
| 52 | packages | are | looking | for | funding | | | | | | |
|
||||
| run | `npm | fund` | for | details | | | | | | | |
|
||||
|
||||
**** Support PlantUML Diagrams in Babel Blocks
|
||||
|
||||
|
@ -2317,10 +2411,9 @@ interactive to manually install the latest version if needed.
|
|||
: ~/.config/emacs/plantuml.jar
|
||||
|
||||
**** Configure Babel Languages
|
||||
#+BEGIN_SRC emacs-lisp :tangle no
|
||||
#+BEGIN_SRC emacs-lisp :tangle yes
|
||||
;; configure babel languages
|
||||
(use-package org-babel
|
||||
:demand t
|
||||
(use-package ob
|
||||
:custom
|
||||
(org-babel-load-languages '((emacs-lisp . t)
|
||||
(shell . t)
|
||||
|
@ -2328,14 +2421,12 @@ interactive to manually install the latest version if needed.
|
|||
(latex . t)
|
||||
(scheme . t)
|
||||
(plantuml . t)
|
||||
(mermaid . t)
|
||||
(dot . t)))
|
||||
:config
|
||||
(message "Configuring org-babel languages")
|
||||
)
|
||||
#+END_SRC
|
||||
|
||||
#+RESULTS:
|
||||
: [nil 26499 54180 830807 nil elpaca-process-queues nil nil 413000 nil]
|
||||
|
||||
**** Temporary Patches for Org Babel
|
||||
|
||||
|
@ -2542,7 +2633,7 @@ exporter manual.]]
|
|||
|
||||
Better keybinding for evil mode from [[https://github.com/Somelauw/evil-org-mode][the evil-org github repo]].
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(if snm-enable-evil
|
||||
(when snm-enable-evil
|
||||
(use-package evil-org
|
||||
:ensure t
|
||||
:after org
|
||||
|
@ -2922,22 +3013,25 @@ We can add a list of queries
|
|||
(expand-file-name "~/Documents/denote")))
|
||||
:hook (dired-mode . denote-dired-mode-in-directories)
|
||||
:bind (
|
||||
("<leader> n d" . (lambda () (interactive) (dired denote-directory)))
|
||||
("<leader> n n" . #'denote)
|
||||
("<leader> n N" . #'denote-type)
|
||||
("<leader> n c" . #'denote-link-or-create)
|
||||
("<leader> n t" . #'denote-template)
|
||||
("<leader> n z" . #'denote-signature)
|
||||
("<leader> n l" . #'denote-link)
|
||||
("<leader> n L" . #'denote-find-link)
|
||||
("<leader> n k" . #'denote-keywords-add)
|
||||
("<leader> n b" . #'denote-link-backlink)
|
||||
("<leader> n B" . #'denote-find-backlink)
|
||||
("<leader> n r" . #'denote-rename-file)
|
||||
("<leader> n R" . #'denote-rename-file-using-front-matter)
|
||||
("<leader> n f" . (lambda () (interactive) (consult-find denote-directory)))))
|
||||
("C-c n d" . (lambda () (interactive) (dired denote-directory)))
|
||||
("C-c n n" . #'denote)
|
||||
("C-c n N" . #'denote-type)
|
||||
("C-c n c" . #'denote-link-or-create)
|
||||
("C-c n t" . #'denote-template)
|
||||
("C-c n z" . #'denote-signature)
|
||||
("C-c n l" . #'denote-link)
|
||||
("C-c n L" . #'denote-find-link)
|
||||
("C-c n k" . #'denote-keywords-add)
|
||||
("C-c n b" . #'denote-link-backlink)
|
||||
("C-c n B" . #'denote-find-backlink)
|
||||
("C-c n r" . #'denote-rename-file)
|
||||
("C-c n R" . #'denote-rename-file-using-front-matter)
|
||||
("C-c n f" . (lambda () (interactive) (consult-find denote-directory)))))
|
||||
#+END_SRC
|
||||
|
||||
#+RESULTS:
|
||||
: [nil 26544 34903 498589 nil elpaca-process-queues nil nil 963000 nil]
|
||||
|
||||
**** TODO explain what denote-dired-mode-in-directories does.
|
||||
|
||||
* Communication and Interwebs
|
||||
|
|
Loading…
Add table
Reference in a new issue