+3
-2
.config/emacs/init.el
+3
-2
.config/emacs/init.el
···
67
67
(setq desktop-path `(,temp-dir)))
68
68
(setq-default indent-tabs-mode nil)
69
69
(setq-default tab-width 4)
70
+
(setq-default display-line-numbers-width 4)
70
71
(setq desktop-restore-frames nil)
71
72
(setq use-dialog-box nil)
72
73
(setq use-short-answers t)
···
283
284
(:features)
284
285
(:format (format-all--buffer-easy executable "-")))
285
286
(setq-default format-all-formatters
286
-
'(("C" (clang-format))
287
+
`(("C" (clang-format))
287
288
("C++" (clang-format))
288
289
("Rust" (rustfmt))
289
290
("TOML" (taplo-fmt))
290
291
("CMake" (gersemi))
291
-
("Shell" (shfmt)))))
292
+
("Shell" (shfmt "-i" ,(format "%d" tab-width))))))
292
293
293
294
294
295
(use-package emacs
+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
+1
-1
.config/jj/config.toml
+1
-1
.config/jj/config.toml
+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 = "โช "
+15
-19
.config/nvim/lazy-lock.json
+15
-19
.config/nvim/lazy-lock.json
···
1
1
{
2
-
"blink.cmp": { "branch": "main", "commit": "bae4bae0eedd1fa55f34b685862e94a222d5c6f8" },
3
-
"conform.nvim": { "branch": "master", "commit": "973f3cb73887d510321653044791d7937c7ec0fa" },
4
-
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
5
-
"fzf-lua": { "branch": "main", "commit": "c9a2deb7bf2d8deaf56a229ff9c7bfeffa8d7d53" },
6
-
"gitsigns.nvim": { "branch": "main", "commit": "b01433169be710d6c69f7b4ee264d9670698b831" },
7
-
"grug-far.nvim": { "branch": "main", "commit": "45981a9af7f4e666a3cdaedb1d21d2ab926727a2" },
8
-
"hunk.nvim": { "branch": "master", "commit": "1e0a4d719c780bb8b0690a54915601508ced321e" },
9
-
"kanagawa.nvim": { "branch": "master", "commit": "debe91547d7fb1eef34ce26a5106f277fbfdd109" },
10
-
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
11
-
"lualine.nvim": { "branch": "master", "commit": "a94fc68960665e54408fe37dcf573193c4ce82c9" },
12
-
"mini.files": { "branch": "main", "commit": "5b9431cf5c69b8e69e5a67d2d12338a3ac2e1541" },
13
-
"mini.surround": { "branch": "main", "commit": "b12fcfefd6b9b7c9e9a773bc0e3e07ae20c03351" },
14
-
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
15
-
"nvim-notify": { "branch": "master", "commit": "397c7c1184745fca649e5104de659e6392ef5a4d" },
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" },
16
12
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
17
-
"nvim-web-devicons": { "branch": "master", "commit": "0422a19d9aa3aad2c7e5cca167e5407b13407a9d" },
18
-
"persistence.nvim": { "branch": "main", "commit": "166a79a55bfa7a4db3e26fc031b4d92af71d0b51" },
19
-
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
20
-
"todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" },
21
-
"which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" }
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" }
22
18
}
+5
-30
.config/nvim/lua/config/keys.lua
+5
-30
.config/nvim/lua/config/keys.lua
···
20
20
vim.keymap.set("n", "<leader>bb", function()
21
21
vim.cmd.b("#")
22
22
end, { desc = "Go to last buffer" })
23
-
vim.keymap.set("n", "<leader>bd", function()
24
-
local bufnr = vim.api.nvim_get_current_buf()
25
23
26
-
if not vim.bo[bufnr].modified then
27
-
vim.cmd.bd()
28
-
return
29
-
end
30
-
31
-
local buf_name = vim.api.nvim_buf_get_name(bufnr)
32
-
local choice = vim.fn.confirm("Unsaved changes in " .. buf_name .. ", save?", "&Yes\n&No\n&Cancel", "Cancel", "Question")
33
-
34
-
if choice == 1 then
35
-
vim.notify("Saved buffer", vim.log.levels.INFO, { title = buf_name })
36
-
vim.cmd.write()
37
-
vim.api.nvim_buf_delete(bufnr, { force = false })
38
-
elseif choice == 2 then
39
-
vim.notify("Closed buffer without saving", vim.log.levels.WARN, { title = buf_name })
40
-
vim.api.nvim_buf_delete(bufnr, { force = true })
41
-
else
42
-
vim.notify("Cancelled closing buffer", vim.log.levels.WARN, { title = buf_name })
43
-
end
44
-
end, { desc = "Close current buffer" })
45
-
46
-
vim.keymap.set("n", "<leader>bD", function()
47
-
vim.api.nvim_buf_delete(vim.api.nvim_get_current_buf(), { force = true })
48
-
49
-
local bufnr = vim.api.nvim_get_current_buf()
50
-
if vim.bo[bufnr].modified then
51
-
vim.notify("Closed buffer without saving", vim.log.levels.WARN)
52
-
end
53
-
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" })
-42
.config/nvim/lua/plugins/completion.lua
-42
.config/nvim/lua/plugins/completion.lua
···
1
-
return {
2
-
"saghen/blink.cmp",
3
-
version = "v1.*",
4
-
dependencies = {
5
-
"rafamadriz/friendly-snippets",
6
-
},
7
-
opts = {
8
-
keymap = {
9
-
preset = "default",
10
-
["<CR>"] = { "accept", "fallback" },
11
-
["<C-L>"] = { "snippet_forward", "fallback" },
12
-
["<C-H>"] = { "snippet_backward", "fallback" },
13
-
["<Tab>"] = { "fallback" },
14
-
["<S-Tab>"] = { "fallback" },
15
-
},
16
-
appearance = {
17
-
use_nvim_cmp_as_default = true,
18
-
nerd_font_variant = "mono",
19
-
},
20
-
signature = {
21
-
enabled = true,
22
-
},
23
-
cmdline = {
24
-
enabled = false,
25
-
},
26
-
completion = {
27
-
menu = {
28
-
draw = {
29
-
treesitter = { "lsp" },
30
-
},
31
-
},
32
-
documentation = {
33
-
auto_show = true,
34
-
auto_show_delay_ms = 200,
35
-
},
36
-
ghost_text = {
37
-
enabled = false,
38
-
},
39
-
},
40
-
},
41
-
opts_extend = { "sources.default" },
42
-
}
+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/starship.toml
+1
-1
.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"