+70
-9
.config/emacs/init.el
+70
-9
.config/emacs/init.el
···
24
24
(add-to-list 'package-archives
25
25
'("melpa" . "https://melpa.org/packages/") t)
26
26
27
+
;;;;;;;;;;;;;;
28
+
;; LOAD ENV ;;
29
+
;;;;;;;;;;;;;;
30
+
(setq krg-env-file-name ".env.el")
31
+
(when window-system
32
+
(let ((env-file (conf-dir krg-env-file-name)))
33
+
(when (file-exists-p env-file)
34
+
(load env-file))))
35
+
36
+
(defun update-env-file()
37
+
(interactive)
38
+
(let ((shell-path (getenv "PATH"))
39
+
(env-file (conf-dir krg-env-file-name)))
40
+
(with-temp-buffer
41
+
(make-local-variable 'make-backup-files)
42
+
(setq make-backup-files nil)
43
+
(insert
44
+
";;; " krg-env-file-name " -*- lexical-binding: t; -*-\n"
45
+
";;; " (current-time-string) " " (nth 1 (current-time-zone)) ".\n"
46
+
"(setenv \"PATH\" \"" shell-path "\")\n"
47
+
"(setq exec-path (split-string \"" shell-path "\" \":\"))")
48
+
(when (file-writable-p env-file)
49
+
(write-file env-file)))))
50
+
27
51
;;;;;;;;;;;;;;;;;;;;
28
52
;; BASIC SETTINGS ;;
29
53
;;;;;;;;;;;;;;;;;;;;
30
-
(tool-bar-mode -1)
54
+
(when window-system
55
+
(tool-bar-mode -1)
56
+
(scroll-bar-mode -1))
31
57
(menu-bar-mode -1)
32
-
(scroll-bar-mode -1)
33
58
(global-display-line-numbers-mode 1)
34
59
(prefer-coding-system 'utf-8-unix)
35
60
(setq inhibit-splash-screen t)
···
42
67
(setq desktop-path `(,temp-dir)))
43
68
(setq-default indent-tabs-mode nil)
44
69
(setq-default tab-width 4)
70
+
(setq-default display-line-numbers-width 4)
71
+
(setq desktop-restore-frames nil)
72
+
(setq use-dialog-box nil)
73
+
(setq use-short-answers t)
74
+
(setq dabbrev-case-replace nil)
75
+
(setq read-file-name-completion-ignore-case t)
76
+
(setq switch-to-prev-buffer-skip-regexp "\\*[^\\*]+\\*")
45
77
(setq c-basic-offset 4)
46
78
(setq scroll-margin 10)
47
79
(setq select-enable-clipboard nil)
···
95
127
(kbd "C-e") 'move-end-of-line)
96
128
(evil-define-key 'normal 'global
97
129
(kbd "<leader>.") 'find-file
98
-
(kbd "<leader>bb") 'switch-to-buffer
130
+
(kbd "<leader>bb") 'evil-switch-to-windows-last-buffer
131
+
(kbd "<leader>bB") 'switch-to-buffer
99
132
(kbd "<leader>bs") 'consult-buffer
100
133
(kbd "<leader>bB") 'project-switch-to-buffer
101
134
(kbd "<leader>bd") 'kill-current-buffer
···
174
207
(define-key corfu-map (kbd "C-p") 'corfu-previous)
175
208
(define-key corfu-map (kbd "C-l") 'corfu-insert)
176
209
(define-key corfu-map (kbd "C-e") 'corfu-reset))
210
+
(use-package corfu-terminal
211
+
:ensure t
212
+
:after corfu
213
+
:init
214
+
(unless (display-graphic-p)
215
+
(corfu-terminal-mode +1)))
177
216
(use-package cape
178
217
:ensure t
179
218
:bind ("C-c p" . cape-prefix-map)
···
185
224
;;;;;;;;;;;;;;;;;;;;
186
225
;; LANGUAGE MODES ;;
187
226
;;;;;;;;;;;;;;;;;;;;
188
-
(use-package cmake-mode :ensure t)
227
+
(use-package cmake-mode :ensure t :if (executable-find "cmake"))
189
228
(use-package toml-mode :ensure t)
190
-
(use-package zig-mode :ensure t)
191
-
(use-package rust-mode :ensure t)
229
+
(use-package zig-mode :ensure t :if (executable-find "zig"))
230
+
(use-package rust-mode :ensure t :if (or (executable-find "cargo") (executable-find "rustc")))
192
231
(mapc 'load (file-expand-wildcards (conf-dir "local-modes/*.el")))
193
232
194
233
···
205
244
:hook (completion-list-mode . consult-preview-at-point-mode)
206
245
)
207
246
247
+
(use-package orderless
248
+
:ensure t
249
+
:custom
250
+
(completion-styles '(orderless basic))
251
+
(completion-category-overrides '((file (styles basic partial-completion)))))
252
+
208
253
(use-package hl-todo
209
254
:ensure t
210
255
:hook (prog-mode . hl-todo-mode)
···
220
265
221
266
(use-package git-gutter
222
267
:ensure t
268
+
:init
269
+
(setq git-gutter:update-interval 2)
223
270
:config
224
271
(global-git-gutter-mode +1))
225
272
···
229
276
(use-package format-all
230
277
:ensure t
231
278
:after language-id
232
-
:commands format-all-mode
233
-
:hook (prog-mode . format-all-mode)
234
-
:config)
279
+
:config
280
+
(define-format-all-formatter gersemi
281
+
(:executable "gersemi")
282
+
(:install)
283
+
(:languages "CMake")
284
+
(:features)
285
+
(:format (format-all--buffer-easy executable "-")))
286
+
(setq-default format-all-formatters
287
+
`(("C" (clang-format))
288
+
("C++" (clang-format))
289
+
("Rust" (rustfmt))
290
+
("TOML" (taplo-fmt))
291
+
("CMake" (gersemi))
292
+
("Shell" (shfmt "-i" ,(format "%d" tab-width))))))
235
293
236
294
237
295
(use-package emacs
···
283
341
(when window-system
284
342
(add-hook 'after-init-hook 'krg-load-persist-file)
285
343
(add-hook 'kill-emacs-hook 'krg-save-persist-file))
344
+
345
+
(unless window-system
346
+
(xterm-mouse-mode +1))
+32
.config/foot/foot.ini
+32
.config/foot/foot.ini
···
1
+
[main]
2
+
font = monospace:size=13
3
+
dpi-aware = yes
4
+
pad = 8x4
5
+
6
+
[colors]
7
+
foreground = dcd7ba
8
+
background = 1f1f28
9
+
10
+
selection-foreground = c8c093
11
+
selection-background = 2d4f67
12
+
13
+
regular0 = 090618
14
+
regular1 = c34043
15
+
regular2 = 76946a
16
+
regular3 = c0a36e
17
+
regular4 = 7e9cd8
18
+
regular5 = 957fb8
19
+
regular6 = 6a9589
20
+
regular7 = c8c093
21
+
22
+
bright0 = 727169
23
+
bright1 = e82424
24
+
bright2 = 98bb6c
25
+
bright3 = e6c384
26
+
bright4 = 7fb4ca
27
+
bright5 = 938aa9
28
+
bright6 = 7aa89f
29
+
bright7 = dcd7ba
30
+
31
+
16 = ffa066
32
+
17 = ff5d62
+2
.config/ghostty/config
+2
.config/ghostty/config
+111
.config/ghostty/cursor.glsl
+111
.config/ghostty/cursor.glsl
···
1
+
// Adapted from: https://github.com/KroneCorylus/shader-playground/blob/main/shaders/cursor_smear_fade.glsl
2
+
3
+
float getSdfRectangle(in vec2 p, in vec2 xy, in vec2 b)
4
+
{
5
+
vec2 d = abs(p - xy) - b;
6
+
return length(max(d, 0.0)) + min(max(d.x, d.y), 0.0);
7
+
}
8
+
9
+
// Based on Inigo Quilez's 2D distance functions article: https://iquilezles.org/articles/distfunctions2d/
10
+
// Potencially optimized by eliminating conditionals and loops to enhance performance and reduce branching
11
+
12
+
float seg(in vec2 p, in vec2 a, in vec2 b, inout float s, float d) {
13
+
vec2 e = b - a;
14
+
vec2 w = p - a;
15
+
vec2 proj = a + e * clamp(dot(w, e) / dot(e, e), 0.0, 1.0);
16
+
float segd = dot(p - proj, p - proj);
17
+
d = min(d, segd);
18
+
19
+
float c0 = step(0.0, p.y - a.y);
20
+
float c1 = 1.0 - step(0.0, p.y - b.y);
21
+
float c2 = 1.0 - step(0.0, e.x * w.y - e.y * w.x);
22
+
float allCond = c0 * c1 * c2;
23
+
float noneCond = (1.0 - c0) * (1.0 - c1) * (1.0 - c2);
24
+
float flip = mix(1.0, -1.0, step(0.5, allCond + noneCond));
25
+
s *= flip;
26
+
return d;
27
+
}
28
+
29
+
float getSdfParallelogram(in vec2 p, in vec2 v0, in vec2 v1, in vec2 v2, in vec2 v3) {
30
+
float s = 1.0;
31
+
float d = dot(p - v0, p - v0);
32
+
33
+
d = seg(p, v0, v3, s, d);
34
+
d = seg(p, v1, v0, s, d);
35
+
d = seg(p, v2, v1, s, d);
36
+
d = seg(p, v3, v2, s, d);
37
+
38
+
return s * sqrt(d);
39
+
}
40
+
41
+
vec2 normalize(vec2 value, float isPosition) {
42
+
return (value * 2.0 - (iResolution.xy * isPosition)) / iResolution.y;
43
+
}
44
+
45
+
float antialising(float distance) {
46
+
return 1. - smoothstep(0., normalize(vec2(2., 2.), 0.).x, distance);
47
+
}
48
+
49
+
float determineStartVertexFactor(vec2 a, vec2 b) {
50
+
// Conditions using step
51
+
float condition1 = step(b.x, a.x) * step(a.y, b.y); // a.x < b.x && a.y > b.y
52
+
float condition2 = step(a.x, b.x) * step(b.y, a.y); // a.x > b.x && a.y < b.y
53
+
54
+
// If neither condition is met, return 1 (else case)
55
+
return 1.0 - max(condition1, condition2);
56
+
}
57
+
58
+
vec2 getRectangleCenter(vec4 rectangle) {
59
+
return vec2(rectangle.x + (rectangle.z / 2.), rectangle.y - (rectangle.w / 2.));
60
+
}
61
+
float ease(float x) {
62
+
return pow(1.0 - x, 3.0);
63
+
}
64
+
65
+
const float DURATION = 0.25; //IN SECONDS
66
+
67
+
void mainImage(out vec4 fragColor, in vec2 fragCoord)
68
+
{
69
+
#if !defined(WEB)
70
+
fragColor = texture(iChannel0, fragCoord.xy / iResolution.xy);
71
+
#endif
72
+
// Normalization for fragCoord to a space of -1 to 1;
73
+
vec2 vu = normalize(fragCoord, 1.);
74
+
vec2 offsetFactor = vec2(-.5, 0.5);
75
+
76
+
// Normalization for cursor position and size;
77
+
// cursor xy has the postion in a space of -1 to 1;
78
+
// zw has the width and height
79
+
vec4 currentCursor = vec4(normalize(iCurrentCursor.xy, 1.), normalize(iCurrentCursor.zw, 0.));
80
+
vec4 previousCursor = vec4(normalize(iPreviousCursor.xy, 1.), normalize(iPreviousCursor.zw, 0.));
81
+
82
+
// When drawing a parellelogram between cursors for the trail i need to determine where to start at the top-left or top-right vertex of the cursor
83
+
float vertexFactor = determineStartVertexFactor(currentCursor.xy, previousCursor.xy);
84
+
float invertedVertexFactor = 1.0 - vertexFactor;
85
+
86
+
// Set every vertex of my parellogram
87
+
vec2 v0 = vec2(currentCursor.x + currentCursor.z * vertexFactor, currentCursor.y - currentCursor.w);
88
+
vec2 v1 = vec2(currentCursor.x + currentCursor.z * invertedVertexFactor, currentCursor.y);
89
+
vec2 v2 = vec2(previousCursor.x + currentCursor.z * invertedVertexFactor, previousCursor.y);
90
+
vec2 v3 = vec2(previousCursor.x + currentCursor.z * vertexFactor, previousCursor.y - previousCursor.w);
91
+
92
+
float sdfCurrentCursor = getSdfRectangle(vu, currentCursor.xy - (currentCursor.zw * offsetFactor), currentCursor.zw * 0.5);
93
+
float sdfTrail = getSdfParallelogram(vu, v0, v1, v2, v3);
94
+
95
+
float progress = clamp((iTime - iTimeCursorChange) / DURATION, 0.0, 1.0);
96
+
float easedProgress = ease(progress);
97
+
// Distance between cursors determine the total length of the parallelogram;
98
+
vec2 centerCC = getRectangleCenter(currentCursor);
99
+
vec2 centerCP = getRectangleCenter(previousCursor);
100
+
float lineLength = distance(centerCC, centerCP);
101
+
102
+
vec4 newColor = vec4(fragColor);
103
+
vec4 trailColor = mix(iPreviousCursorColor * 0.9, iCurrentCursorColor * 0.9, easedProgress);
104
+
trailColor = mix(trailColor, vec4(trailColor.rgb * 0.1, 0), easedProgress);
105
+
106
+
newColor = mix(newColor, trailColor, antialising(sdfTrail));
107
+
// Draw current cursor
108
+
newColor = mix(newColor, trailColor, antialising(sdfCurrentCursor));
109
+
newColor = mix(newColor, fragColor, step(sdfCurrentCursor, 0.));
110
+
fragColor = mix(fragColor, newColor, step(sdfCurrentCursor, easedProgress * lineLength));
111
+
}
+15
.config/i3bar-river/config.toml
+15
.config/i3bar-river/config.toml
···
1
+
command = "i3status-rs"
2
+
3
+
background = "#16161D"
4
+
color = "#C8C093"
5
+
separator = "#2A2A37"
6
+
tag_fg = "#54546D"
7
+
tag_bg = "#363646"
8
+
tag_focused_fg = "#DCD7BA"
9
+
tag_focused_bg = "#E46876"
10
+
tag_urgent_fg = "#DCD7BA"
11
+
tag_urgent_bg = "#FFA066"
12
+
13
+
separator_width = 0
14
+
tags_r = 6
15
+
blocks_r = 6
+53
.config/i3status-rust/config.toml
+53
.config/i3status-rust/config.toml
···
1
+
[theme]
2
+
theme = "slick"
3
+
[theme.overrides]
4
+
separator = "native"
5
+
alternating_tint_bg = "none"
6
+
alternating_tint_fg = "none"
7
+
idle_fg = "#DCD7BA"
8
+
idle_bg = "#363646"
9
+
good_fg = "#DCD7BA"
10
+
good_bg = "#76946A"
11
+
warning_fg = { link = "good_fg" }
12
+
warning_bg = "#FF9E3B"
13
+
critical_fg = { link = "good_fg" }
14
+
critical_bg = "#E82424"
15
+
info_fg = { link = "good_fg" }
16
+
info_bg = "#6A9589"
17
+
18
+
19
+
[icons]
20
+
icons = "awesome4"
21
+
22
+
[[block]]
23
+
block = "cpu"
24
+
info_cpu = 20
25
+
warning_cpu = 50
26
+
critical_cpu = 90
27
+
28
+
[[block]]
29
+
block = "memory"
30
+
format = " $icon $mem_total_used_percents.eng(w:2) "
31
+
format_alt = " $icon_swap $swap_used_percents.eng(w:2) "
32
+
33
+
[[block]]
34
+
block = "battery"
35
+
36
+
[[block]]
37
+
block = "sound"
38
+
[[block.click]]
39
+
button = "left"
40
+
cmd = "pavucontrol"
41
+
42
+
[[block]]
43
+
block = "time"
44
+
interval = 5
45
+
format = " $timestamp.datetime(f:'%a %d/%m %R') "
46
+
47
+
[[block]]
48
+
block = "custom"
49
+
command = "echo \uf011" # assumes fontawesome icons
50
+
interval = "once"
51
+
[[block.click]]
52
+
button = "left"
53
+
cmd = "loginctl `echo -e 'suspend\npoweroff\nreboot' | tofi --prompt-text 'power '`"
+3
-3
.config/jj/config.toml
+3
-3
.config/jj/config.toml
···
4
4
5
5
[ui]
6
6
default-command = "status"
7
-
diff-editor = ["nvim", "-c", "DiffEditor $left $right $output"]
7
+
diff-editor = ":builtin"
8
8
9
9
[aliases]
10
10
b = ["bookmark"]
···
12
12
bu = ["bookmark", "move", "--to", "@-"]
13
13
14
14
[signing]
15
-
sign-all = true
15
+
behavior = "own"
16
16
backend = "gpg"
17
17
18
18
[template-aliases]
···
27
27
indent("JJ: ", diff.summary()),
28
28
),
29
29
"\nJJ: ignore-rest\n",
30
-
indent(" " ,diff.git()),
30
+
diff.git(),
31
31
)
32
32
'''
+4
.config/mako/config
+4
.config/mako/config
+4
.config/nvim/init.lua
+4
.config/nvim/init.lua
···
17
17
vim.opt.cursorline = true
18
18
vim.opt.scrolloff = 10
19
19
vim.opt.hlsearch = true
20
+
if vim.fn.has("nvim-0.12") == 1 then
21
+
vim.opt.autocomplete = true
22
+
end
23
+
vim.opt.completeopt = "noselect,menuone,fuzzy"
20
24
vim.o.textwidth = 100
21
25
vim.o.colorcolumn = "+1"
22
26
vim.o.showbreak = "โช "
+16
-21
.config/nvim/lazy-lock.json
+16
-21
.config/nvim/lazy-lock.json
···
1
1
{
2
-
"blink.cmp": { "branch": "main", "commit": "5b0f52d42ecbb374695da1a93fa40eca4dc7a7ff" },
3
-
"conform.nvim": { "branch": "master", "commit": "70019124aa4f2e6838be9fbd2007f6d13b27a96d" },
4
-
"friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" },
5
-
"fzf-lua": { "branch": "main", "commit": "3d7e5db8fa56cfc2b92a38999016a51abe9e1d23" },
6
-
"gitsigns.nvim": { "branch": "main", "commit": "b544bd62623ca1b483d8b9bfb6d65805f112a320" },
7
-
"grug-far.nvim": { "branch": "main", "commit": "08f32182335754abf461dfb77b2c4e24bfe4d614" },
8
-
"hunk.nvim": { "branch": "master", "commit": "eb89245a66bdfce10436d15923bf4deb43d23c96" },
9
-
"kanagawa.nvim": { "branch": "master", "commit": "988082eb00b845e4afbcaa4fd8e903da8a3ab3b9" },
10
-
"lazy.nvim": { "branch": "main", "commit": "d8f26efd456190241afd1b0f5235fe6fdba13d4a" },
11
-
"lualine.nvim": { "branch": "master", "commit": "2a5bae925481f999263d6f5ed8361baef8df4f83" },
12
-
"mini.files": { "branch": "main", "commit": "4d2359158a171564d0a46d4a48da8b4491649f6a" },
13
-
"mini.surround": { "branch": "main", "commit": "aa5e245829dd12d8ff0c96ef11da28681d6049aa" },
14
-
"nui.nvim": { "branch": "main", "commit": "53e907ffe5eedebdca1cd503b00aa8692068ca46" },
15
-
"nvim-notify": { "branch": "master", "commit": "bd9cd51f9ef2f6326fc2bc9931d0718c1794e247" },
16
-
"nvim-snippets": { "branch": "main", "commit": "56b4052f71220144689caaa2e5b66222ba5661eb" },
17
-
"nvim-treesitter": { "branch": "master", "commit": "622a4a6ba76d1de52b72a965159213ae655b4ac7" },
18
-
"nvim-web-devicons": { "branch": "master", "commit": "5740b7382429d20b6ed0bbdb0694185af9507d44" },
19
-
"persistence.nvim": { "branch": "main", "commit": "f6aad7dde7fcf54148ccfc5f622c6d5badd0cc3d" },
20
-
"plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" },
21
-
"todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" },
22
-
"which-key.nvim": { "branch": "main", "commit": "1f8d414f61e0b05958c342df9b6a4c89ce268766" }
2
+
"conform.nvim": { "branch": "master", "commit": "9b8fa5e0b78168f68bee9bf886dc20f287c61e02" },
3
+
"fzf-lua": { "branch": "main", "commit": "3b53b0eb26972686c5825d7c0e63b3cffd0c4f2b" },
4
+
"gitsigns.nvim": { "branch": "main", "commit": "5813e4878748805f1518cee7abb50fd7205a3a48" },
5
+
"grug-far.nvim": { "branch": "main", "commit": "b58b2d65863f4ebad88b10a1ddd519e5380466e0" },
6
+
"kanagawa.nvim": { "branch": "master", "commit": "aef7f5cec0a40dbe7f3304214850c472e2264b10" },
7
+
"lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" },
8
+
"lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" },
9
+
"mini.surround": { "branch": "main", "commit": "88c52297ed3e69ecf9f8652837888ecc727a28ee" },
10
+
"nvim-bufdel": { "branch": "main", "commit": "523d58e94e7212fff3e05c247b962dc8f93bcfde" },
11
+
"nvim-notify": { "branch": "master", "commit": "8701bece920b38ea289b457f902e2ad184131a5d" },
12
+
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
13
+
"nvim-web-devicons": { "branch": "master", "commit": "8dcb311b0c92d460fac00eac706abd43d94d68af" },
14
+
"persistence.nvim": { "branch": "main", "commit": "b20b2a7887bd39c1a356980b45e03250f3dce49c" },
15
+
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
16
+
"todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" },
17
+
"which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" }
23
18
}
+8
-30
.config/nvim/lua/config/keys.lua
+8
-30
.config/nvim/lua/config/keys.lua
···
17
17
vim.cmd.bp()
18
18
end, { desc = "Previous buffer" })
19
19
20
-
vim.keymap.set("n", "<leader>bd", function()
21
-
local bufnr = vim.api.nvim_get_current_buf()
22
-
23
-
if not vim.bo[bufnr].modified then
24
-
vim.cmd.bd()
25
-
return
26
-
end
27
-
28
-
local buf_name = vim.api.nvim_buf_get_name(bufnr)
29
-
local choice = vim.fn.confirm("Unsaved changes in " .. buf_name .. ", save?", "&Yes\n&No\n&Cancel", "Cancel", "Question")
30
-
31
-
if choice == 1 then
32
-
vim.notify("Saved buffer", vim.log.levels.INFO, { title = buf_name })
33
-
vim.cmd.write()
34
-
vim.api.nvim_buf_delete(bufnr, { force = false })
35
-
elseif choice == 2 then
36
-
vim.notify("Closed buffer without saving", vim.log.levels.WARN, { title = buf_name })
37
-
vim.api.nvim_buf_delete(bufnr, { force = true })
38
-
else
39
-
vim.notify("Cancelled closing buffer", vim.log.levels.WARN, { title = buf_name })
40
-
end
41
-
end, { desc = "Close current buffer" })
20
+
vim.keymap.set("n", "<leader>bb", function()
21
+
vim.cmd.b("#")
22
+
end, { desc = "Go to last buffer" })
42
23
43
-
vim.keymap.set("n", "<leader>bD", function()
44
-
vim.api.nvim_buf_delete(vim.api.nvim_get_current_buf(), { force = true })
45
-
46
-
local bufnr = vim.api.nvim_get_current_buf()
47
-
if vim.bo[bufnr].modified then
48
-
vim.notify("Closed buffer without saving", vim.log.levels.WARN)
49
-
end
50
-
end, { desc = "Force close current buffer" })
24
+
vim.keymap.set("n", "<leader>bd", "<cmd>BufDel<cr>", { desc = "Close current buffer" })
25
+
vim.keymap.set("n", "<leader>bD", "<cmd>BufDel!<cr>", { desc = "Force close current buffer" })
26
+
vim.keymap.set("n", "<leader>bo", "<cmd>BufDelOthers<cr>", { desc = "Close all other buffers" })
27
+
vim.keymap.set("n", "<leader>bO", "<cmd>BufDelOthers!<cr>", { desc = "Force close all other buffers" })
28
+
vim.keymap.set("n", "<leader>bA", "<cmd>BufDelAll!<cr>", { desc = "Force close all buffers" })
-52
.config/nvim/lua/plugins/completion.lua
-52
.config/nvim/lua/plugins/completion.lua
···
1
-
return {
2
-
"saghen/blink.cmp",
3
-
lazy = false,
4
-
version = "v0.*",
5
-
dependencies = {
6
-
{
7
-
"garymjr/nvim-snippets",
8
-
opts = {
9
-
create_autocmd = true,
10
-
create_cmp_source = false,
11
-
friendly_snippets = true,
12
-
},
13
-
},
14
-
"rafamadriz/friendly-snippets",
15
-
},
16
-
opts = {
17
-
keymap = {
18
-
preset = "default",
19
-
["<CR>"] = { "accept", "fallback" },
20
-
["<C-K>"] = { "show_documentation", "hide_documentation" },
21
-
["<C-L>"] = { "snippet_forward", "fallback" },
22
-
["<C-H>"] = { "snippet_backward", "fallback" },
23
-
["<Tab>"] = { "fallback" },
24
-
["<S-Tab>"] = { "fallback" },
25
-
},
26
-
appearance = {
27
-
use_nvim_cmp_as_default = true,
28
-
nerd_font_variant = "mono",
29
-
},
30
-
signature = {
31
-
enabled = true,
32
-
},
33
-
sources = {
34
-
default = { "lsp", "path", "snippets", "buffer" },
35
-
cmdline = {},
36
-
},
37
-
completion = {
38
-
menu = {
39
-
draw = {
40
-
treesitter = { "lsp" },
41
-
},
42
-
},
43
-
documentation = {
44
-
auto_show = true,
45
-
auto_show_delay_ms = 200,
46
-
},
47
-
ghost_text = {
48
-
enabled = false,
49
-
},
50
-
},
51
-
},
52
-
}
+17
.config/nvim/lua/plugins/format.lua
+17
.config/nvim/lua/plugins/format.lua
···
16
16
},
17
17
}
18
18
19
+
local ok, local_fmt = pcall(require, "local_fmt")
20
+
if ok then
21
+
if local_fmt.ft_formatters ~= nil then
22
+
ft_formatters = vim.tbl_deep_extend("force", ft_formatters, local_fmt.ft_formatters)
23
+
end
24
+
if local_fmt.formatters ~= nil then
25
+
formatters = vim.tbl_deep_extend("force", formatters, local_fmt.formatters)
26
+
end
27
+
else
28
+
vim.print("error loading local_fmt")
29
+
end
30
+
19
31
return {
20
32
"stevearc/conform.nvim",
21
33
lazy = true,
···
36
48
end,
37
49
mode = { "x", "v" },
38
50
desc = "Format selection",
51
+
},
52
+
{
53
+
"<leader>ci",
54
+
"<cmd>ConformInfo<cr>",
55
+
desc = "Formatter info",
39
56
},
40
57
},
41
58
opts = {
-19
.config/nvim/lua/plugins/mini.lua
-19
.config/nvim/lua/plugins/mini.lua
···
1
1
---@type LazySpec
2
2
return {
3
3
{
4
-
"echasnovski/mini.files",
5
-
version = false,
6
-
opts = {
7
-
windows = { preview = true, width_preview = 80 },
8
-
options = {
9
-
use_as_default_explorer = false,
10
-
},
11
-
},
12
-
keys = {
13
-
{
14
-
"<leader>f",
15
-
function()
16
-
require("mini.files").open(vim.api.nvim_buf_get_name(0), true)
17
-
end,
18
-
desc = "Open mini files",
19
-
},
20
-
},
21
-
},
22
-
{
23
4
"echasnovski/mini.surround",
24
5
event = "VeryLazy",
25
6
opts = {
+3
-15
.config/nvim/lua/plugins/misc.lua
+3
-15
.config/nvim/lua/plugins/misc.lua
···
16
16
end,
17
17
},
18
18
{
19
-
"julienvincent/hunk.nvim",
20
-
dependencies = {
21
-
"MunifTanjim/nui.nvim",
22
-
},
23
-
cond = function()
24
-
return vim.fn.executable("jj") == 1
25
-
end,
26
-
cmd = { "DiffEditor" },
19
+
"ojroques/nvim-bufdel",
20
+
cmd = { "BufDel", "BufDelOthers", "BufDelAll" },
27
21
opts = {
28
-
ui = {
29
-
tree = {
30
-
mode = "flat",
31
-
},
32
-
layout = "horizontal",
33
-
},
22
+
quit = false,
34
23
},
35
-
config = true,
36
24
},
37
25
}
+1
-1
.config/nvim/lua/plugins/search.lua
+1
-1
.config/nvim/lua/plugins/search.lua
+93
.config/river/init
+93
.config/river/init
···
1
+
#!/bin/sh
2
+
3
+
USE_BSP=0
4
+
if [ -e "$(which river-bsp-layout)" ]; then
5
+
USE_BSP=1
6
+
fi
7
+
MAIN_MOD=Super
8
+
9
+
riverctl map normal $MAIN_MOD+Shift Return spawn ghostty
10
+
riverctl map normal $MAIN_MOD+Shift B spawn epiphany
11
+
riverctl map normal $MAIN_MOD+Shift E spawn emacs
12
+
riverctl map normal $MAIN_MOD Space spawn 'tofi-drun | xargs -I % riverctl spawn %'
13
+
14
+
riverctl map normal $MAIN_MOD Q close
15
+
16
+
riverctl map normal $MAIN_MOD+Shift+Control Q exit
17
+
18
+
riverctl map normal $MAIN_MOD H focus-view left
19
+
riverctl map normal $MAIN_MOD J focus-view next
20
+
riverctl map normal $MAIN_MOD K focus-view previous
21
+
riverctl map normal $MAIN_MOD L focus-view right
22
+
23
+
riverctl map normal $MAIN_MOD+Shift H swap left
24
+
riverctl map normal $MAIN_MOD+Shift J swap next
25
+
riverctl map normal $MAIN_MOD+Shift K swap previous
26
+
riverctl map normal $MAIN_MOD+Shift L swap right
27
+
28
+
riverctl map normal $MAIN_MOD+Shift+Control K zoom
29
+
30
+
riverctl map normal $MAIN_MOD Period focus-output next
31
+
riverctl map normal $MAIN_MOD Comma focus-output previous
32
+
33
+
riverctl map normal $MAIN_MOD+Shift Period send-to-output next
34
+
riverctl map normal $MAIN_MOD+Shift Comma send-to-output previous
35
+
36
+
riverctl map normal $MAIN_MOD Return zoom
37
+
38
+
if [ $USE_BSP -eq 1 ]; then
39
+
riverctl map normal $MAIN_MOD Up send-layout-cmd bsp-layout "--dec-hsplit 0.05"
40
+
riverctl map normal $MAIN_MOD Down send-layout-cmd bsp-layout "--inc-hsplit 0.05"
41
+
riverctl map normal $MAIN_MOD Left send-layout-cmd bsp-layout "--dec-vsplit 0.05"
42
+
riverctl map normal $MAIN_MOD Right send-layout-cmd bsp-layout "--inc-vsplit 0.05"
43
+
riverctl map normal $MAIN_MOD+Shift Up send-layout-cmd bsp-layout "--start-vsplit"
44
+
riverctl map normal $MAIN_MOD+Shift Right send-layout-cmd bsp-layout "--start-hsplit"
45
+
riverctl map normal $MAIN_MOD+Shift Left send-layout-cmd bsp-layout "--reverse"
46
+
else
47
+
riverctl map normal $MAIN_MOD Left send-layout-cmd rivertile "main-ratio -0.05"
48
+
riverctl map normal $MAIN_MOD Right send-layout-cmd rivertile "main-ratio +0.05"
49
+
fi
50
+
51
+
riverctl map-pointer normal $MAIN_MOD BTN_LEFT move-view
52
+
53
+
riverctl map-pointer normal $MAIN_MOD BTN_RIGHT resize-view
54
+
55
+
riverctl map-pointer normal $MAIN_MOD BTN_MIDDLE toggle-float
56
+
57
+
for i in $(seq 1 9); do
58
+
tags=$((1 << ($i - 1)))
59
+
60
+
riverctl map normal $MAIN_MOD $i set-focused-tags $tags
61
+
riverctl map normal $MAIN_MOD+Shift $i set-view-tags $tags
62
+
riverctl map normal $MAIN_MOD+Control $i toggle-focused-tags $tags
63
+
riverctl map normal $MAIN_MOD+Shift+Control $i toggle-view-tags $tags
64
+
done
65
+
66
+
riverctl map normal $MAIN_MOD+Shift F toggle-float
67
+
68
+
riverctl map normal $MAIN_MOD F toggle-fullscreen
69
+
70
+
riverctl background-color 0x16161d
71
+
riverctl border-color-unfocused 0x54546D
72
+
riverctl border-color-focused 0xE46876
73
+
riverctl border-width 5
74
+
75
+
riverctl set-repeat 50 300
76
+
77
+
riverctl rule-add -app-id 'float*' float
78
+
riverctl rule-add ssd
79
+
80
+
riverctl focus-follows-cursor normal
81
+
riverctl default-attach-mode below
82
+
83
+
if [ $USE_BSP -eq 1 ]; then
84
+
riverctl default-layout bsp-layout
85
+
river-bsp-layout --inner-gap 7 --outer-gap 18 --split-perc 0.5 &
86
+
else
87
+
riverctl default-layout rivertile
88
+
rivertile -view-padding 6 -outer-padding 6 &
89
+
fi
90
+
91
+
swaybg -m fill -i $(cat ~/.current_wallpaper) &
92
+
riverctl spawn i3bar-river
93
+
riverctl spawn mako
+2
-2
.config/starship.toml
+2
-2
.config/starship.toml
+1
-1
.gitconfig
+1
-1
.gitconfig
-1
.zshenv
-1
.zshenv
···
1
-
. "$HOME/.cargo/env"
+46
-9
.zshrc
+46
-9
.zshrc
···
5
5
6
6
ZSH_AUTOSUGGEST_STRATEGY=(history completion)
7
7
8
+
if [ -x "$(which jj)" ]; then
9
+
JJ_INSTALLED="$(which jj)"
10
+
fi
11
+
8
12
zinit wait lucid for \
9
13
atinit"zicompinit; zicdreplay" \
10
14
zdharma-continuum/fast-syntax-highlighting \
11
15
atload"_zsh_autosuggest_start" \
12
16
zsh-users/zsh-autosuggestions \
13
17
blockf atpull'zinit creinstall -q .' \
14
-
atload"source <(jj util completion zsh)" \
15
-
atload"source <(COMPLETE=zsh jj)" \
18
+
atload"if [ -v JJ_INSTALLED ]; then; source <(jj util completion zsh); fi" \
19
+
atload"if [ -v JJ_INSTALLED ]; then; source <(COMPLETE=zsh jj); fi" \
16
20
zsh-users/zsh-completions
17
21
18
22
zinit id-as"auto" for \
···
25
29
unsetopt LIST_BEEP
26
30
27
31
export PATH=~/.cargo/bin/:$PATH
28
-
export PATH=~/.zig/:$PATH
32
+
export PATH=~/.zvm/bin:$PATH
29
33
export PATH=~/.local/bin:$PATH
30
34
31
-
eval "$(starship init zsh)"
32
-
eval "$(zoxide init zsh --cmd cd)"
35
+
if [ -x "$(which starship)" ]; then
36
+
eval "$(starship init zsh)"
37
+
else
38
+
echo "starship not in path"
39
+
fi
40
+
41
+
if [ -x "$(which zoxide)" ]; then
42
+
eval "$(zoxide init zsh --cmd cd)"
43
+
else
44
+
echo "zoxide not in path"
45
+
fi
46
+
33
47
export GPG_TTY=$(tty)
34
-
export EDITOR='emacs -nw'
35
-
export MANPAGER="sh -c 'col -xbf | bat -p -l man'"
48
+
49
+
if [ -x "$(which nvim)" ]; then
50
+
export EDITOR='nvim'
51
+
elif [ -x "$(which vim)" ]; then
52
+
export EDITOR='vim'
53
+
else
54
+
export EDITOR='vi'
55
+
fi
56
+
57
+
if [ -x "$(which batman)" ]; then
58
+
eval "$(batman --export-env)"
59
+
fi
60
+
61
+
if [ -x "$(which opam)" ]; then
62
+
eval "$(opam env --switch=default)"
63
+
fi
64
+
65
+
66
+
LOCAL_ZSH_PATH="$HOME/.local.zsh"
67
+
if [ -f "$LOCAL_ZSH_PATH" ]; then
68
+
source "$LOCAL_ZSH_PATH"
69
+
fi
36
70
37
71
# git
38
72
alias gs="git status"
···
42
76
alias gc="git commit"
43
77
alias lzg=lazygit
44
78
45
-
46
-
alias ls="lsd"
79
+
if [ -x "$(which lsr)" ]; then
80
+
alias ls="lsr"
81
+
elif [ -x "$(which lsd)" ]; then
82
+
alias ls="lsd"
83
+
fi
47
84
alias l="ls -la"
48
85
alias la="ls -lA"