aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKatharina Fey <kookie@spacekookie.de>2020-09-21 15:15:24 +0200
committerKatharina Fey <kookie@spacekookie.de>2020-09-21 15:15:24 +0200
commit6a27c5041ee1f2379dade8acc2cddf73ecee4290 (patch)
tree5caec16df442e5abd726e118db86ccc6ba5a676c
parentf3f40b4b1ee0af3cea5926d04bab7d097d47833f (diff)
modules/devel: updating emacs, lorri and gen-shell
-rw-r--r--modules/base/fish/functions/gen-shell.fish8
-rw-r--r--modules/workstation/devel/lorri/default.nix11
-rw-r--r--modules/workstation/emacs/default.nix6
-rw-r--r--modules/workstation/emacs/init.el11
4 files changed, 22 insertions, 14 deletions
diff --git a/modules/base/fish/functions/gen-shell.fish b/modules/base/fish/functions/gen-shell.fish
index 0c48fe2a5c3..03ec597cd68 100644
--- a/modules/base/fish/functions/gen-shell.fish
+++ b/modules/base/fish/functions/gen-shell.fish
@@ -4,11 +4,13 @@ function gen-shell
return 1
end
- if test -e default.nix
- echo "Refusing to override existing `default.nix`!"
+ if test -e shell.nix
+ echo "Refusing to override existing `shell.nix`!"
return 1
end
+ echo 'eval "$(lorri direnv)"' > .envrc
+
set name $argv[1]
echo "with import <nixpkgs> {};
@@ -17,6 +19,6 @@ stdenv.mkDerivation {
buildInputs = with pkgs; [
# Hier könnte Ihre Werbung stehen
];
-}" > default.nix
+}" > shell.nix
bat default.nix
end
diff --git a/modules/workstation/devel/lorri/default.nix b/modules/workstation/devel/lorri/default.nix
index 74b0801e6b8..ab72c9b25ed 100644
--- a/modules/workstation/devel/lorri/default.nix
+++ b/modules/workstation/devel/lorri/default.nix
@@ -1,14 +1,5 @@
{ lib, pkgs, ... }:
-let
- rev = "f20a3230bf7e93c4b5b41dff85740763d7ce02c8";
- lorriSrc = fetchTarball {
- url = "https://github.com/target/lorri/archive/${rev}.tar.gz";
- sha256 = "1lp77rms6zlx04kz7nxar8ksay8xcl8bmi7nijgwyapzjy5q5cmq";
- };
-in
{
- home.packages = [
- (import lorriSrc { inherit pkgs; })
- ];
+ services.lorri.enable = true;
}
diff --git a/modules/workstation/emacs/default.nix b/modules/workstation/emacs/default.nix
index dd5608f1abb..63135a56f51 100644
--- a/modules/workstation/emacs/default.nix
+++ b/modules/workstation/emacs/default.nix
@@ -17,24 +17,28 @@ let
python-mode
rust-mode
+ color-identifiers-mode
color-theme-sanityinc-tomorrow
company
company-lsp
direnv
fzf
+ ido-vertical-mode
ledger-mode
lsp-ui
magit
monokai-theme
+ multiple-cursors
notmuch
org
+ protobuf-mode
scad-mode
smex
sublimity
undo-tree
visual-fill-column
- yasnippet
which-key
+ yasnippet
]));
in
{
diff --git a/modules/workstation/emacs/init.el b/modules/workstation/emacs/init.el
index 4becf18a850..28b8146f632 100644
--- a/modules/workstation/emacs/init.el
+++ b/modules/workstation/emacs/init.el
@@ -6,6 +6,8 @@
(require 'magit)
+(require 'multiple-cursors)
+
(require 'org)
(add-to-list 'auto-mode-alist '("\\.org$" . org-mode))
@@ -116,6 +118,7 @@
;; Better completion handling with lsp-mode
(require 'company-lsp)
(push 'company-lsp company-backends)
+(setq lsp-ui-doc-position 'top)
(setq lsp-ui-doc-max-width 45)
(setq lsp-ui-doc-max-height 10)
@@ -270,6 +273,14 @@
(global-set-key (kbd "C-M-<up>") 'move-section-up)
(global-set-key (kbd "C-M-<down>") 'move-section-down)
+;;; Multiple cursors bindings
+(global-set-key (kbd "C-H-c C-H-c") 'mc/edit-lines)
+(global-set-key (kbd "C->") 'mc/mark-next-like-this)
+(global-set-key (kbd "C-<") 'mc/mark-previous-like-this)
+(global-set-key (kbd "C-c C-<") 'mc/mark-all-like-this)
+
+
+
;;; Org mode bindings replicated here to make it easier for me
(define-key org-mode-map "\C-c\C-o" 'org-open-at-point-in-current-window)
(define-key org-mode-map "\C-S-<up>" nil)