Configuration files

Compare changes

Choose any two refs to compare.

+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
··· 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
··· 24 24 window-padding-color = extend 25 25 26 26 theme = "Kanagawa Wave" 27 + 28 + custom-shader = "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 + }
+1 -1
.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"]
+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
··· 1 1 { 2 - "blink.cmp": { "branch": "main", "commit": "9bcb14b43852a6f2bfd5ac9ef29cb5cf09b1b39b" }, 3 - "conform.nvim": { "branch": "master", "commit": "8132ec733eed3bf415b97b76797ca41b59f51d7d" }, 4 - "friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" }, 5 - "fzf-lua": { "branch": "main", "commit": "20d64076669c8d94f94319dd1f451608156ee3da" }, 6 - "gitsigns.nvim": { "branch": "main", "commit": "1b0350ab707713b2bc6c236151f1a324175347b1" }, 7 - "grug-far.nvim": { "branch": "main", "commit": "b3f9412b1ed76f14cfc68e1ee899873544330c80" }, 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": "a92ba6f1bf9e1e0b9c6de50db1f5df7ca89cb9e4" }, 13 - "mini.surround": { "branch": "main", "commit": "1a2b59c77a0c4713a5bd8972da322f842f4821b1" }, 14 - "nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" }, 15 - "nvim-notify": { "branch": "master", "commit": "a22f5d7ac511c2df2fd3290a9f04c48d5a822e2e" }, 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": "19d6211c78169e78bab372b585b6fb17ad974e82" }, 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
··· 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
··· 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
··· 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
··· 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
··· 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
··· 40 40 ) 41 41 ' 42 42 ''' 43 - detect_folders = [".jj"] 43 + when = "jj root --ignore-working-copy" 44 44 symbol = "๐Ÿฆ " 45 45 style = "bold blue"
+1 -1
.gitconfig
··· 5 5 [pull] 6 6 rebase = true 7 7 [core] 8 - editor = emacs -nw 8 + editor = nvim 9 9 pager = delta 10 10 11 11 [interactive]
-1
.zshenv
··· 1 - . "$HOME/.cargo/env"
+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"