mirror of
https://github.com/willemml/dotfiles.nix.git
synced 2025-04-13 19:57:19 +00:00
update emacs config
This commit is contained in:
parent
8be4182341
commit
b8f04787c8
2 changed files with 102 additions and 9 deletions
106
emacs.nix
106
emacs.nix
|
@ -263,7 +263,7 @@ in {
|
||||||
((lsp-feature? "textDocument/rangeFormatting")
|
((lsp-feature? "textDocument/rangeFormatting")
|
||||||
(lsp-format-buffer))
|
(lsp-format-buffer))
|
||||||
(t (format-all-buffer))))
|
(t (format-all-buffer))))
|
||||||
(t (format-all-ensure-formatter)
|
(t
|
||||||
(format-all-buffer))))
|
(format-all-buffer))))
|
||||||
'';
|
'';
|
||||||
functions = [ "lsp-deferred" "lsp-feature" "lsp-register-client" ];
|
functions = [ "lsp-deferred" "lsp-feature" "lsp-register-client" ];
|
||||||
|
@ -321,6 +321,9 @@ in {
|
||||||
flycheck = {
|
flycheck = {
|
||||||
enable = true;
|
enable = true;
|
||||||
hook = [ "(after-init . global-flycheck-mode)" ];
|
hook = [ "(after-init . global-flycheck-mode)" ];
|
||||||
|
config = ''
|
||||||
|
(setq flycheck-disabled-checkers '(emacs-lisp-checkdoc))
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
arduino-mode = {
|
arduino-mode = {
|
||||||
|
@ -348,10 +351,7 @@ in {
|
||||||
extraPackages = [ pkgs.nixfmt ];
|
extraPackages = [ pkgs.nixfmt ];
|
||||||
};
|
};
|
||||||
|
|
||||||
edit-indirect = {
|
edit-indirect.enable = true;
|
||||||
enable = true;
|
|
||||||
bind = { "C-c '" = "edit-indirect-region"; };
|
|
||||||
};
|
|
||||||
|
|
||||||
org = {
|
org = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -551,8 +551,8 @@ in {
|
||||||
(setq-default python-indent-guess-indent-offset-verbose nil)
|
(setq-default python-indent-guess-indent-offset-verbose nil)
|
||||||
(defun my/org-babel-execute:python-session (body params)
|
(defun my/org-babel-execute:python-session (body params)
|
||||||
(let ((session-name (cdr (assq :session params))))
|
(let ((session-name (cdr (assq :session params))))
|
||||||
(when (not (eq session-name "none"))
|
(when (not (eq session-name "none"))
|
||||||
(org-babel-python-initiate-session session-name))))
|
(org-babel-python-initiate-session session-name))))
|
||||||
(advice-add #'org-babel-execute:python :before #'my/org-babel-execute:python-session)
|
(advice-add #'org-babel-execute:python :before #'my/org-babel-execute:python-session)
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
@ -576,6 +576,98 @@ in {
|
||||||
(setq sql-sqlite-program "${pkgs.sqlite}/bin/sqlite3")
|
(setq sql-sqlite-program "${pkgs.sqlite}/bin/sqlite3")
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
meow = {
|
||||||
|
enable = true;
|
||||||
|
config = ''
|
||||||
|
(defun meow-setup ()
|
||||||
|
(setq meow-cheatsheet-layout meow-cheatsheet-layout-colemak)
|
||||||
|
(meow-motion-overwrite-define-key
|
||||||
|
;; Use e to move up, n to move down.
|
||||||
|
;; Since special modes usually use n to move down, we only overwrite e here.
|
||||||
|
'("e" . meow-prev)
|
||||||
|
'("<escape>" . ignore))
|
||||||
|
(meow-leader-define-key
|
||||||
|
'("?" . meow-cheatsheet)
|
||||||
|
;; To execute the originally e in MOTION state, use SPC e.
|
||||||
|
'("e" . "H-e")
|
||||||
|
'("1" . meow-digit-argument)
|
||||||
|
'("2" . meow-digit-argument)
|
||||||
|
'("3" . meow-digit-argument)
|
||||||
|
'("4" . meow-digit-argument)
|
||||||
|
'("5" . meow-digit-argument)
|
||||||
|
'("6" . meow-digit-argument)
|
||||||
|
'("7" . meow-digit-argument)
|
||||||
|
'("8" . meow-digit-argument)
|
||||||
|
'("9" . meow-digit-argument)
|
||||||
|
'("0" . meow-digit-argument))
|
||||||
|
(meow-normal-define-key
|
||||||
|
'("0" . meow-expand-0)
|
||||||
|
'("1" . meow-expand-1)
|
||||||
|
'("2" . meow-expand-2)
|
||||||
|
'("3" . meow-expand-3)
|
||||||
|
'("4" . meow-expand-4)
|
||||||
|
'("5" . meow-expand-5)
|
||||||
|
'("6" . meow-expand-6)
|
||||||
|
'("7" . meow-expand-7)
|
||||||
|
'("8" . meow-expand-8)
|
||||||
|
'("9" . meow-expand-9)
|
||||||
|
'("-" . negative-argument)
|
||||||
|
'(";" . meow-reverse)
|
||||||
|
'("," . meow-inner-of-thing)
|
||||||
|
'("." . meow-bounds-of-thing)
|
||||||
|
'("[" . meow-beginning-of-thing)
|
||||||
|
'("]" . meow-end-of-thing)
|
||||||
|
'("/" . meow-visit)
|
||||||
|
'("a" . meow-append)
|
||||||
|
'("A" . meow-open-below)
|
||||||
|
'("b" . meow-back-word)
|
||||||
|
'("B" . meow-back-symbol)
|
||||||
|
'("c" . meow-change)
|
||||||
|
'("d" . meow-delete)
|
||||||
|
'("e" . meow-prev)
|
||||||
|
'("E" . meow-prev-expand)
|
||||||
|
'("f" . meow-find)
|
||||||
|
'("g" . meow-cancel-selection)
|
||||||
|
'("G" . meow-grab)
|
||||||
|
'("h" . meow-left)
|
||||||
|
'("H" . meow-left-expand)
|
||||||
|
'("i" . meow-right)
|
||||||
|
'("I" . meow-right-expand)
|
||||||
|
'("j" . meow-join)
|
||||||
|
'("k" . meow-kill)
|
||||||
|
'("l" . meow-line)
|
||||||
|
'("L" . meow-goto-line)
|
||||||
|
'("m" . meow-mark-word)
|
||||||
|
'("M" . meow-mark-symbol)
|
||||||
|
'("n" . meow-next)
|
||||||
|
'("N" . meow-next-expand)
|
||||||
|
'("o" . meow-block)
|
||||||
|
'("O" . meow-to-block)
|
||||||
|
'("p" . meow-yank)
|
||||||
|
'("q" . meow-quit)
|
||||||
|
'("r" . meow-replace)
|
||||||
|
'("s" . meow-insert)
|
||||||
|
'("S" . meow-open-above)
|
||||||
|
'("t" . meow-till)
|
||||||
|
'("u" . meow-undo)
|
||||||
|
'("U" . meow-undo-in-selection)
|
||||||
|
'("v" . meow-search)
|
||||||
|
'("w" . meow-next-word)
|
||||||
|
'("W" . meow-next-symbol)
|
||||||
|
'("x" . meow-delete)
|
||||||
|
'("X" . meow-backward-delete)
|
||||||
|
'("y" . meow-save)
|
||||||
|
'("z" . meow-pop-selection)
|
||||||
|
'("'" . repeat)
|
||||||
|
'("<escape>" . ignore)))
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
separedit = {
|
||||||
|
enable = true;
|
||||||
|
bind = { "C-c '" = "separedit"; };
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,7 +54,7 @@
|
||||||
package = pkgs.nixpkgs-unstable.starship;
|
package = pkgs.nixpkgs-unstable.starship;
|
||||||
settings = {
|
settings = {
|
||||||
format =
|
format =
|
||||||
"$os[](fg:#979797 bg:#444444)$directory$git_branch$git_status[](fg:#444444)$fill[](fg:#444444)$cmd_duration[](fg:#979797 bg:#444444)$time$line_break$character";
|
"$os[](fg:#979797 bg:#444444)$directory$git_branch$git_status[](fg:#444444)$fill[](fg:#444444)$cmd_duration$time$line_break$character";
|
||||||
fill = {
|
fill = {
|
||||||
symbol = "·";
|
symbol = "·";
|
||||||
style = "fg:#505050";
|
style = "fg:#505050";
|
||||||
|
@ -63,7 +63,7 @@
|
||||||
disabled = false;
|
disabled = false;
|
||||||
min_time = 1500;
|
min_time = 1500;
|
||||||
style = "fg:#979797 bg:#444444";
|
style = "fg:#979797 bg:#444444";
|
||||||
format = "[ $duration ]($style)";
|
format = "[ $duration ]($style)";
|
||||||
};
|
};
|
||||||
os = {
|
os = {
|
||||||
disabled = false;
|
disabled = false;
|
||||||
|
@ -126,6 +126,7 @@
|
||||||
np = "nix-shell -p";
|
np = "nix-shell -p";
|
||||||
hms = "home-manager switch";
|
hms = "home-manager switch";
|
||||||
cd = "z";
|
cd = "z";
|
||||||
|
l = "ls -1";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue