File tree 6 files changed +194
-226
lines changed
6 files changed +194
-226
lines changed Original file line number Diff line number Diff line change 55
55
│ │ ├── emacs
56
56
│ │ │ ├── crol.el
57
57
│ │ │ ├── default.nix
58
+ │ │ │ ├── epkgs.nix
58
59
│ │ │ └── init.el
59
60
│ │ ├── neovim
60
61
│ │ │ ├── nvim
397
398
├── shell.nix
398
399
└── TODO.md
399
400
400
- 80 directories, 299 files
401
+ 80 directories, 300 files
401
402
402
403
```
403
404
Original file line number Diff line number Diff line change
1
+
2
+ (require 'ansi-color )
3
+
4
+ (defvar crol-colorize-compilation-buffer-enabled nil )
5
+ (defun crol-colorize-compilation-buffer ()
6
+ (when crol-colorize-compilation-buffer-enabled
7
+ (let ((inhibit-read-only t ))
8
+ (ansi-color-apply-on-region (point-min ) (point-max )))))
9
+
10
+ (defun crol-toggle-colorize-compilation-buffer ()
11
+ (interactive )
12
+ (setq crol-colorize-compilation-buffer-enabled
13
+ (not crol-colorize-compilation-buffer-enabled))
14
+ (if crol-colorize-compilation-buffer-enabled
15
+ (add-hook 'compilation-filter-hook 'crol-colorize-compilation-buffer )
16
+ (remove-hook 'compilation-filter-hook #'crol-colorize-compilation-buffer ))
17
+ (message " Colorizing compilation buffer: %s "
18
+ (if crol-colorize-compilation-buffer-enabled " ON" " OFF" )))
19
+
20
+
21
+
22
+ (defun crol-evil-visual-selection-info ()
23
+ " Show the number of selected characters/lines in visual mode."
24
+ (when (evil-visual-state-p)
25
+ (let* ((beg (region-beginning ))
26
+ (end (region-end ))
27
+ (lines (count-lines beg end))
28
+ (chars (- end beg)))
29
+ (format " [V:%d L %d C] " (1+ lines) (1+ chars)))))
30
+
31
+
32
+ (defun crol-buffer-switch ()
33
+ " ido switch outside of project & only project buffers inside one"
34
+ (interactive )
35
+ (if (project-current )
36
+ (project-switch-to-buffer (project--read-project-buffer))
37
+ (ido-switch-buffer )))
38
+
39
+ (defun crol-list-buffer ()
40
+ " list all duffers outside of project & only project buffers inside one"
41
+ (interactive )
42
+ (if (project-current )
43
+ (project-list-buffers)
44
+ (list-buffers )))
Original file line number Diff line number Diff line change 1
1
{ pkgs , ...} : let
2
- emacs = pkgs . emacs-pgtk ;
3
- epkgs = pkgs . emacsPackages ;
4
-
5
- corfu = epkgs . corfu . overrideAttrs ( oldAttrs : {
6
- version = "1.7" ;
7
- src = pkgs . fetchFromGitHub {
8
- owner = "minad" ;
9
- repo = "corfu" ;
10
- rev = "2c476b442ccfda9935e472b26d9cd60d45726560" ;
11
- sha256 = "sha256-Y+dcVX2zXkYaHvsS+SuhqqCnwwm188dj0VJf7BYxzHs=" ;
12
- } ;
13
- } ) ;
2
+ # emacs-unstable-pgtk(wayland native), emacs-unstable (latest tag)
3
+ # emacs-git-pgtk (latest commit in master)
4
+ emacs = pkgs . emacs-unstable ;
14
5
in {
15
- home . packages = with epkgs ;
16
- [
17
- # modes
18
- nix-mode
19
- web-mode
20
- go-mode
21
- lua-mode
22
- php-mode
23
- rust-mode
24
- groovy-mode
25
- yuck-mode
26
-
27
- # non programming
28
- ron-mode
29
- markdown-mode
30
-
31
- # lsp
32
- eglot
33
-
34
- # cmp
35
- corfu
36
- yasnippet
37
-
38
- # fmt
39
- clang-format
40
- format-all
41
-
42
- # git
43
- magit
44
- diff-hl
45
- dired-gitignore
46
-
47
- undo-tree
48
-
49
- fzf
50
- rg
51
- smex
52
-
53
- popwin
54
-
55
- evil
56
- evil-collection
57
- evil-surround
58
- evil-goggles
59
-
60
- # misc
61
- ( pkgs . ispell )
62
- elcord
63
- org-fragtog
64
- nerd-icons
65
- nerd-icons-dired
66
- vterm
67
- direnv
68
- gcmh
69
- ]
70
- ++ [
71
- pkgs . tetex
72
- epkgs . "ido-completing-read+"
73
- pkgs . perl # magit needs
74
- ] ;
75
-
6
+ imports = [ ./epkgs.nix ] ;
76
7
home . file . ".emacs.d/init.el" . source = ./init.el ;
8
+ home . file . ".emacs.d/crol.el" . source = ./crol.el ;
77
9
78
10
services . emacs = {
79
11
enable = true ;
Original file line number Diff line number Diff line change
1
+ {
2
+ pkgs ,
3
+ lib ,
4
+ ...
5
+ } : let
6
+ epkgs = pkgs . emacsPackages ;
7
+
8
+ corfu = epkgs . corfu . overrideAttrs ( oldAttrs : {
9
+ version = "1.7" ;
10
+ src = pkgs . fetchFromGitHub {
11
+ owner = "minad" ;
12
+ repo = "corfu" ;
13
+ rev = "2c476b442ccfda9935e472b26d9cd60d45726560" ;
14
+ sha256 = "sha256-Y+dcVX2zXkYaHvsS+SuhqqCnwwm188dj0VJf7BYxzHs=" ;
15
+ } ;
16
+ } ) ;
17
+
18
+ plugins = with epkgs ;
19
+ [
20
+ # modes
21
+ nix-mode
22
+ web-mode
23
+ go-mode
24
+ lua-mode
25
+ php-mode
26
+ rust-mode
27
+ groovy-mode
28
+ yuck-mode
29
+
30
+ # non programming
31
+ ron-mode
32
+ markdown-mode
33
+
34
+ # lsp
35
+ eglot
36
+
37
+ # cmp
38
+ corfu
39
+ yasnippet
40
+
41
+ # fmt
42
+ clang-format
43
+ format-all
44
+
45
+ # git
46
+ magit
47
+ diff-hl
48
+ dired-gitignore
49
+
50
+ undo-tree
51
+
52
+ fzf
53
+ rg
54
+ smex
55
+
56
+ popwin
57
+
58
+ evil
59
+ evil-collection
60
+ evil-surround
61
+ evil-goggles
62
+
63
+ # misc
64
+ ( pkgs . ispell )
65
+ elcord
66
+ org-fragtog
67
+ nerd-icons
68
+ nerd-icons-dired
69
+ vterm
70
+ direnv
71
+ gcmh
72
+ ]
73
+ ++ [
74
+ epkgs . "ido-completing-read+"
75
+ ] ;
76
+ in {
77
+ home . packages =
78
+ plugins
79
+ ++ [
80
+ pkgs . tetex
81
+ pkgs . perl # magit needs
82
+ ] ;
83
+
84
+ home . file . ".emacs.d/pkgs.el" . text = let
85
+ req = p : "(require '" + ( lib . getName p ) + ")" ;
86
+ in
87
+ builtins . concatStringsSep "\n " ( map req plugins ) ;
88
+ }
You can’t perform that action at this time.
0 commit comments