Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ba8ef4f585 | |||
| eb057a2c3a |
@@ -790,10 +790,12 @@ These are just some general settings that apply everywhere. First, a few package
|
|||||||
programs.emacs = {
|
programs.emacs = {
|
||||||
enable = true;
|
enable = true;
|
||||||
extraPackages = epkgs: with epkgs; [
|
extraPackages = epkgs: with epkgs; [
|
||||||
|
ace-window
|
||||||
doom-modeline
|
doom-modeline
|
||||||
|
free-keys
|
||||||
ligature
|
ligature
|
||||||
mixed-pitch
|
mixed-pitch
|
||||||
ace-window
|
perspective
|
||||||
popper
|
popper
|
||||||
];
|
];
|
||||||
extraConfig = builtins.readFile ./emacs-global.el;
|
extraConfig = builtins.readFile ./emacs-global.el;
|
||||||
@@ -806,6 +808,7 @@ Turn off some default settings that I don't find useful.
|
|||||||
#+BEGIN_SRC elisp
|
#+BEGIN_SRC elisp
|
||||||
(setopt inhibit-startup-screen t)
|
(setopt inhibit-startup-screen t)
|
||||||
(setopt initial-scratch-message nil)
|
(setopt initial-scratch-message nil)
|
||||||
|
(setopt sentence-end-double-space nil)
|
||||||
(menu-bar-mode -1)
|
(menu-bar-mode -1)
|
||||||
(scroll-bar-mode -1)
|
(scroll-bar-mode -1)
|
||||||
(tool-bar-mode -1)
|
(tool-bar-mode -1)
|
||||||
@@ -817,6 +820,15 @@ Turn off some default settings that I don't find useful.
|
|||||||
display-buffer-in-previous-window
|
display-buffer-in-previous-window
|
||||||
display-buffer-use-some-window)))
|
display-buffer-use-some-window)))
|
||||||
(setopt view-read-only t)
|
(setopt view-read-only t)
|
||||||
|
(setopt save-interprogram-paste-before-kill t)
|
||||||
|
(setopt kill-whole-line t)
|
||||||
|
(delete-selection-mode t)
|
||||||
|
(column-number-mode t)
|
||||||
|
(setopt auto-save-default nil)
|
||||||
|
(setopt create-lockfiles nil)
|
||||||
|
|
||||||
|
(setopt mouse-wheel-tilt-scroll t)
|
||||||
|
(setq-default truncate-lines t)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
Make sure which-key mode is always on. The on-the-fly keymap help it gives is indespensable.
|
Make sure which-key mode is always on. The on-the-fly keymap help it gives is indespensable.
|
||||||
@@ -941,11 +953,12 @@ Set up a few project- / workspace-related key bindings.
|
|||||||
|
|
||||||
#+BEGIN_SRC elisp
|
#+BEGIN_SRC elisp
|
||||||
(bind-keys ("s-f" . project-find-file)
|
(bind-keys ("s-f" . project-find-file)
|
||||||
("s-F" . project-switch-project))
|
("s-F" . project-switch-project)
|
||||||
|
("s-s" . persp-switch))
|
||||||
|
|
||||||
(with-eval-after-load 'tab-bar
|
;; (with-eval-after-load 'tab-bar
|
||||||
(bind-keys :map tab-bar-mode-map
|
;; (bind-keys :map tab-bar-mode-map
|
||||||
("s-s" . tab-bar-switch-to-tab)))
|
;; ("s-s" . tab-bar-switch-to-tab)))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
Don't run a server. I'm not using this, I can always turn it back on if I need to.
|
Don't run a server. I'm not using this, I can always turn it back on if I need to.
|
||||||
@@ -1016,12 +1029,17 @@ content to be.
|
|||||||
when height do (progn (window-resize child (- height (window-height child)))
|
when height do (progn (window-resize child (- height (window-height child)))
|
||||||
(window-preserve-size child nil t))))))))
|
(window-preserve-size child nil t))))))))
|
||||||
|
|
||||||
|
(require 'perspective)
|
||||||
|
(setopt persp-mode-prefix-key (kbd "C-x t"))
|
||||||
|
(setopt persp-show-modestring nil)
|
||||||
|
(persp-mode)
|
||||||
|
|
||||||
(setopt popper-reference-buffers
|
(setopt popper-reference-buffers
|
||||||
'("\\*Flymake diagnostics .*"
|
'("\\*Flymake diagnostics .*"
|
||||||
"\\*Embark Export: .*"
|
"\\*Embark Export: .*"
|
||||||
"\\*Embark Collect .*"
|
"\\*Embark Collect .*"
|
||||||
"\\*xref\\*"
|
"\\*xref\\*"
|
||||||
("\\*compilation\\*" . hide)
|
"\\*compilation\\*"
|
||||||
"\\*sly-mrepl *"
|
"\\*sly-mrepl *"
|
||||||
"\\*Messages\\*"
|
"\\*Messages\\*"
|
||||||
"\\*lispy-message\\*"
|
"\\*lispy-message\\*"
|
||||||
@@ -1043,11 +1061,12 @@ content to be.
|
|||||||
"\\*List .*"
|
"\\*List .*"
|
||||||
"\\*eldoc\\*"))
|
"\\*eldoc\\*"))
|
||||||
(setopt popper-display-control nil)
|
(setopt popper-display-control nil)
|
||||||
|
(setopt popper-group-function 'popper-group-by-perspective)
|
||||||
|
|
||||||
(popper-mode)
|
(popper-mode)
|
||||||
(popper-echo-mode)
|
(popper-echo-mode)
|
||||||
|
|
||||||
(bind-keys ("C-z" . popper-toggle)
|
(bind-keys ("C-q" . popper-toggle)
|
||||||
("C-;" . popper-cycle))
|
("C-;" . popper-cycle))
|
||||||
|
|
||||||
(setq display-buffer-alist
|
(setq display-buffer-alist
|
||||||
@@ -1084,7 +1103,7 @@ content to be.
|
|||||||
(display-buffer-in-side-window)
|
(display-buffer-in-side-window)
|
||||||
(side . right)
|
(side . right)
|
||||||
(slot . 0)
|
(slot . 0)
|
||||||
(window-width . 101)
|
(window-width . 93)
|
||||||
(window-height . jf/enforce-right-side-heights)
|
(window-height . jf/enforce-right-side-heights)
|
||||||
(preserve-size . (t . nil))
|
(preserve-size . (t . nil))
|
||||||
(window-parameters (no-delete-other-windows . t)
|
(window-parameters (no-delete-other-windows . t)
|
||||||
@@ -1094,7 +1113,7 @@ content to be.
|
|||||||
(display-buffer-in-side-window)
|
(display-buffer-in-side-window)
|
||||||
(side . right)
|
(side . right)
|
||||||
(slot . -1)
|
(slot . -1)
|
||||||
(window-width . 101)
|
(window-width . 93)
|
||||||
(window-height . jf/enforce-right-side-heights)
|
(window-height . jf/enforce-right-side-heights)
|
||||||
(preserve-size . (t . t))
|
(preserve-size . (t . t))
|
||||||
(window-parameters (no-delete-other-windows . t)
|
(window-parameters (no-delete-other-windows . t)
|
||||||
@@ -1193,10 +1212,13 @@ his article.
|
|||||||
(avy-goto-char-timer)))
|
(avy-goto-char-timer)))
|
||||||
|
|
||||||
(bind-keys
|
(bind-keys
|
||||||
("M-j" . avy-goto-char-timer)
|
("C-j" . avy-goto-char-timer)
|
||||||
("C-c j" . avy-goto-char-timer)
|
("M-j" . avy-goto-char-timer-embark)
|
||||||
("M-J" . avy-goto-char-timer-embark)
|
("C-." . embark-act)
|
||||||
("C-." . embark-act))
|
:map lispy-mode-map
|
||||||
|
("C-j" . avy-goto-char-timer)
|
||||||
|
:map org-mode-map
|
||||||
|
("C-j" . avy-goto-char-timer))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
Just "silently" wrap when searching at the bottom of a document.
|
Just "silently" wrap when searching at the bottom of a document.
|
||||||
@@ -1239,7 +1261,7 @@ Just "silently" wrap when searching at the bottom of a document.
|
|||||||
programs.emacs = {
|
programs.emacs = {
|
||||||
enable = true;
|
enable = true;
|
||||||
extraPackages = epkgs: with epkgs; [
|
extraPackages = epkgs: with epkgs; [
|
||||||
bufferlo
|
# bufferlo
|
||||||
];
|
];
|
||||||
extraConfig = builtins.readFile ./emacs-workflow.el;
|
extraConfig = builtins.readFile ./emacs-workflow.el;
|
||||||
};
|
};
|
||||||
@@ -1247,23 +1269,24 @@ Just "silently" wrap when searching at the bottom of a document.
|
|||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
#+BEGIN_SRC elisp
|
#+BEGIN_SRC elisp
|
||||||
(bufferlo-mode)
|
;; (bufferlo-mode)
|
||||||
|
|
||||||
(setopt bufferlo-include-buried-buffers nil)
|
;; (setopt bufferlo-include-buried-buffers nil)
|
||||||
|
|
||||||
(with-eval-after-load 'bufferlo
|
;; (with-eval-after-load 'bufferlo
|
||||||
(setq mode-line-misc-info
|
;; (setq mode-line-misc-info
|
||||||
(assq-delete-all 'bufferlo-mode mode-line-misc-info)))
|
;; (assq-delete-all 'bufferlo-mode mode-line-misc-info)))
|
||||||
|
|
||||||
(defun my/bury-or-kill-buffer ()
|
;; (defun my/bury-or-kill-buffer ()
|
||||||
(interactive)
|
;; (interactive)
|
||||||
(bury-buffer)
|
;; (bury-buffer)
|
||||||
(bufferlo-kill-orphan-buffers))
|
;; (bufferlo-kill-orphan-buffers))
|
||||||
|
|
||||||
(bind-keys
|
(bind-keys
|
||||||
("s-b" . bufferlo-switch-to-buffer)
|
("s-b" . consult-buffer)
|
||||||
("C-x t 0" . bufferlo-tab-close-kill-buffers)
|
;; ("C-x t 0" . bufferlo-tab-close-kill-buffers)
|
||||||
("C-x k" . my/bury-or-kill-buffer))
|
;; ("C-x k" . my/bury-or-kill-buffer)
|
||||||
|
)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
** Language Support
|
** Language Support
|
||||||
@@ -1290,6 +1313,7 @@ Just "silently" wrap when searching at the bottom of a document.
|
|||||||
# lispyville
|
# lispyville
|
||||||
lua-mode
|
lua-mode
|
||||||
nix-mode
|
nix-mode
|
||||||
|
prisma-ts-mode
|
||||||
rust-mode
|
rust-mode
|
||||||
sly
|
sly
|
||||||
sly-macrostep
|
sly-macrostep
|
||||||
@@ -1320,6 +1344,7 @@ Just "silently" wrap when searching at the bottom of a document.
|
|||||||
g.tree-sitter-nix
|
g.tree-sitter-nix
|
||||||
g.tree-sitter-org
|
g.tree-sitter-org
|
||||||
g.tree-sitter-php
|
g.tree-sitter-php
|
||||||
|
g.tree-sitter-prisma
|
||||||
g.tree-sitter-python
|
g.tree-sitter-python
|
||||||
g.tree-sitter-rust
|
g.tree-sitter-rust
|
||||||
g.tree-sitter-rust-format-args
|
g.tree-sitter-rust-format-args
|
||||||
@@ -1357,7 +1382,7 @@ Show a vertical bar 100 characters out; ideally I don't want lines longer than t
|
|||||||
is about the max you can have and still fit two files side-by-side on the screen.
|
is about the max you can have and still fit two files side-by-side on the screen.
|
||||||
|
|
||||||
#+begin_src elisp
|
#+begin_src elisp
|
||||||
(setq-default fill-column 100)
|
(setq-default fill-column 120)
|
||||||
|
|
||||||
(defun jf-init-fill-column ()
|
(defun jf-init-fill-column ()
|
||||||
(display-fill-column-indicator-mode 1))
|
(display-fill-column-indicator-mode 1))
|
||||||
@@ -1486,10 +1511,10 @@ for completion. That makes it really annoying to use; don't use yasnippet with e
|
|||||||
|
|
||||||
*** Typescript
|
*** Typescript
|
||||||
#+BEGIN_SRC elisp
|
#+BEGIN_SRC elisp
|
||||||
(push '("\\.ts\\'" . typescript-mode) auto-mode-alist)
|
(add-to-list 'auto-mode-alist '("\\.ts\\'" . typescript-mode))
|
||||||
(push '(typescript-mode . typescript-ts-mode) major-mode-remap-alist)
|
(add-to-list 'major-mode-remap-alist '(typescript-mode . typescript-ts-mode))
|
||||||
(push '("\\.tsx\\'" . tsx-mode) auto-mode-alist)
|
(add-to-list 'auto-mode-alist '("\\.tsx\\'" . tsx-mode))
|
||||||
(push '(tsx-mode . tsx-ts-mode) major-mode-remap-alist)
|
(add-to-list 'major-mode-remap-alist '(tsx-mode . tsx-ts-mode))
|
||||||
(setopt typescript-ts-mode-indent-offset 2)
|
(setopt typescript-ts-mode-indent-offset 2)
|
||||||
(with-eval-after-load 'typescript-ts-mode
|
(with-eval-after-load 'typescript-ts-mode
|
||||||
(defun my-tsx-ts-mode--indent-compatibility-b893426 ()
|
(defun my-tsx-ts-mode--indent-compatibility-b893426 ()
|
||||||
@@ -1696,7 +1721,7 @@ for completion. That makes it really annoying to use; don't use yasnippet with e
|
|||||||
("s-B" . consult-buffer)
|
("s-B" . consult-buffer)
|
||||||
("C-x 4 b" . consult-buffer-other-window)
|
("C-x 4 b" . consult-buffer-other-window)
|
||||||
("C-x 5 b" . consult-buffer-other-frame)
|
("C-x 5 b" . consult-buffer-other-frame)
|
||||||
("C-x t b" . consult-buffer-other-tab)
|
;; ("C-x t b" . consult-buffer-other-tab)
|
||||||
("C-x r b" . consult-bookmark)
|
("C-x r b" . consult-bookmark)
|
||||||
("C-x p b" . consult-project-buffer)
|
("C-x p b" . consult-project-buffer)
|
||||||
|
|
||||||
@@ -1735,15 +1760,20 @@ for completion. That makes it really annoying to use; don't use yasnippet with e
|
|||||||
(eval-when-compile
|
(eval-when-compile
|
||||||
(require 'consult))
|
(require 'consult))
|
||||||
|
|
||||||
|
(require 'perspective)
|
||||||
(with-eval-after-load 'consult
|
(with-eval-after-load 'consult
|
||||||
(consult-customize
|
(consult-customize
|
||||||
consult-theme :preview-key '(:debounce 0.2 any)
|
consult-theme :preview-key '(:debounce 0.2 any)
|
||||||
consult-ripgrep consult-git-grep consult-grep consult-man
|
consult-ripgrep consult-git-grep consult-grep consult-man
|
||||||
consult-bookmark consult-recent-file consult-xref
|
consult-bookmark consult-recent-file consult-xref
|
||||||
consult-source-bookmark consult-source-file-register
|
consult-source-bookmark consult-source-file-register
|
||||||
consult-source-recent-file consult-source-project-recent-file
|
consult-source-recent-file
|
||||||
|
consult-source-buffer
|
||||||
;; :preview-key "M-."
|
;; :preview-key "M-."
|
||||||
:preview-key '(:debounce 0.4 any)))
|
consult-source-project-recent-file
|
||||||
|
:preview-key '(:debounce 0.4 any))
|
||||||
|
(consult-customize consult-source-buffer :hidden t :default nil)
|
||||||
|
(add-to-list 'consult-buffer-sources persp-consult-source))
|
||||||
|
|
||||||
(setopt consult-narrow-key "<") ;; "C-+"
|
(setopt consult-narrow-key "<") ;; "C-+"
|
||||||
|
|
||||||
@@ -1944,29 +1974,6 @@ for completion. That makes it really annoying to use; don't use yasnippet with e
|
|||||||
(setopt slack-buffer-function #'switch-to-buffer)
|
(setopt slack-buffer-function #'switch-to-buffer)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
** Kubernetes
|
|
||||||
:PROPERTIES:
|
|
||||||
:header-args:elisp: :tangle target/desktop/emacs-kubernetes.el
|
|
||||||
:END:
|
|
||||||
|
|
||||||
#+BEGIN_SRC nix :tangle target/desktop/emacs-kubernetes.nix
|
|
||||||
{
|
|
||||||
programs.emacs = {
|
|
||||||
enable = true;
|
|
||||||
extraPackages = epkgs: with epkgs; [
|
|
||||||
kubed
|
|
||||||
];
|
|
||||||
extraConfig = builtins.readFile ./emacs-kubernetes.el;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
#+BEGIN_SRC elisp
|
|
||||||
(use-package kubed
|
|
||||||
:bind-keymap
|
|
||||||
("s-k" . kubed-prefix-map))
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
** Ledger
|
** Ledger
|
||||||
|
|
||||||
#+BEGIN_SRC nix :tangle target/desktop/emacs-ledger.nix
|
#+BEGIN_SRC nix :tangle target/desktop/emacs-ledger.nix
|
||||||
|
|||||||
Reference in New Issue
Block a user