├── direnv ├── .envrc └── .config │ └── direnv │ └── direnvrc ├── fish ├── .hushlogin └── .config │ └── fish │ ├── functions │ ├── v.fish │ ├── set_abbr.fish │ ├── paste.fish │ ├── delta_side_by_side.fish │ ├── set_nextcloud.fish │ └── set_theme.fish │ ├── fish_plugins │ ├── config.fish │ └── conf.d │ └── set_abbr.fish ├── .gitignore ├── ignore ├── .stow-local-ignore ├── dual-key-remap │ └── config.txt ├── annepro2 │ └── AnnePro2CustomLayout.json └── iterm │ ├── iterm_tokyonight_night.itermcolors │ └── iterm_tokyonight_storm.itermcolors ├── asdf ├── .default-npm-packages ├── .default-golang-pkgs ├── .default-python-packages └── .default-cargo-crates ├── bootstrap ├── .stow-local-ignore ├── windows │ ├── speedUp.ps1 │ ├── Microsoft.PowerShell_profile.ps1 │ ├── bootstrap.ps1 │ └── excludeWSL.ps1 └── homebrew │ ├── Brewfile │ └── Brewfile-macos ├── bat └── .config │ └── bat │ └── config ├── gfold └── .config │ └── gfold │ └── gfold.json ├── nvim ├── .config │ ├── format-lint │ │ ├── .stylelintrc.json │ │ ├── .markdownlint.jsonc │ │ ├── .stylua.toml │ │ ├── .ruff.toml │ │ └── .cspell.json │ ├── nvim │ │ ├── after │ │ │ └── ftplugin │ │ │ │ ├── markdown.vim │ │ │ │ ├── sql.vim │ │ │ │ └── qf.vim │ │ ├── lua │ │ │ ├── plugins │ │ │ │ ├── config │ │ │ │ │ ├── marks.lua │ │ │ │ │ ├── nvim-navic.lua │ │ │ │ │ ├── nvim-pqf.lua │ │ │ │ │ ├── scope.lua │ │ │ │ │ ├── sort.lua │ │ │ │ │ ├── vim-flog.lua │ │ │ │ │ ├── vim-wordmotion.lua │ │ │ │ │ ├── guess-indent.lua │ │ │ │ │ ├── nvim-lastplace.lua │ │ │ │ │ ├── cmp-git.lua │ │ │ │ │ ├── conflict-marker.lua │ │ │ │ │ ├── rainbow-delimiters.lua │ │ │ │ │ ├── copilot-cmp.lua │ │ │ │ │ ├── leap-spooky.lua │ │ │ │ │ ├── close-buffers.lua │ │ │ │ │ ├── vim-mundo.lua │ │ │ │ │ ├── codeium.lua │ │ │ │ │ ├── todo-comments.lua │ │ │ │ │ ├── flit.lua │ │ │ │ │ ├── leap.lua │ │ │ │ │ ├── twilight.lua │ │ │ │ │ ├── eyeliner.lua │ │ │ │ │ ├── range-highlight.lua │ │ │ │ │ ├── splitjoin.lua │ │ │ │ │ ├── nvim-surround.lua │ │ │ │ │ ├── deferred-clipboard.lua │ │ │ │ │ ├── neogen.lua │ │ │ │ │ ├── gitlinker.lua │ │ │ │ │ ├── iswap.lua │ │ │ │ │ ├── nvim-ts-autotag.lua │ │ │ │ │ ├── zen-mode.lua │ │ │ │ │ ├── fidget.lua │ │ │ │ │ ├── hlargs.lua │ │ │ │ │ ├── trim.lua │ │ │ │ │ ├── playground.lua │ │ │ │ │ ├── vim-dadbod-ui.lua │ │ │ │ │ ├── nvim-trevJ.lua │ │ │ │ │ ├── nvim-treesitter-context.lua │ │ │ │ │ ├── tabout.lua │ │ │ │ │ ├── vim-mergetool.lua │ │ │ │ │ ├── vim-vsnip.lua │ │ │ │ │ ├── symbols-outline.lua │ │ │ │ │ ├── indent-blankline.lua │ │ │ │ │ ├── nvim-cheat.lua │ │ │ │ │ ├── nvim-treesitter-endwise.lua │ │ │ │ │ ├── dir-telescope.lua │ │ │ │ │ ├── vim-polyglot.lua │ │ │ │ │ ├── diffview.lua │ │ │ │ │ ├── nvim-treehopper.lua │ │ │ │ │ ├── git-conflict.lua │ │ │ │ │ ├── vimwiki.lua │ │ │ │ │ ├── bufjump.lua │ │ │ │ │ ├── nvim-yati.lua │ │ │ │ │ ├── indent-o-matic.lua │ │ │ │ │ ├── vim-fugitive.lua │ │ │ │ │ ├── nvim-test.lua │ │ │ │ │ ├── refactoring.lua │ │ │ │ │ ├── nvim-ts-context-commentstring.lua │ │ │ │ │ ├── vim-matchup.lua │ │ │ │ │ ├── nvim-colorizer.lua │ │ │ │ │ ├── dial.lua │ │ │ │ │ ├── color-picker.lua │ │ │ │ │ ├── nvim-autopairs.lua │ │ │ │ │ ├── todotxt.lua │ │ │ │ │ ├── stickybuf.lua │ │ │ │ │ ├── any-jump.lua │ │ │ │ │ ├── nvim-regexplainer.lua │ │ │ │ │ ├── nvim-scrollbar.lua │ │ │ │ │ ├── github-notifications.lua │ │ │ │ │ ├── vim-illuminate.lua │ │ │ │ │ ├── dirbuf.lua │ │ │ │ │ ├── vim-unimpaired.lua │ │ │ │ │ ├── vim-abolish.lua │ │ │ │ │ ├── nvim-treesitter-textsubjects.lua │ │ │ │ │ ├── lspactions.lua │ │ │ │ │ ├── vim-caser.lua │ │ │ │ │ ├── barbecue.lua │ │ │ │ │ ├── qf_helper.lua │ │ │ │ │ ├── rainbow.lua │ │ │ │ │ ├── neogit.lua │ │ │ │ │ ├── copilot.lua │ │ │ │ │ ├── nvim-neotest.lua │ │ │ │ │ ├── nvim-hlslens.lua │ │ │ │ │ ├── readline.lua │ │ │ │ │ ├── oil.lua │ │ │ │ │ ├── venn.lua │ │ │ │ │ ├── winshift.lua │ │ │ │ │ ├── Comment.lua │ │ │ │ │ ├── glance.lua │ │ │ │ │ ├── yanky.lua │ │ │ │ │ ├── substitute.lua │ │ │ │ │ ├── vim-visual-multi.lua │ │ │ │ │ ├── nvim-treesitter-textobjects.lua │ │ │ │ │ ├── nvim-tree.lua │ │ │ │ │ ├── nvim-treesitter.lua │ │ │ │ │ ├── tokyonight.lua │ │ │ │ │ ├── gitsigns.lua │ │ │ │ │ ├── bufferline.lua │ │ │ │ │ └── telescope.lua │ │ │ │ └── nvim-tree-utils.lua │ │ │ ├── colors.lua │ │ │ ├── keymaps.lua │ │ │ ├── filetypes.lua │ │ │ ├── lsp │ │ │ │ ├── format.lua │ │ │ │ ├── config.lua │ │ │ │ └── init.lua │ │ │ └── options.lua │ │ └── init.lua │ └── vale │ │ └── .vale.ini └── .vsnip │ ├── javascript.json │ └── global.json ├── scripts ├── .config │ └── fish │ │ └── completions │ │ └── update.fish └── .local │ └── bin │ ├── aasdf │ ├── abrew │ ├── xasdf │ ├── xbrew │ ├── argbash │ ├── argbash-init │ ├── git_branch_set_upstream │ ├── set_conservation_mode │ ├── openapi-generator-cli │ ├── git_repo_name │ ├── afish │ ├── xfish │ ├── git_default_branch_rename │ ├── git_clone_bare │ ├── install_win32yank │ ├── install_vale_style_microsoft │ ├── search │ ├── install_marksman_language_server │ ├── install_ltex_language_server │ ├── install_lua_language_server │ ├── tj │ ├── install_language_servers │ ├── install_formatters_linters │ └── update ├── gh └── .config │ ├── gh │ └── config.yml │ └── gh-dash │ └── config.yml ├── glow └── .config │ └── glow │ └── glow.yml ├── starship └── .config │ └── starship.toml ├── wezterm └── .config │ └── wezterm │ ├── colors │ └── tokyonight.toml │ └── wezterm.lua ├── vim └── .vimrc ├── kitty └── .config │ └── kitty │ ├── kitty.conf │ └── theme.conf ├── LICENSE ├── README.md ├── git ├── .gitconfig └── .gittemplates │ └── commit ├── tmux ├── .tmux │ └── tokyonight.tmux ├── .tmux.conf └── .gitmux.conf ├── vivid └── .config │ └── vivid │ └── themes │ ├── one-dark.yml │ └── tokyonight.yml ├── jetbrains └── .ideavimrc ├── todo └── .todo │ └── config └── bootstrap.sh /direnv/.envrc: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /fish/.hushlogin: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | -------------------------------------------------------------------------------- /ignore/.stow-local-ignore: -------------------------------------------------------------------------------- 1 | .* 2 | -------------------------------------------------------------------------------- /asdf/.default-npm-packages: -------------------------------------------------------------------------------- 1 | yarn 2 | -------------------------------------------------------------------------------- /bootstrap/.stow-local-ignore: -------------------------------------------------------------------------------- 1 | .* 2 | -------------------------------------------------------------------------------- /bat/.config/bat/config: -------------------------------------------------------------------------------- 1 | --theme="base16" 2 | -------------------------------------------------------------------------------- /direnv/.config/direnv/direnvrc: -------------------------------------------------------------------------------- 1 | use asdf 2 | -------------------------------------------------------------------------------- /asdf/.default-golang-pkgs: -------------------------------------------------------------------------------- 1 | github.com/arl/gitmux 2 | -------------------------------------------------------------------------------- /asdf/.default-python-packages: -------------------------------------------------------------------------------- 1 | setuptools 2 | libtmux 3 | pipx 4 | pynvim 5 | -------------------------------------------------------------------------------- /gfold/.config/gfold/gfold.json: -------------------------------------------------------------------------------- 1 | { 2 | "display_mode": "Classic" 3 | } 4 | -------------------------------------------------------------------------------- /nvim/.config/format-lint/.stylelintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": {} 3 | } 4 | -------------------------------------------------------------------------------- /ignore/dual-key-remap/config.txt: -------------------------------------------------------------------------------- 1 | remap_key=CAPSLOCK 2 | when_alone=ESCAPE 3 | with_other=CTRL 4 | -------------------------------------------------------------------------------- /nvim/.config/nvim/after/ftplugin/markdown.vim: -------------------------------------------------------------------------------- 1 | set shiftwidth=2 2 | set softtabstop=2 3 | set tabstop=2 4 | -------------------------------------------------------------------------------- /asdf/.default-cargo-crates: -------------------------------------------------------------------------------- 1 | cargo-update --features vendored-openssl --features vendored-libgit2 2 | gfold 3 | -------------------------------------------------------------------------------- /scripts/.config/fish/completions/update.fish: -------------------------------------------------------------------------------- 1 | complete --command update --no-files --arguments '(update list)' 2 | -------------------------------------------------------------------------------- /gh/.config/gh/config.yml: -------------------------------------------------------------------------------- 1 | git_protocol: ssh 2 | editor: nvim 3 | prompt: enabled 4 | pager: bat 5 | version: "1" 6 | -------------------------------------------------------------------------------- /scripts/.local/bin/aasdf: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | 5 | afish "--command \"asdf $*\"" 6 | -------------------------------------------------------------------------------- /scripts/.local/bin/abrew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | 5 | afish "--command \"brew $*\"" 6 | -------------------------------------------------------------------------------- /scripts/.local/bin/xasdf: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | 5 | xfish "--command \"asdf $*\"" 6 | -------------------------------------------------------------------------------- /scripts/.local/bin/xbrew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | 5 | xfish "--command \"brew $*\"" 6 | -------------------------------------------------------------------------------- /nvim/.config/vale/.vale.ini: -------------------------------------------------------------------------------- 1 | StylesPath = styles 2 | MinAlertLevel = suggestion 3 | 4 | [*] 5 | BasedOnStyles = Microsoft 6 | -------------------------------------------------------------------------------- /scripts/.local/bin/argbash: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | docker run --rm -v "$(pwd):/work" -u "$(id -u):$(id -g)" matejak/argbash "$@" 3 | -------------------------------------------------------------------------------- /fish/.config/fish/functions/v.fish: -------------------------------------------------------------------------------- 1 | # Defined in - @ line 1 2 | function v --wraps=nvim --description 'alias v nvim' 3 | nvim $argv 4 | end 5 | -------------------------------------------------------------------------------- /nvim/.config/format-lint/.markdownlint.jsonc: -------------------------------------------------------------------------------- 1 | { 2 | "default": true, 3 | "MD024": false, 4 | "MD030": false, 5 | "MD034": false 6 | } 7 | -------------------------------------------------------------------------------- /nvim/.config/nvim/after/ftplugin/sql.vim: -------------------------------------------------------------------------------- 1 | autocmd FileType sql,mysql,plsql lua require('cmp').setup.buffer({ sources = {{ name = 'vim-dadbod-completion' }} }) 2 | -------------------------------------------------------------------------------- /scripts/.local/bin/argbash-init: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | docker run --rm -e PROGRAM=argbash-init -v "$(pwd):/work" -u "$(id -u):$(id -g)" matejak/argbash "$@" 3 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/marks.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "chentoast/marks.nvim", 3 | config = function() 4 | require("marks").setup({}) 5 | end, 6 | } 7 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/nvim-navic.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "SmiteshP/nvim-navic", 3 | module = "nvim-navic", 4 | requires = "neovim/nvim-lspconfig", 5 | } 6 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/nvim-pqf.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "yorickpeterse/nvim-pqf", 3 | config = function() 4 | require("pqf").setup() 5 | end, 6 | } 7 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/scope.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "tiagovla/scope.nvim", 3 | config = function() 4 | require("scope").setup() 5 | end, 6 | } 7 | -------------------------------------------------------------------------------- /scripts/.local/bin/git_branch_set_upstream: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | branch=$(git branch --show-current) 4 | 5 | git branch --set-upstream-to="origin/${branch}" "$branch" 6 | -------------------------------------------------------------------------------- /fish/.config/fish/functions/set_abbr.fish: -------------------------------------------------------------------------------- 1 | function set_abbr --description "Set abbr(eviations)" 2 | # Erases old universal variables 3 | abbr --erase (abbr --list) 4 | end 5 | -------------------------------------------------------------------------------- /nvim/.vsnip/javascript.json: -------------------------------------------------------------------------------- 1 | { 2 | "log": { 3 | "prefix": [ 4 | "log" 5 | ], 6 | "body": "console.log(${1:$TM_SELECTED_TEXT});" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/sort.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "sQVe/sort.nvim", 3 | cmd = "Sort", 4 | config = function() 5 | require("sort").setup({}) 6 | end, 7 | } 8 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/vim-flog.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "rbong/vim-flog", 3 | cmd = { 4 | "Flog", 5 | "Flogsplit", 6 | "Floggit", 7 | }, 8 | } 9 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/vim-wordmotion.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "chaoren/vim-wordmotion", 3 | setup = function() 4 | vim.g.wordmotion_prefix = "\\" 5 | end, 6 | } 7 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/guess-indent.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "nmac427/guess-indent.nvim", 3 | config = function() 4 | require("guess-indent").setup({}) 5 | end, 6 | } 7 | -------------------------------------------------------------------------------- /nvim/.config/format-lint/.stylua.toml: -------------------------------------------------------------------------------- 1 | column_width = 120 2 | line_endings = "Unix" 3 | indent_type = "Spaces" 4 | indent_width = 4 5 | quote_style = "AutoPreferDouble" 6 | no_call_parentheses = false 7 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/nvim-lastplace.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "ethanholz/nvim-lastplace", 3 | config = function() 4 | require("nvim-lastplace").setup({}) 5 | end, 6 | } 7 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/cmp-git.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "petertriho/cmp-git", 3 | after = "nvim-cmp", 4 | config = function() 5 | require("cmp_git").setup() 6 | end, 7 | } 8 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/conflict-marker.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "rhysd/conflict-marker.vim", 3 | setup = function() 4 | vim.g.conflict_marker_enable_matchit = 0 5 | end, 6 | } 7 | -------------------------------------------------------------------------------- /fish/.config/fish/functions/paste.fish: -------------------------------------------------------------------------------- 1 | # Defined in - @ line 1 2 | function paste --wraps='win32yank.exe -o --lf' --description 'alias paste win32yank.exe -o --lf' 3 | win32yank.exe -o --lf $argv 4 | end 5 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/rainbow-delimiters.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "HiPhish/rainbow-delimiters.nvim", 3 | requires = "nvim-treesitter/nvim-treesitter", 4 | after = "nvim-treesitter", 5 | } 6 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/copilot-cmp.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "zbirenbaum/copilot-cmp", 3 | after = { "copilot.lua" }, 4 | config = function() 5 | require("copilot_cmp").setup() 6 | end, 7 | } 8 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/leap-spooky.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "ggandor/leap-spooky.nvim", 3 | requires = "ggandor/leap.nvim", 4 | config = function() 5 | require("leap-spooky").setup() 6 | end, 7 | } 8 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/close-buffers.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "kazhala/close-buffers.nvim", 3 | cmd = { "BDelete", "BWipeout" }, 4 | config = function() 5 | require("close_buffers").setup() 6 | end, 7 | } 8 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/vim-mundo.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "simnalamburt/vim-mundo", 3 | cmd = "MundoToggle", 4 | config = function() 5 | vim.api.nvim_exec_autocmds("User", { pattern = "PythonHostProg" }) 6 | end, 7 | } 8 | -------------------------------------------------------------------------------- /nvim/.config/nvim/init.lua: -------------------------------------------------------------------------------- 1 | vim.opt.shadafile = "NONE" 2 | if vim.fn.has("nvim-0.9") == 1 then 3 | vim.loader.enable() 4 | end 5 | require("options") 6 | require("plugins") 7 | require("lsp") 8 | require("keymaps") 9 | vim.opt.shadafile = "" 10 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/codeium.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "jcdickinson/codeium.nvim", 3 | after = "nvim-cmp", 4 | requires = "nvim-lua/plenary.nvim", 5 | config = function() 6 | require("codeium").setup({}) 7 | end, 8 | } 9 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/todo-comments.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "folke/todo-comments.nvim", 3 | requires = "nvim-lua/plenary.nvim", 4 | opt = true, 5 | config = function() 6 | require("todo-comments").setup() 7 | end, 8 | } 9 | -------------------------------------------------------------------------------- /scripts/.local/bin/set_conservation_mode: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo $1 | sudo tee /sys/bus/platform/drivers/ideapad_acpi/VPC2004:00/conservation_mode 4 | echo "Conservation Mode: " 5 | cat /sys/bus/platform/drivers/ideapad_acpi/VPC2004:00/conservation_mode 6 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/colors.lua: -------------------------------------------------------------------------------- 1 | local colors = require("tokyonight.colors").setup(require("tokyonight.config")) 2 | 3 | colors = vim.tbl_extend("force", colors, { 4 | fg = colors.fg_sidebar, 5 | bg = colors.bg_statusline, 6 | }) 7 | 8 | return colors 9 | -------------------------------------------------------------------------------- /scripts/.local/bin/openapi-generator-cli: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | docker run --rm \ 4 | --network="host" \ 5 | --user="$(id -u):$(id -g)" \ 6 | --volume="$(pwd):/workdir" \ 7 | --workdir="/workdir" \ 8 | openapitools/openapi-generator-cli "$@" 9 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/flit.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "ggandor/flit.nvim", 3 | requires = "ggandor/leap.nvim", 4 | config = function() 5 | require("flit").setup({ 6 | labeled_modes = "nvo", 7 | }) 8 | end, 9 | } 10 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/leap.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "ggandor/leap.nvim", 3 | config = function() 4 | require("leap").add_default_mappings() 5 | vim.keymap.del({ "x", "o" }, "x") 6 | vim.keymap.del({ "x", "o" }, "X") 7 | end, 8 | } 9 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/twilight.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "folke/twilight.nvim", 3 | cmd = { "Twilight", "TwilghtEnable", "TwilightDisable" }, 4 | module = "zen-mode", 5 | config = function() 6 | require("twilight").setup() 7 | end, 8 | } 9 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/eyeliner.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "jinh0/eyeliner.nvim", 3 | config = function() 4 | require("eyeliner").setup({ 5 | highlight_on_key = false, 6 | match = "[a-z]", 7 | }) 8 | end, 9 | } 10 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/range-highlight.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "winston0410/range-highlight.nvim", 3 | requires = "winston0410/cmd-parser.nvim", 4 | event = "CmdlineEnter", 5 | config = function() 6 | require("range-highlight").setup() 7 | end, 8 | } 9 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/splitjoin.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "AndrewRadev/splitjoin.vim", 3 | cmd = { "SplitjoinJoin", "SplitjoinSplit" }, 4 | setup = function() 5 | vim.g.splitjoin_split_mapping = "" 6 | vim.g.splitjoin_join_mapping = "" 7 | end, 8 | } 9 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/nvim-surround.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "kylechui/nvim-surround", 3 | config = function() 4 | require("nvim-surround").setup({ 5 | keymaps = { 6 | visual = "gs", 7 | }, 8 | }) 9 | end, 10 | } 11 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/deferred-clipboard.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "EtiamNullam/deferred-clipboard.nvim", 3 | config = function() 4 | require("deferred-clipboard").setup({ 5 | fallback = "unnamedplus", 6 | lazy = true, 7 | }) 8 | end, 9 | } 10 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/neogen.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "danymat/neogen", 3 | requires = "nvim-treesitter/nvim-treesitter", 4 | module = "neogen", 5 | config = function() 6 | require("neogen").setup({ 7 | enabled = true, 8 | }) 9 | end, 10 | } 11 | -------------------------------------------------------------------------------- /glow/.config/glow/glow.yml: -------------------------------------------------------------------------------- 1 | # style name or JSON path (default "auto") 2 | style: "auto" 3 | # show local files only; no network (TUI-mode only) 4 | local: false 5 | # mouse support (TUI-mode only) 6 | mouse: true 7 | # use pager to display markdown 8 | pager: true 9 | # word-wrap at width 10 | width: 80 11 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/gitlinker.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "ruifm/gitlinker.nvim", 3 | requires = "nvim-lua/plenary.nvim", 4 | module = "gitlinker", 5 | config = function() 6 | require("gitlinker").setup({ 7 | mappings = nil, 8 | }) 9 | end, 10 | } 11 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/iswap.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "mizlan/iswap.nvim", 3 | requires = "nvim-treesitter/nvim-treesitter", 4 | cmd = "ISwap", 5 | config = function() 6 | require("iswap").setup({ 7 | hl_snipe = "ErrorMsg", 8 | }) 9 | end, 10 | } 11 | -------------------------------------------------------------------------------- /starship/.config/starship.toml: -------------------------------------------------------------------------------- 1 | right_format = "${custom.arch}${time}" 2 | 3 | [custom.arch] 4 | command = "uname -m" 5 | when = "true" 6 | 7 | [battery] 8 | disabled = true 9 | 10 | [directory] 11 | truncate_to_repo = false 12 | fish_style_pwd_dir_length = 1 13 | 14 | [time] 15 | disabled = false 16 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/nvim-ts-autotag.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "windwp/nvim-ts-autotag", 3 | requires = "nvim-treesitter/nvim-treesitter", 4 | after = "nvim-treesitter", 5 | config = function() 6 | require("nvim-treesitter.configs").setup({ autotag = { enable = true } }) 7 | end, 8 | } 9 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/zen-mode.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "folke/zen-mode.nvim", 3 | cmd = "ZenMode", 4 | config = function() 5 | require("zen-mode").setup({ 6 | plugins = { 7 | twilight = { enabled = false }, 8 | }, 9 | }) 10 | end, 11 | } 12 | -------------------------------------------------------------------------------- /fish/.config/fish/fish_plugins: -------------------------------------------------------------------------------- 1 | acomagu/fish-async-prompt 2 | gazorby/fish-abbreviation-tips 3 | jorgebucaran/autopair.fish 4 | jorgebucaran/fisher 5 | jorgebucaran/replay.fish 6 | markcial/upto 7 | meaningful-ooo/sponge 8 | nickeb96/puffer-fish 9 | patrickf1/colored_man_pages.fish 10 | patrickf1/fzf.fish 11 | wfxr/forgit 12 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/fidget.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "j-hui/fidget.nvim", 3 | tag = "legacy", 4 | config = function() 5 | require("fidget").setup({ 6 | text = { 7 | spinner = "dots", 8 | done = "", 9 | }, 10 | }) 11 | end, 12 | } 13 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/hlargs.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "m-demare/hlargs.nvim", 3 | requires = "nvim-treesitter/nvim-treesitter", 4 | after = "nvim-treesitter", 5 | config = function() 6 | require("hlargs").setup({ 7 | color = require("colors").yellow, 8 | }) 9 | end, 10 | } 11 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/trim.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "cappyzawa/trim.nvim", 3 | config = function() 4 | require("trim").setup({ 5 | trim_trailing = true, 6 | trim_first_line = false, 7 | trim_last_line = true, 8 | }) 9 | end, 10 | event = "BufWritePre", 11 | } 12 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/playground.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "nvim-treesitter/playground", 3 | cmd = "TSPlaygroundToggle", 4 | config = function() 5 | require("nvim-treesitter.configs").setup({ 6 | playground = { 7 | enable = true, 8 | }, 9 | }) 10 | end, 11 | } 12 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/vim-dadbod-ui.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "kristijanhusak/vim-dadbod-ui", 3 | requires = "tpope/vim-dadbod", 4 | cmd = { "DBUI", "DBUIToggle", "DBUIAddConnection" }, 5 | setup = function() 6 | vim.g.db_ui_show_database_icon = 1 7 | vim.g.db_ui_use_nerd_fonts = 1 8 | end, 9 | } 10 | -------------------------------------------------------------------------------- /scripts/.local/bin/git_repo_name: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | 5 | if [[ $# -ge 1 ]] && [[ -n $1 ]]; then 6 | repository=$1 7 | else 8 | repository=$(git config --get remote.origin.url) 9 | fi 10 | 11 | repo_name=$(echo "$repository" | sed 's/\(\.git\)$//' | sed -r 's#^.*/([^/]+)$#\1#') 12 | 13 | echo "$repo_name" 14 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/nvim-trevJ.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "AckslD/nvim-trevJ.lua", 3 | module = "trevj", 4 | after = "nvim-treesitter", 5 | setup = function() 6 | vim.keymap.set("n", "J", function() 7 | require("trevj").format_at_cursor() 8 | end, { desc = "Split lines" }) 9 | end, 10 | } 11 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/nvim-treesitter-context.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "nvim-treesitter/nvim-treesitter-context", 3 | requires = "nvim-treesitter/nvim-treesitter", 4 | after = "nvim-treesitter", 5 | config = function() 6 | require("treesitter-context").setup({ 7 | enable = true, 8 | }) 9 | end, 10 | } 11 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/tabout.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "abecodes/tabout.nvim", 3 | requires = "nvim-treesitter", 4 | after = { "nvim-cmp", "nvim-treesitter" }, 5 | config = function() 6 | require("tabout").setup({ 7 | tabkey = "", 8 | backwards_tabkey = "", 9 | }) 10 | end, 11 | } 12 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/vim-mergetool.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "samoshkin/vim-mergetool", 3 | cmd = { 4 | "MergetoolPreferLocal", 5 | "MergetoolPreferRemote", 6 | "MergetoolSetLayout", 7 | "MergetoolStart", 8 | "MergetoolStop ", 9 | "MergetoolToggle", 10 | "MergetoolToggleLayout", 11 | }, 12 | } 13 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/vim-vsnip.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "hrsh7th/vim-vsnip", 3 | after = "nvim-cmp", 4 | setup = function() 5 | vim.g.vsnip_filetypes = { 6 | javascriptreact = { "javascript" }, 7 | typescript = { "javascript" }, 8 | typescriptreact = { "javascript" }, 9 | } 10 | end, 11 | } 12 | -------------------------------------------------------------------------------- /scripts/.local/bin/afish: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | 5 | cmd="arch -arm64 \\ 6 | -d ASDF_DATA_DIR \\ 7 | -d ASDF_DEFAULT_TOOL_VERSIONS_FILENAME \\ 8 | -d ASDF_NPM_DEFAULT_PACKAGES_FILE \\ 9 | -d ASDF_PYTHON_DEFAULT_PACKAGES_FILE \\ 10 | -d DOCKER_DEFAULT_PLATFORM \\ 11 | -d PATH \\ 12 | /opt/homebrew/bin/fish $* 13 | " 14 | 15 | eval "$cmd" 16 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/symbols-outline.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "simrat39/symbols-outline.nvim", 3 | cmd = { "SymbolsOutline", "SymbolsOutlineOpen", "SymbolsOutlineClose" }, 4 | config = function() 5 | require("symbols-outline").setup({ 6 | auto_preview = false, 7 | position = "right", 8 | }) 9 | end, 10 | } 11 | -------------------------------------------------------------------------------- /nvim/.config/format-lint/.ruff.toml: -------------------------------------------------------------------------------- 1 | select = [ 2 | "F", # pyflakes 3 | "E", # pycodestyle 4 | "W", # pycodestyle 5 | # "I", # isort 6 | "N", # pep8-naming 7 | "D", # pydocstyle 8 | "ASYNC", # flake8-async 9 | "B", # flake8-bugbear 10 | "PL", # pylint 11 | "TRY", # tryceratops 12 | "FLY", # flynt 13 | "RUF", # ruff 14 | ] 15 | -------------------------------------------------------------------------------- /nvim/.vsnip/global.json: -------------------------------------------------------------------------------- 1 | { 2 | "refs": { 3 | "prefix": "refs", 4 | "body": ["Refs: https://${VIM:\\$ATLASSIAN_COMPANY_NAME}.atlassian.net/browse/${VIM:\\$ATLASSIAN_PROJECT_KEY}-$0"] 5 | }, 6 | "uuid": { 7 | "prefix": "uuid", 8 | "body": [ 9 | "${VIM:system('python -c \"import uuid, sys;sys.stdout.write(str(uuid.uuid4()))\"')}" 10 | ] 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/indent-blankline.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "lukas-reineke/indent-blankline.nvim", 3 | opt = true, 4 | config = function() 5 | require("ibl").setup({ 6 | indent = { 7 | char = "│", 8 | }, 9 | scope = { 10 | show_start = false, 11 | }, 12 | }) 13 | end, 14 | } 15 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/nvim-cheat.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "RishabhRD/nvim-cheat.sh", 3 | requires = "RishabhRD/popfix", 4 | cmd = { 5 | "Cheat", 6 | "CheatWithoutComments", 7 | "CheatList", 8 | "CheatListWithoutComments", 9 | }, 10 | setup = function() 11 | vim.g.cheat_default_window_layout = "vertical_split" 12 | end, 13 | } 14 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/nvim-treesitter-endwise.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "RRethy/nvim-treesitter-endwise", 3 | requires = "nvim-treesitter/nvim-treesitter", 4 | after = "nvim-treesitter", 5 | config = function() 6 | require("nvim-treesitter.configs").setup({ 7 | endwise = { 8 | enable = true, 9 | }, 10 | }) 11 | end, 12 | } 13 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/dir-telescope.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "princejoogie/dir-telescope.nvim", 3 | after = { "telescope.nvim" }, 4 | config = function() 5 | require("dir-telescope").setup({ 6 | hidden = true, 7 | no_ignore = false, 8 | show_preview = true, 9 | }) 10 | 11 | require("telescope").load_extension("dir") 12 | end, 13 | } 14 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/vim-polyglot.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "sheerun/vim-polyglot", 3 | setup = function() 4 | local filetypes = require("filetypes") 5 | vim.g.polyglot_disabled = { 6 | "autoindent", 7 | "ftdetect", 8 | "sensible", 9 | unpack(filetypes.treesitter), 10 | unpack(filetypes.extras), 11 | } 12 | end, 13 | } 14 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/diffview.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "sindrets/diffview.nvim", 3 | cmd = { 4 | "DiffviewOpen", 5 | "DiffviewClose", 6 | "DiffviewToggleFiles", 7 | "DiffviewFocusFiles", 8 | "DiffviewRefresh", 9 | "DiffviewFileHistory", 10 | }, 11 | module = "diffview", 12 | config = function() 13 | require("diffview").setup() 14 | end, 15 | } 16 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/nvim-treehopper.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "mfussenegger/nvim-treehopper", 3 | setup = function() 4 | local set_keymap = vim.api.nvim_set_keymap 5 | local opts = { noremap = true, silent = true } 6 | 7 | set_keymap("o", "z", ":lua require('tsht').nodes()", { silent = true }) 8 | set_keymap("x", "z", ":lua require('tsht').nodes()", opts) 9 | end, 10 | } 11 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/git-conflict.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "akinsho/git-conflict.nvim", 3 | after = "tokyonight.nvim", 4 | tag = "v1.0.0", 5 | config = function() 6 | require("git-conflict").setup({ 7 | highlights = { 8 | ancestor = "DiffDelete", 9 | current = "DiffAdd", 10 | incoming = "DiffChange", 11 | }, 12 | }) 13 | end, 14 | } 15 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/vimwiki.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "vimwiki/vimwiki", 3 | keys = "w", 4 | setup = function() 5 | vim.g.vimwiki_list = { 6 | { path = os.getenv("VIMWIKI_PATH"), syntax = "markdown", ext = ".md" }, 7 | } 8 | vim.g.vimwiki_conceallevel = 0 9 | vim.g.vimwiki_global_ext = 0 10 | vim.g.vimwiki_key_mappings = { table_mappings = 0, mouse = 0 } 11 | end, 12 | } 13 | -------------------------------------------------------------------------------- /wezterm/.config/wezterm/colors/tokyonight.toml: -------------------------------------------------------------------------------- 1 | [colors] 2 | foreground = "#c0caf5" 3 | background = "#1a1b26" 4 | cursor_bg = "#c0caf5" 5 | cursor_border = "#c0caf5" 6 | cursor_fg = "#1a1b26" 7 | selection_bg = "#33467C" 8 | selection_fg = "#c0caf5" 9 | 10 | ansi = ["#15161E", "#f7768e", "#9ece6a", "#e0af68", "#7aa2f7", "#bb9af7", "#7dcfff", "#a9b1d6"] 11 | brights = ["#414868", "#f7768e", "#9ece6a", "#e0af68", "#7aa2f7", "#bb9af7", "#7dcfff", "#c0caf5"] 12 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/bufjump.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "kwkarlwang/bufjump.nvim", 3 | keys = { 4 | "", 5 | "", 6 | }, 7 | config = function() 8 | require("bufjump").setup({ 9 | forward = "", 10 | backward = "", 11 | on_success = function() 12 | vim.cmd([[execute "normal! g`\"zz"]]) 13 | end, 14 | }) 15 | end, 16 | } 17 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/nvim-yati.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "yioneko/nvim-yati", 3 | requires = "nvim-treesitter/nvim-treesitter", 4 | after = "nvim-treesitter", 5 | config = function() 6 | require("nvim-treesitter.configs").setup({ 7 | yati = { 8 | enable = true, 9 | default_lazy = true, 10 | default_fallback = "auto", 11 | }, 12 | }) 13 | end, 14 | } 15 | -------------------------------------------------------------------------------- /vim/.vimrc: -------------------------------------------------------------------------------- 1 | unlet! skip_defaults_vim 2 | source $VIMRUNTIME/defaults.vim 3 | 4 | " set hls ic is nu noswf 5 | set hlsearch 6 | set ignorecase 7 | set incsearch 8 | set number 9 | set noswapfile 10 | 11 | set autoread 12 | set backspace=indent,eol,start 13 | set laststatus=2 14 | set lazyredraw 15 | set relativenumber 16 | set ruler 17 | set wildmenu 18 | 19 | filetype plugin indent on 20 | syntax on 21 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/indent-o-matic.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "Darazaki/indent-o-matic", 3 | config = function() 4 | require("indent-o-matic").setup({ 5 | max_lines = 128, 6 | standard_widths = { 2, 4 }, 7 | filetype_markdown = { 8 | max_lines = 0, 9 | }, 10 | filetype_vimwiki = { 11 | max_lines = 0, 12 | }, 13 | }) 14 | end, 15 | } 16 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/vim-fugitive.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "tpope/vim-fugitive", 3 | cmd = { 4 | "G", 5 | "Gdiffsplit", 6 | "Git", 7 | "Gvdiffsplit", 8 | }, 9 | setup = function() 10 | vim.api.nvim_set_keymap("n", "g[", "diffget //2", { silent = true, noremap = true }) 11 | vim.api.nvim_set_keymap("n", "g]", "diffget //3", { silent = true, noremap = true }) 12 | end, 13 | } 14 | -------------------------------------------------------------------------------- /scripts/.local/bin/xfish: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | 5 | cmd="arch -x86_64 \\ 6 | -e ASDF_DATA_DIR=\"$HOME/.asdf_x86\" \\ 7 | -e ASDF_DEFAULT_TOOL_VERSIONS_FILENAME=\".tool-versions-x86\" \\ 8 | -e ASDF_NPM_DEFAULT_PACKAGES_FILE=\"$HOME/.default-npm-packages-x86\" \\ 9 | -e ASDF_PYTHON_DEFAULT_PACKAGES_FILE=\"$HOME/.default-python-packages-x86\" \\ 10 | -e DOCKER_DEFAULT_PLATFORM=linux/amd64 \\ 11 | " 12 | 13 | eval "$cmd /usr/local/bin/fish $*" 14 | -------------------------------------------------------------------------------- /fish/.config/fish/functions/delta_side_by_side.fish: -------------------------------------------------------------------------------- 1 | function delta_side_by_side --on-signal WINCH 2 | set -x COLUMNS $COLUMNS 3 | 4 | if test "$COLUMNS" -ge 180; and ! contains side-by-side "$DELTA_FEATURES" 5 | set --global --export --append DELTA_FEATURES side-by-side 6 | else if test "$COLUMNS" -lt 180; and contains side-by-side "$DELTA_FEATURES" 7 | set --erase DELTA_FEATURES[(contains --index side-by-side "$DELTA_FEATURES")] 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/nvim-test.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "klen/nvim-test", 3 | cmd = { 4 | "TestSuite", 5 | "TestFile", 6 | "TestEdit", 7 | "TestNearest", 8 | "TestLast", 9 | "TestVisit", 10 | "TestInfo", 11 | }, 12 | config = function() 13 | require("nvim-test").setup({}) 14 | require("nvim-test.runners.pytest"):setup({ 15 | args = { "-sv" }, 16 | }) 17 | end, 18 | } 19 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/refactoring.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "ThePrimeagen/refactoring.nvim", 3 | requires = { 4 | "nvim-lua/plenary.nvim", 5 | "nvim-treesitter/nvim-treesitter", 6 | "nvim-telescope/telescope.nvim", 7 | }, 8 | after = "telescope.nvim", 9 | module = "refactoring", 10 | config = function() 11 | require("refactoring").setup({}) 12 | require("telescope").load_extension("refactoring") 13 | end, 14 | } 15 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/nvim-ts-context-commentstring.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "JoosepAlviste/nvim-ts-context-commentstring", 3 | config = function() 4 | vim.g.skip_ts_context_commentstring_module = true 5 | 6 | require("ts_context_commentstring").setup({ 7 | enable_autocmd = false, 8 | languages = { 9 | json = { __default = "// %s", __multiline = "/* %s */" }, 10 | }, 11 | }) 12 | end, 13 | } 14 | -------------------------------------------------------------------------------- /bootstrap/windows/speedUp.ps1: -------------------------------------------------------------------------------- 1 | # https://stackoverflow.com/questions/59341482/powershell-steps-to-fix-slow-startup 2 | $env:PATH = [Runtime.InteropServices.RuntimeEnvironment]::GetRuntimeDirectory() 3 | [AppDomain]::CurrentDomain.GetAssemblies() | ForEach-Object { 4 | $path = $_.Location 5 | if ($path) { 6 | $name = Split-Path $path -Leaf 7 | Write-Host -ForegroundColor Yellow "`r`nRunning ngen.exe on '$name'" 8 | ngen.exe install $path /nologo 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/vim-matchup.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "andymass/vim-matchup", 3 | require = "nvim-treesitter/nvim-treesitter", 4 | after = "nvim-treesitter", 5 | config = function() 6 | require("nvim-treesitter.configs").setup({ 7 | matchup = { enable = true }, 8 | }) 9 | vim.g.matchup_matchparen_offscreen = {} 10 | vim.g.matchup_matchparen_deferred = 1 11 | vim.api.nvim_del_keymap("", "z%") 12 | end, 13 | } 14 | -------------------------------------------------------------------------------- /bootstrap/windows/Microsoft.PowerShell_profile.ps1: -------------------------------------------------------------------------------- 1 | Invoke-Expression (&starship init powershell) 2 | $env:COMPOSE_DOCKER_CLI_BUILD = 1 3 | 4 | # Shows navigable menu of all options when hitting Tab 5 | Set-PSReadlineKeyHandler -Key Tab -Function MenuComplete 6 | 7 | # Autocompletion for arrow keys 8 | Set-PSReadlineKeyHandler -Key UpArrow -Function HistorySearchBackward 9 | Set-PSReadlineKeyHandler -Key DownArrow -Function HistorySearchForward 10 | 11 | New-Alias open ii 12 | New-Alias v nvim.exe 13 | -------------------------------------------------------------------------------- /scripts/.local/bin/git_default_branch_rename: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | 5 | old_branch=${1:-master} 6 | new_branch=${2:-main} 7 | 8 | git branch -m "$old_branch" "$new_branch" 9 | git fetch origin 10 | git branch -u "origin/${new_branch}" "$new_branch" 11 | git remote set-head origin -a 12 | git symbolic-ref HEAD "refs/heads/${new_branch}" 13 | 14 | if [[ $(git rev-parse --is-bare-repository 2> /dev/null) == true ]]; then 15 | git worktree move "$old_branch" "$new_branch" 16 | fi 17 | -------------------------------------------------------------------------------- /nvim/.config/format-lint/.cspell.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2", 3 | "language": "en", 4 | "allowCompoundWords": true, 5 | "dictionaries": [ 6 | "en_US", 7 | "en-gb", 8 | "companies", 9 | "softwareTerms", 10 | "misc", 11 | "typescript", 12 | "node", 13 | "go", 14 | "python", 15 | "html", 16 | "css", 17 | "cpp", 18 | "csharp", 19 | "bash", 20 | "fonts", 21 | "filetypes", 22 | "npm" 23 | ] 24 | } 25 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/nvim-colorizer.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "NvChad/nvim-colorizer.lua", 3 | opt = true, 4 | config = function() 5 | require("colorizer").setup({ 6 | filetypes = { 7 | "*", 8 | css = { css = true, css_fn = true }, 9 | html = { names = false }, 10 | }, 11 | user_default_options = { 12 | mode = "virtualtext", 13 | tailwind = "both", 14 | }, 15 | }) 16 | end, 17 | } 18 | -------------------------------------------------------------------------------- /gh/.config/gh-dash/config.yml: -------------------------------------------------------------------------------- 1 | prSections: 2 | - title: Created 3 | filters: is:open author:@me 4 | - title: Review requests 5 | filters: is:open review-requested:@me 6 | - title: Commented 7 | filters: is:open archived:false commenter:@me 8 | issuesSections: 9 | - title: Created 10 | filters: is:open author:@me 11 | - title: Assigned 12 | filters: is:open assignee:@me 13 | defaults: 14 | preview: 15 | open: true 16 | width: 50 17 | prsLimit: 100 18 | issuesLimit: 100 19 | view: prs 20 | keybindings: 21 | prs: [] 22 | repoPaths: {} 23 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/dial.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "monaqa/dial.nvim", 3 | keys = { 4 | "(dial-increment)", 5 | "(dial-decrement)", 6 | }, 7 | setup = function() 8 | local set_keymap = vim.api.nvim_set_keymap 9 | 10 | set_keymap("", "", "(dial-increment)", {}) 11 | set_keymap("", "", "(dial-decrement)", {}) 12 | set_keymap("v", "g", "g(dial-increment)", {}) 13 | set_keymap("v", "g", "g(dial-decrement)", {}) 14 | end, 15 | } 16 | -------------------------------------------------------------------------------- /bootstrap/homebrew/Brewfile: -------------------------------------------------------------------------------- 1 | tap "homebrew/bundle" 2 | tap "homebrew/core" 3 | brew "asdf" 4 | brew "bash" 5 | brew "bat" 6 | brew "broot" 7 | brew "coreutils" 8 | brew "difftastic" 9 | brew "exa" 10 | brew "fd" 11 | brew "fish" 12 | brew "fzf" 13 | brew "gcc" 14 | brew "gh" 15 | brew "git" 16 | brew "git-delta" 17 | brew "glow" 18 | brew "howdoi" 19 | brew "libffi" 20 | brew "neovim", args: ["HEAD"] 21 | brew "ripgrep" 22 | brew "starship" 23 | brew "stow" 24 | brew "tldr" 25 | brew "tmux" 26 | brew "todo-txt" 27 | brew "vivid" 28 | brew "watchexec" 29 | brew "zoxide" 30 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/color-picker.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "ziontee113/color-picker.nvim", 3 | cmd = { 4 | "PickColor", 5 | "PickColorInsert", 6 | }, 7 | setup = function() 8 | local set_keymap = vim.keymap.set 9 | local opts = { noremap = true, silent = true } 10 | 11 | set_keymap("n", "", "PickColor", opts) 12 | set_keymap("i", "", "PickColorInsert", opts) 13 | end, 14 | config = function() 15 | require("color-picker").setup() 16 | end, 17 | } 18 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/nvim-autopairs.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "windwp/nvim-autopairs", 3 | after = "nvim-cmp", 4 | config = function() 5 | local autopairs = require("nvim-autopairs") 6 | autopairs.setup({}) 7 | 8 | local Rule = require("nvim-autopairs.rule") 9 | autopairs.add_rules({ 10 | Rule("%(.*%)%s*%=$", "> {}", { "typescript", "typescriptreact", "javascript", "javascriptreact" }) 11 | :use_regex(true) 12 | :set_end_pair_length(1), 13 | }) 14 | end, 15 | } 16 | -------------------------------------------------------------------------------- /fish/.config/fish/functions/set_nextcloud.fish: -------------------------------------------------------------------------------- 1 | function set_nextcloud --description "Set nextcloud related variables" 2 | if test -z "$NEXTCLOUD_PATH" 3 | read -p "echo 'NEXTCLOUD_PATH > '" nextcloud_path 4 | set -Ux NEXTCLOUD_PATH "$HOME/$nextcloud_path" 5 | end 6 | 7 | set -Ux VIMWIKI_PATH "$NEXTCLOUD_PATH/Documents/Notes" 8 | 9 | set -Ux TODO_DIR "$NEXTCLOUD_PATH/Documents/Todo" 10 | set -Ux TODO_FILE "$TODO_DIR/todo.txt" 11 | set -Ux DONE_FILE "$TODO_DIR/done.txt" 12 | set -Ux REPORT_FILE "$TODO_DIR/report.txt" 13 | end 14 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/todotxt.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "arnarg/todotxt.nvim", 3 | requires = { "MunifTanjim/nui.nvim" }, 4 | cmd = { 5 | "ToDoTxtCapture", 6 | "ToDoTxtTasksToggle", 7 | "ToDoTxtTasksOpen", 8 | "ToDoTxtTasksClose", 9 | }, 10 | config = function() 11 | require("todotxt-nvim").setup({ 12 | todo_file = os.getenv("TODO_FILE"), 13 | keymap = { 14 | delete_task = "d", 15 | complete_task = "", 16 | edit_task = "e", 17 | }, 18 | }) 19 | end, 20 | } 21 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/stickybuf.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "stevearc/stickybuf.nvim", 3 | config = function() 4 | require("stickybuf").setup({ 5 | get_auto_pin = function(bufnr) 6 | local filetype = vim.bo[bufnr].filetype 7 | 8 | for _, v in ipairs(require("filetypes").sidebars) do 9 | if v ~= "NvimTree" and v == filetype then 10 | return "filetype" 11 | end 12 | end 13 | 14 | return require("stickybuf").should_auto_pin(bufnr) 15 | end, 16 | }) 17 | end, 18 | } 19 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/any-jump.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "pechorin/any-jump.vim", 3 | cmd = { 4 | "AnyJump", 5 | "AnyJumpVisual", 6 | "AnyJumpBack", 7 | "AnyJumpLastResults", 8 | }, 9 | setup = function() 10 | vim.g.any_jump_disable_default_keybindings = 1 11 | 12 | local set_keymap = vim.keymap.set 13 | 14 | set_keymap("n", "gj", "AnyJump", {}) 15 | set_keymap("n", "gJ", "AnyJumpBack", {}) 16 | set_keymap("n", "gk", "AnyJumpLastResults", {}) 17 | set_keymap("x", "gj", "AnyJumpVisual", {}) 18 | end, 19 | } 20 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/nvim-regexplainer.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "bennypowers/nvim-regexplainer", 3 | requires = { 4 | "nvim-lua/plenary.nvim", 5 | "MunifTanjim/nui.nvim", 6 | }, 7 | after = "nvim-treesitter", 8 | config = function() 9 | require("regexplainer").setup({ 10 | display = "popup", 11 | popup = { 12 | border = { 13 | padding = { 0, 0 }, 14 | style = "rounded", 15 | }, 16 | }, 17 | mappings = { 18 | toggle = "gx", 19 | }, 20 | }) 21 | end, 22 | } 23 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/nvim-scrollbar.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "petertriho/nvim-scrollbar", 3 | config = function() 4 | local colors = require("colors") 5 | 6 | require("scrollbar").setup({ 7 | folds = false, 8 | handle = { 9 | blend = 10, 10 | }, 11 | marks = { 12 | Search = { color = colors.orange }, 13 | GitAdd = { text = "│" }, 14 | GitChange = { text = "│" }, 15 | GitDelete = { text = "│" }, 16 | }, 17 | excluded_filetypes = require("filetypes").excludes, 18 | }) 19 | end, 20 | } 21 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/github-notifications.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "rlch/github-notifications.nvim", 3 | requires = { 4 | "nvim-lua/plenary.nvim", 5 | }, 6 | config = function() 7 | require("github-notifications").setup({ 8 | mappings = { 9 | hide = "h", 10 | mark_all_read = "a", 11 | mark_read = "r", 12 | open_in_browser = "o", 13 | }, 14 | prompt_mappings = { 15 | hide = "", 16 | mark_all_read = "", 17 | mark_read = "", 18 | open_in_browser = "", 19 | }, 20 | }) 21 | end, 22 | } 23 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/vim-illuminate.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "RRethy/vim-illuminate", 3 | opt = true, 4 | config = function() 5 | require("illuminate").configure({ 6 | providers = { 7 | "lsp", 8 | "treesitter", 9 | "regex", 10 | }, 11 | delay = 100, 12 | filetypes_denylist = require("filetypes").excludes, 13 | filetypes_allowlist = {}, 14 | modes_denylist = {}, 15 | modes_allowlist = {}, 16 | providers_regex_syntax_denylist = {}, 17 | providers_regex_syntax_allowlist = {}, 18 | under_cursor = true, 19 | }) 20 | end, 21 | } 22 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/dirbuf.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "elihunter173/dirbuf.nvim", 3 | keys = { { "n", "-" } }, 4 | cmd = { 5 | "Dirbuf", 6 | "DirbufSync", 7 | }, 8 | setup = function() 9 | vim.api.nvim_create_augroup("dirbuf", {}) 10 | vim.api.nvim_create_autocmd("BufEnter", { 11 | group = "dirbuf", 12 | pattern = "*", 13 | callback = function() 14 | if vim.fn.isdirectory(vim.fn.expand("%")) == 1 and not vim.opt_local.modified:get() then 15 | vim.cmd("Dirbuf") 16 | end 17 | end, 18 | }) 19 | end, 20 | config = function() 21 | require("dirbuf").setup({}) 22 | end, 23 | } 24 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/vim-unimpaired.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "tpope/vim-unimpaired", 3 | setup = function() 4 | vim.g.nremap = { 5 | ["[p"] = "", 6 | ["]p"] = "", 7 | ["[P"] = "", 8 | ["]P"] = "", 9 | ["[x"] = "", 10 | ["]x"] = "", 11 | ["[y"] = "", 12 | ["]y"] = "", 13 | } 14 | end, 15 | config = function() 16 | vim.cmd([[ 17 | exe UnimpairedMapTransform('xml_encode','[X') 18 | exe UnimpairedMapTransform('xml_decode',']X') 19 | exe UnimpairedMapTransform('string_encode','[Y') 20 | exe UnimpairedMapTransform('string_decode',']Y') 21 | ]]) 22 | end, 23 | } 24 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/vim-abolish.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "petertriho/vim-abolish", 3 | cmd = { "Subvert", "S" }, 4 | keys = { { "n", "cr" } }, 5 | setup = function() 6 | require("which-key").register({ 7 | name = "coerce", 8 | [" "] = "space case", 9 | ["-"] = "dash-case", 10 | ["."] = "dot.case", 11 | ["_"] = "snake_case", 12 | c = "camelCase", 13 | k = "kebab-case", 14 | m = "MixedCase", 15 | s = "snake_case", 16 | t = "Title Case", 17 | u = "SNAKE_UPPERCASE", 18 | U = "SNAKE_UPPERCASE", 19 | }, { 20 | prefix = "cr", 21 | mode = "n", 22 | }) 23 | end, 24 | } 25 | -------------------------------------------------------------------------------- /scripts/.local/bin/git_clone_bare: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | 5 | repository=$1 6 | 7 | if [[ $# -ge 2 ]] && [[ -n $2 ]]; then 8 | directory=$2 9 | else 10 | directory=$(git_repo_name "$repository") 11 | fi 12 | 13 | mkdir -p "${directory}/.git" 14 | 15 | git clone --bare "$repository" "${directory}/.git" 16 | 17 | ( 18 | cd "$directory" \ 19 | && git config remote.origin.url "$repository" \ 20 | && git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" \ 21 | && git fetch 22 | ) 23 | 24 | branch=$(cd "$directory" && git branch --show-current) 25 | 26 | ( 27 | cd "$directory" \ 28 | && git branch --set-upstream-to="origin/${branch}" "$branch" \ 29 | && git worktree add "$branch" 30 | ) 31 | -------------------------------------------------------------------------------- /kitty/.config/kitty/kitty.conf: -------------------------------------------------------------------------------- 1 | include ./theme.conf 2 | 3 | font_family JetBrainsMono Nerd Font Mono 4 | italic_font JetBrainsMono Nerd Font Mono 5 | bold_italic_font JetBrainsMono Nerd Font Mono Bold 6 | # disable_ligatures always 7 | font_size 14.0 8 | 9 | tab_bar_style powerline 10 | active_tab_font_style bold 11 | 12 | confirm_os_window_close 0 13 | 14 | map kitty_mod+enter new_window_with_cwd 15 | map kitty_mod+t new_tab_with_cwd 16 | 17 | macos_titlebar_color background 18 | macos_option_as_alt yes 19 | macos_quit_when_last_window_closed yes 20 | -------------------------------------------------------------------------------- /ignore/annepro2/AnnePro2CustomLayout.json: -------------------------------------------------------------------------------- 1 | {"name":"Custom","device":1,"model":5,"type":"layout","data":{"layer1":[53,30,31,32,33,34,35,36,37,38,39,45,46,42,43,20,26,8,21,23,28,24,12,18,19,47,48,49,224,4,22,7,9,10,11,13,14,15,51,52,193,225,29,27,6,25,5,17,16,54,55,56,82,192,227,226,44,230,80,81,79],"layer2":[0,58,59,60,61,62,63,64,65,66,67,68,69,76,0,70,57,0,0,0,0,95,96,97,86,0,0,0,0,73,74,75,0,0,0,92,93,94,87,0,193,0,76,77,78,0,0,83,89,90,91,88,0,192,170,169,98,168,173,171,172],"layer3":[0,200,201,202,203,0,0,0,246,241,240,244,243,76,0,70,57,0,0,0,0,95,96,97,86,0,0,0,0,73,74,75,0,0,0,92,93,94,87,0,193,0,76,77,78,0,0,83,89,90,91,88,0,192,170,169,98,168,173,171,172],"taps":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,41,0,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},"crc":"2baa4e30"} -------------------------------------------------------------------------------- /nvim/.config/nvim/after/ftplugin/qf.vim: -------------------------------------------------------------------------------- 1 | nnoremap T 2 | nnoremap lua require('qf_helper').open_split('split') 3 | nnoremap lua require('qf_helper').open_split('vsplit') 4 | 5 | nnoremap p 6 | 7 | nnoremap jp 8 | nnoremap kp 9 | 10 | nnoremap { lua require('qf_helper').navigate(-1, {by_file = true})p 11 | nnoremap } lua require('qf_helper').navigate(1, {by_file = true})p 12 | 13 | noremap K :Keep 14 | noremap R :Reject 15 | 16 | noremap lua require('replacer').run() 17 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/nvim-treesitter-textsubjects.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "RRethy/nvim-treesitter-textsubjects", 3 | requires = "nvim-treesitter/nvim-treesitter", 4 | after = "nvim-treesitter", 5 | config = function() 6 | local textobjects = { 7 | ["."] = "textsubjects-smart", 8 | [""] = "textsubjects-container-outer", 9 | ["i"] = "textsubjects-container-inner", 10 | } 11 | 12 | require("nvim-treesitter.configs").setup({ 13 | textsubjects = { 14 | enable = true, 15 | prev_selection = "", 16 | keymaps = textobjects, 17 | }, 18 | }) 19 | 20 | require("which-key").register(textobjects, { mode = "o", prefix = "" }) 21 | end, 22 | } 23 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/lspactions.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "RishabhRD/lspactions", 3 | requires = { 4 | "nvim-lua/plenary.nvim", 5 | "nvim-lua/popup.nvim", 6 | }, 7 | config = function() 8 | vim.ui.select = require("lspactions").select 9 | vim.ui.input = require("lspactions").input 10 | 11 | vim.lsp.handlers["textDocument/codeAction"] = require("lspactions").codeaction 12 | vim.lsp.handlers["textDocument/references"] = require("lspactions").references 13 | vim.lsp.handlers["textDocument/definition"] = require("lspactions").definition 14 | vim.lsp.handlers["textDocument/declaration"] = require("lspactions").declaration 15 | vim.lsp.handlers["textDocument/implementation"] = require("lspactions").implementation 16 | end, 17 | } 18 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/vim-caser.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "arthurxavierx/vim-caser", 3 | keys = { { "n", "cC" } }, 4 | setup = function() 5 | vim.g.caser_prefix = "cC" 6 | 7 | require("which-key").register({ 8 | name = "caser", 9 | [" "] = "space case", 10 | ["-"] = "dash-case", 11 | ["."] = "dot.case", 12 | ["_"] = "snake_case", 13 | c = "camelCase", 14 | k = "kebab-case", 15 | K = "Title-Kebab-Case", 16 | m = "MixedCase", 17 | p = "PascalCase", 18 | s = "Sentence case", 19 | t = "Title Case", 20 | u = "SNAKE_UPPERCASE", 21 | U = "SNAKE_UPPERCASE", 22 | }, { 23 | prefix = "cC", 24 | mode = "n", 25 | }) 26 | end, 27 | } 28 | -------------------------------------------------------------------------------- /bootstrap/homebrew/Brewfile-macos: -------------------------------------------------------------------------------- 1 | tap "homebrew/cask" 2 | tap "homebrew/cask-drivers" 3 | tap "homebrew/cask-fonts" 4 | brew "mas" 5 | cask "airbuddy" 6 | cask "aldente" 7 | cask "appcleaner" 8 | cask "bartender" 9 | cask "betterdisplay" 10 | cask "cursorsense" 11 | cask "cyberduck" 12 | cask "discord" 13 | cask "docker" 14 | cask "easy-move-plus-resize" 15 | cask "firefox" 16 | cask "font-jetbrains-mono-nerd-font" 17 | cask "google-chrome" 18 | cask "iina" 19 | cask "istat-menus" 20 | cask "karabiner-elements" 21 | cask "keepingyouawake" 22 | cask "keka" 23 | cask "keyboardcleantool" 24 | cask "kitty" 25 | cask "meetingbar" 26 | cask "nextcloud" 27 | cask "pock" 28 | cask "rectangle" 29 | cask "steermouse" 30 | cask "swish" 31 | cask "vlc" 32 | cask "wezterm" 33 | cask "yubico-authenticator" 34 | mas "Unsplash Wallpapers", id: 1284863847 35 | mas "WireGuard", id: 1451685025 36 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/barbecue.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "utilyre/barbecue.nvim", 3 | requires = { 4 | "SmiteshP/nvim-navic", 5 | }, 6 | config = function() 7 | require("barbecue").setup({ 8 | attach_navic = false, 9 | create_autocmd = false, 10 | exclude_filetypes = require("filetypes").excludes, 11 | modifiers = { 12 | dirname = ":s?.*??", 13 | }, 14 | }) 15 | 16 | vim.api.nvim_create_autocmd({ 17 | "WinScrolled", 18 | "BufWinEnter", 19 | "CursorHold", 20 | "InsertLeave", 21 | }, { 22 | group = vim.api.nvim_create_augroup("barbecue", {}), 23 | callback = function() 24 | require("barbecue.ui").update() 25 | end, 26 | }) 27 | end, 28 | } 29 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/qf_helper.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "stevearc/qf_helper.nvim", 3 | cmd = { 4 | "QNext", 5 | "QPrev", 6 | "LLToggle", 7 | "QFToggle", 8 | "Keep", 9 | "Reject", 10 | }, 11 | module = "qf_helper", 12 | ft = "qf", 13 | setup = function() 14 | local set_keymap = vim.api.nvim_set_keymap 15 | local opts = { noremap = true, silent = true } 16 | 17 | set_keymap("n", "", "QNext", opts) 18 | set_keymap("n", "", "QPrev", opts) 19 | end, 20 | config = function() 21 | require("qf_helper").setup({ 22 | quickfix = { 23 | default_bindings = false, 24 | min_height = 10, 25 | }, 26 | loclist = { 27 | default_bindings = false, 28 | min_height = 10, 29 | }, 30 | }) 31 | end, 32 | } 33 | -------------------------------------------------------------------------------- /kitty/.config/kitty/theme.conf: -------------------------------------------------------------------------------- 1 | background #1a1b26 2 | foreground #c0caf5 3 | selection_background #33467c 4 | selection_foreground #c0caf5 5 | url_color #73daca 6 | cursor #c0caf5 7 | cursor_text_color #1a1b26 8 | 9 | # Tabs 10 | active_tab_background #7aa2f7 11 | active_tab_foreground #16161e 12 | inactive_tab_background #292e42 13 | inactive_tab_foreground #545c7e 14 | # tab_bar_background #15161e 15 | 16 | # Windows 17 | active_border_color #7aa2f7 18 | inactive_border_color #292e42 19 | 20 | # Normal 21 | color0 #15161e 22 | color1 #f7768e 23 | color2 #9ece6a 24 | color3 #e0af68 25 | color4 #7aa2f7 26 | color5 #bb9af7 27 | color6 #7dcfff 28 | color7 #a9b1d6 29 | 30 | # Bright 31 | color8 #414868 32 | color9 #f7768e 33 | color10 #9ece6a 34 | color11 #e0af68 35 | color12 #7aa2f7 36 | color13 #bb9af7 37 | color14 #7dcfff 38 | color15 #c0caf5 39 | 40 | # Extended 41 | color16 #ff9e64 42 | color17 #db4b4b 43 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/rainbow.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "luochen1990/rainbow", 3 | opt = true, 4 | setup = function() 5 | local colors = require("colors") 6 | 7 | vim.g.rainbow_active = 1 8 | 9 | local rainbow_conf = { 10 | guifgs = { 11 | colors.red, 12 | colors.green, 13 | colors.blue, 14 | colors.yellow, 15 | colors.cyan, 16 | colors.magenta, 17 | colors.orange, 18 | }, 19 | separately = {}, 20 | } 21 | 22 | local filetypes = require("filetypes") 23 | 24 | for _, filetype_type in pairs(filetypes) do 25 | if filetype_type ~= "sidebars" then 26 | for _, filetype in ipairs(filetype_type) do 27 | rainbow_conf.separately[filetype] = 0 28 | end 29 | end 30 | end 31 | 32 | vim.g.rainbow_conf = rainbow_conf 33 | end, 34 | } 35 | -------------------------------------------------------------------------------- /scripts/.local/bin/install_win32yank: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | 5 | INSTALL_DIR="${HOME}/.local/bin" 6 | VERSION_FILE="${INSTALL_DIR}/.win32yank_version" 7 | FILE="win32yank.exe" 8 | 9 | RELEASE_INFO="/tmp/release-info" 10 | curl -s https://api.github.com/repos/equalsraf/win32yank/releases/latest > "$RELEASE_INFO" 11 | 12 | TAG_NAME=$(grep "tag_name" "$RELEASE_INFO" | cut -d\" -f4) 13 | DOWNLOAD_URL="https://github.com/equalsraf/win32yank/releases/download/${TAG_NAME}/win32yank-x64.zip" 14 | DOWNLOAD_DIR="/tmp/win32yank" 15 | DOWNLOAD_ZIP="${DOWNLOAD_DIR}/win32yank.zip" 16 | 17 | if [ ! -e "$VERSION_FILE" ] || ! grep -q "$TAG_NAME" < "$VERSION_FILE"; then 18 | rm -rf "$DOWNLOAD_DIR" 19 | mkdir -p "$DOWNLOAD_DIR" 20 | 21 | curl -L "$DOWNLOAD_URL" -o "$DOWNLOAD_ZIP" 22 | unzip "$DOWNLOAD_ZIP" -d "$DOWNLOAD_DIR" 23 | 24 | cp "${DOWNLOAD_DIR}/${FILE}" "$INSTALL_DIR" 25 | chmod +x "${INSTALL_DIR}/${FILE}" 26 | echo "$TAG_NAME" > "$VERSION_FILE" 27 | 28 | rm -rf "$DOWNLOAD_DIR" 29 | fi 30 | -------------------------------------------------------------------------------- /scripts/.local/bin/install_vale_style_microsoft: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | INSTALL_DIR="${HOME}/.config/vale/styles/Microsoft" 4 | VERSION_FILE="${INSTALL_DIR}/.version" 5 | 6 | RELEASE_INFO="/tmp/release-info" 7 | curl -s https://api.github.com/repos/errata-ai/Microsoft/releases/latest > "$RELEASE_INFO" 8 | 9 | TAG_NAME=$(grep "tag_name" "$RELEASE_INFO" | cut -d\" -f4) 10 | DOWNLOAD_URL=$(grep "browser_download_url" "$RELEASE_INFO" | cut -d\" -f4) 11 | DOWNLOAD_DIR="/tmp/vale-microsoft" 12 | DOWNLOAD_ZIP="${DOWNLOAD_DIR}/Microsoft.zip" 13 | 14 | if [ ! -e "$VERSION_FILE" ] || ! grep -q "$TAG_NAME" < "$VERSION_FILE"; then 15 | rm -rf "$DOWNLOAD_DIR" 16 | mkdir -p "$DOWNLOAD_DIR" 17 | 18 | rm -rf "$INSTALL_DIR" 19 | mkdir -p "$INSTALL_DIR" 20 | 21 | curl -L "$DOWNLOAD_URL" -o "$DOWNLOAD_ZIP" 22 | unzip -o "$DOWNLOAD_ZIP" -d "$DOWNLOAD_DIR" 23 | rm -rf "$DOWNLOAD_ZIP" 24 | 25 | cp -R "$DOWNLOAD_DIR/Microsoft/." "$INSTALL_DIR" 26 | echo "$TAG_NAME" > "$VERSION_FILE" 27 | 28 | rm -rf "$DOWNLOAD_DIR" 29 | fi 30 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/neogit.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "NeogitOrg/neogit", 3 | requires = "nvim-lua/plenary.nvim", 4 | cmd = "Neogit", 5 | module = "neogit", 6 | setup = function() 7 | vim.api.nvim_create_user_command("ToggleNeogitStatusTab", function() 8 | local curr_bufname = vim.fn.bufname("NeogitStatus") 9 | 10 | if vim.fn.buflisted(curr_bufname) == 1 then 11 | local curr_bufnr = vim.fn.bufnr("NeogitStatus") 12 | 13 | for _, bufnr in ipairs(vim.fn.tabpagebuflist()) do 14 | if bufnr == curr_bufnr then 15 | vim.cmd("tabprevious") 16 | return 17 | end 18 | end 19 | end 20 | 21 | vim.cmd("Neogit") 22 | end, {}) 23 | end, 24 | config = function() 25 | require("neogit").setup({ 26 | disable_commit_confirmation = true, 27 | integrations = { diffview = true }, 28 | }) 29 | end, 30 | } 31 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/copilot.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "zbirenbaum/copilot.lua", 3 | cmd = "Copilot", 4 | event = "InsertEnter", 5 | config = function() 6 | require("copilot").setup({ 7 | panel = { 8 | auto_refresh = true, 9 | keymap = { 10 | accept = "", 11 | jump_next = "", 12 | jump_prev = "", 13 | open = "", 14 | refresh = "", 15 | }, 16 | }, 17 | suggestion = { 18 | auto_trigger = true, 19 | keymap = { 20 | accept = "", 21 | accept_line = false, 22 | accept_word = false, 23 | dismiss = "", 24 | next = "", 25 | prev = "", 26 | }, 27 | }, 28 | filetypes = { 29 | ["*"] = true, 30 | }, 31 | }) 32 | end, 33 | } 34 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/nvim-neotest.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "nvim-neotest/neotest", 3 | requires = { 4 | "nvim-treesitter/nvim-treesitter", 5 | { "nvim-neotest/neotest-python" }, 6 | { "haydenmeade/neotest-jest" }, 7 | { "nvim-neotest/neotest-vim-test" }, 8 | { "vim-test/vim-test" }, 9 | }, 10 | module = "neotest", 11 | setup = function() 12 | local set_keymap = vim.keymap.set 13 | 14 | set_keymap("n", "]t", function() 15 | require("neotest").jump.next("Next test") 16 | end, { desc = "Next test" }) 17 | set_keymap("n", "[t", function() 18 | require("neotest").jump.prev("Previous test") 19 | end, { desc = "Previous Test" }) 20 | end, 21 | config = function() 22 | require("neotest").setup({ 23 | adapters = { 24 | require("neotest-jest"), 25 | require("neotest-python"), 26 | require("neotest-vim-test")({ ignore_file_types = { "python", "js", "ts" } }), 27 | }, 28 | }) 29 | end, 30 | } 31 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/nvim-hlslens.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "kevinhwang91/nvim-hlslens", 3 | module = "hlslens", 4 | keys = "/", 5 | setup = function() 6 | local set_keymap = vim.api.nvim_set_keymap 7 | local opts = { noremap = true, silent = true } 8 | 9 | set_keymap( 10 | "n", 11 | "n", 12 | "execute('normal! ' . v:count1 . 'n')lua require('hlslens').start()", 13 | opts 14 | ) 15 | set_keymap( 16 | "n", 17 | "N", 18 | "execute('normal! ' . v:count1 . 'N')lua require('hlslens').start()", 19 | opts 20 | ) 21 | set_keymap("n", "*", "*lua require('hlslens').start()", opts) 22 | set_keymap("n", "#", "#lua require('hlslens').start()", opts) 23 | set_keymap("n", "g*", "g*lua require('hlslens').start()", opts) 24 | set_keymap("n", "g#", "g#lua require('hlslens').start()", opts) 25 | end, 26 | config = function() 27 | require("scrollbar.handlers.search").setup() 28 | end, 29 | } 30 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/readline.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "linty-org/readline.nvim", 3 | config = function() 4 | local readline = require("readline") 5 | local set_keymap = vim.keymap.set 6 | set_keymap("!", "", readline.kill_line) 7 | set_keymap("!", "", readline.backward_kill_line) 8 | set_keymap("!", "", readline.kill_word) 9 | set_keymap("!", "", readline.backward_kill_word) 10 | set_keymap("!", "", readline.unix_word_rubout) 11 | set_keymap("!", "", "") -- delete-char 12 | set_keymap("!", "", "") -- backward-delete-char 13 | set_keymap("!", "", readline.beginning_of_line) 14 | set_keymap("!", "", readline.end_of_line) 15 | set_keymap("!", "", readline.forward_word) 16 | set_keymap("!", "", readline.backward_word) 17 | set_keymap("!", "", "") -- forward-char 18 | set_keymap("!", "", "") -- backward-char 19 | set_keymap("!", "", "") -- next-line 20 | set_keymap("!", "", "") -- previous-line 21 | end, 22 | } 23 | -------------------------------------------------------------------------------- /scripts/.local/bin/search: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | 5 | rm -f /tmp/rg-fzf-{r,f} 6 | RG_PREFIX="rg --column --line-number --no-heading --color=always --smart-case " 7 | INITIAL_QUERY="${*:-}" 8 | FZF_DEFAULT_COMMAND="$RG_PREFIX $(printf %q "$INITIAL_QUERY")" \ 9 | fzf --ansi \ 10 | --color "hl:-1:underline,hl+:-1:underline:reverse" \ 11 | --disabled --query "$INITIAL_QUERY" \ 12 | --bind "change:reload:sleep 0.1; $RG_PREFIX {q} || true" \ 13 | --bind "ctrl-f:unbind(change,ctrl-f)+change-prompt( FZF > )+enable-search+rebind(ctrl-r)+transform-query(echo {q} > /tmp/rg-fzf-r; cat /tmp/rg-fzf-f)" \ 14 | --bind "ctrl-r:unbind(ctrl-r)+change-prompt( RG > )+disable-search+reload($RG_PREFIX {q} || true)+rebind(change,ctrl-f)+transform-query(echo {q} > /tmp/rg-fzf-f; cat /tmp/rg-fzf-r)" \ 15 | --bind "start:unbind(ctrl-r)" \ 16 | --bind "alt-enter:become($EDITOR {1} +{2})" \ 17 | --bind "enter:become(echo {1})" \ 18 | --prompt " RG > " \ 19 | --delimiter : \ 20 | --header "/ CTRL-R (RG) / CTRL-F (FZF) /" \ 21 | --preview "bat --color=always {1} --highlight-line {2}" \ 22 | --preview-window "+{2}+3/3,~3" 23 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/oil.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "stevearc/oil.nvim", 3 | setup = function() 4 | vim.keymap.set("n", "-", function() 5 | require("oil").open() 6 | end, { desc = "Open parent directory" }) 7 | end, 8 | config = function() 9 | require("oil").setup({ 10 | keymaps = { 11 | [""] = "actions.select_vsplit", 12 | [""] = "actions.select_split", 13 | [""] = "actions.select_tab", 14 | [""] = "actions.preview", 15 | [""] = "actions.close", 16 | [""] = "actions.refresh", 17 | ["g?"] = "actions.show_help", 18 | [""] = "actions.select", 19 | ["-"] = "actions.parent", 20 | ["_"] = "actions.open_cwd", 21 | ["`"] = "actions.cd", 22 | ["~"] = "actions.tcd", 23 | ["g."] = "actions.toggle_hidden", 24 | }, 25 | use_default_keymaps = false, 26 | view_options = { 27 | show_hidden = true, 28 | }, 29 | }) 30 | end, 31 | } 32 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/venn.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "jbyuki/venn.nvim", 3 | cmd = "VBox", 4 | setup = function() 5 | local toggle_venn = function() 6 | local venn_enabled = vim.inspect(vim.b.venn_enabled) 7 | if venn_enabled == "nil" then 8 | vim.b.venn_enabled = true 9 | vim.cmd([[setlocal ve=all]]) 10 | -- draw a line on HJKL keystokes 11 | vim.api.nvim_buf_set_keymap(0, "n", "J", "j:VBox", { noremap = true }) 12 | vim.api.nvim_buf_set_keymap(0, "n", "K", "k:VBox", { noremap = true }) 13 | vim.api.nvim_buf_set_keymap(0, "n", "L", "l:VBox", { noremap = true }) 14 | vim.api.nvim_buf_set_keymap(0, "n", "H", "h:VBox", { noremap = true }) 15 | -- draw a box by pressing "B" with visual selection 16 | vim.api.nvim_buf_set_keymap(0, "v", "B", ":VBox", { noremap = true }) 17 | else 18 | vim.cmd([[setlocal ve=]]) 19 | vim.cmd([[mapclear ]]) 20 | vim.b.venn_enabled = nil 21 | end 22 | end 23 | vim.keymap.set("n", "v", toggle_venn, { noremap = true }) 24 | end, 25 | } 26 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | This is free and unencumbered software released into the public domain. 2 | 3 | Anyone is free to copy, modify, publish, use, compile, sell, or 4 | distribute this software, either in source code form or as a compiled 5 | binary, for any purpose, commercial or non-commercial, and by any 6 | means. 7 | 8 | In jurisdictions that recognize copyright laws, the author or authors 9 | of this software dedicate any and all copyright interest in the 10 | software to the public domain. We make this dedication for the benefit 11 | of the public at large and to the detriment of our heirs and 12 | successors. We intend this dedication to be an overt act of 13 | relinquishment in perpetuity of all present and future rights to this 14 | software under copyright law. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | For more information, please refer to 25 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/winshift.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "sindrets/winshift.nvim", 3 | cmd = "WinShift", 4 | setup = function() 5 | local set_keymap = vim.api.nvim_set_keymap 6 | local opts = { noremap = true, silent = true } 7 | 8 | set_keymap("n", "", "WinShift swap", opts) 9 | set_keymap("n", "m", "WinShift swap", opts) 10 | set_keymap("n", "", "WinShift", opts) 11 | set_keymap("n", "e", "WinShift", opts) 12 | set_keymap("n", "", "WinShift down", opts) 13 | set_keymap("n", "", "WinShift up", opts) 14 | set_keymap("n", "", "WinShift left", opts) 15 | set_keymap("n", "", "WinShift right", opts) 16 | end, 17 | config = function() 18 | require("winshift").setup({ 19 | window_picker = function() 20 | return require("winshift.lib").pick_window({ 21 | filter_rules = { 22 | cur_win = true, 23 | floats = true, 24 | filetype = require("filetypes").excludes, 25 | }, 26 | }) 27 | end, 28 | }) 29 | end, 30 | } 31 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/keymaps.lua: -------------------------------------------------------------------------------- 1 | local set_keymap = vim.api.nvim_set_keymap 2 | local opts = { noremap = true, silent = true } 3 | 4 | -- Tabs: Navigation 5 | set_keymap("", "", ":tabnext", {}) 6 | set_keymap("", "", ":tabprevious", {}) 7 | 8 | -- Windows: Navigation 9 | set_keymap("", "", "j", {}) 10 | set_keymap("", "", "k", {}) 11 | set_keymap("", "", "h", {}) 12 | set_keymap("", "", "l", {}) 13 | set_keymap("", "", "p", {}) 14 | 15 | -- Windows: Resize 16 | set_keymap("n", "", ":resize +2", opts) 17 | set_keymap("n", "", ":resize -2", opts) 18 | set_keymap("n", "", ":vertical resize -2", opts) 19 | set_keymap("n", "", ":vertical resize +2", opts) 20 | set_keymap("", "", "=", {}) 21 | 22 | -- Move lines 23 | set_keymap("n", "", ":m .+1==", opts) 24 | set_keymap("n", "", ":m .-2==", opts) 25 | set_keymap("v", "", ":m '>+1gv=gv", opts) 26 | set_keymap("v", "", ":m '<-2gv=gv", opts) 27 | 28 | -- Line Text Objects 29 | set_keymap("v", "al", ":norm!0v$h", opts) 30 | set_keymap("v", "il", ":norm!^vg_", opts) 31 | set_keymap("o", "al", ":norm val", opts) 32 | set_keymap("o", "il", ":norm vil", opts) 33 | 34 | -- Search: In Visual Selection 35 | set_keymap("x", "gv", [[/\%V]], {}) 36 | 37 | vim.g.mapleader = " " 38 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/Comment.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "numToStr/Comment.nvim", 3 | config = function() 4 | require("Comment").setup({ 5 | ignore = "^$", 6 | pre_hook = function(ctx) 7 | if vim.bo.filetype == "typescriptreact" then 8 | local U = require("Comment.utils") 9 | 10 | local type = ctx.ctype == U.ctype.linewise and "__default" or "__multiline" 11 | 12 | local location = nil 13 | if ctx.ctype == U.ctype.blockwise then 14 | location = require("ts_context_commentstring.utils").get_cursor_location() 15 | elseif ctx.cmotion == U.cmotion.v or ctx.cmotion == U.cmotion.V then 16 | location = require("ts_context_commentstring.utils").get_visual_start_location() 17 | end 18 | 19 | return require("ts_context_commentstring.internal").calculate_commentstring({ 20 | key = type, 21 | location = location, 22 | }) 23 | end 24 | end, 25 | }) 26 | 27 | local set_keymap = vim.keymap.set 28 | 29 | set_keymap("n", "/", "(comment_toggle_linewise_current)") 30 | set_keymap("v", "/", "gc", { remap = true }) 31 | end, 32 | } 33 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/filetypes.lua: -------------------------------------------------------------------------------- 1 | local sidebars = { 2 | "dbui", 3 | "DiffViewFiles", 4 | "Mundo", 5 | "MundoDiff", 6 | "NvimTree", 7 | "Outline", 8 | } 9 | 10 | return { 11 | treesitter = { 12 | "css", 13 | "dockerfile", 14 | "fish", 15 | "git_config", 16 | "git_rebase", 17 | "gitattributes", 18 | "gitcommit", 19 | "gitignore", 20 | "go", 21 | "graphql", 22 | "html", 23 | "java", 24 | "javascript", 25 | "json", 26 | "jsonc", 27 | "lua", 28 | "markdown", 29 | "python", 30 | "rust", 31 | "scss", 32 | "svelte", 33 | "toml", 34 | "typescript", 35 | "vim", 36 | "yaml", 37 | }, 38 | extras = { 39 | "html5", 40 | "javascriptreact", 41 | "jsx", 42 | "sh", 43 | "typescriptreact", 44 | }, 45 | excludes = { 46 | "dirbuf", 47 | "cmp_docs", 48 | "cmp_menu", 49 | "fugitive", 50 | "fugitiveblame", 51 | "gitcommit", 52 | "help", 53 | "lspinfo", 54 | "NeogitStatus", 55 | "notify", 56 | "packer", 57 | "prompt", 58 | "qf", 59 | "TelescopePrompt", 60 | "TelescopeResults", 61 | unpack(sidebars), 62 | }, 63 | sidebars = sidebars, 64 | } 65 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # dotfiles 2 | 3 | ```sh 4 | git clone https://github.com/petertriho/dotfiles.git ~/.dotfiles 5 | ~/.dotfiles/bootstrap.sh 6 | update 7 | ``` 8 | 9 | ## Software 10 | 11 | - [Fish Shell](https://fishshell.com/) 12 | - [Neovim](https://neovim.io/) 13 | - [Tmux](https://github.com/tmux/tmux) 14 | 15 | ### Fish Shell 16 | 17 | #### Dependencies 18 | 19 | - [starship](https://starship.rs/) 20 | - [jorgeburcaran/fisher](https://github.com/jorgebucaran/fisher) 21 | - [ajeetdsouza/zoxide](https://github.com/ajeetdsouza/zoxide) 22 | - [BurntSushi/ripgrep](https://github.com/BurntSushi/ripgrep) 23 | - [dandavison/delta](https://github.com/dandavison/delta) 24 | - [junegunn/fzf](https://github.com/junegunn/fzf) 25 | - [sharkdp/bat](https://github.com/sharkdp/bat) 26 | - [sharkdp/fd](https://github.com/sharkdp/fd) 27 | - [sharkdp/vivid](https://github.com/sharkdp/vivid) 28 | 29 | ### Neovim 30 | 31 | #### Dependencies 32 | 33 | - [wbthomason/packer.nvim](https://github.com/wbthomason/packer.nvim) 34 | - [BurntSushi/ripgrep](https://github.com/BurntSushi/ripgrep) 35 | - [cli/cli](https://github.com/cli/cli) 36 | - [sharkdp/fd](https://github.com/sharkdp/fd) 37 | - `scripts/.local/bin/install_formatters_linters` 38 | - `scripts/.local/bin/install_language_servers` 39 | 40 | ### Tmux 41 | 42 | #### Dependencies 43 | 44 | - [tmux-plugins/tpm](https://github.com/tmux-plugins/tpm) 45 | - [tmux-python/libtmux](https://github.com/tmux-python/libtmux) 46 | -------------------------------------------------------------------------------- /scripts/.local/bin/install_marksman_language_server: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | 5 | INSTALL_DIR="${HOME}/.local/bin" 6 | VERSION_FILE="${INSTALL_DIR}/.marksman_version" 7 | FILE="marksman" 8 | 9 | echo "TODO: remove me when all machines have been migrated to homebrew version." 10 | rm -f "${INSTALL_DIR}/${FILE}" 11 | rm -f "$VERSION_FILE" 12 | 13 | # RELEASE_INFO="/tmp/release-info" 14 | # curl -s https://api.github.com/repos/artempyanykh/marksman/releases/latest > "$RELEASE_INFO" 15 | 16 | # TAG_NAME=$(grep "tag_name" "$RELEASE_INFO" | cut -d\" -f4) 17 | # DOWNLOAD_DIR="/tmp/marksman" 18 | # DOWNLOAD_FILE="${DOWNLOAD_DIR}/marksman" 19 | 20 | # OS=$(uname -s | tr "[:upper:]" "[:lower:]") 21 | 22 | # case "$OS" in 23 | # linux) 24 | # PLATFORM="linux-x64" 25 | # ;; 26 | # darwin) 27 | # PLATFORM="macos" 28 | # ;; 29 | # *) 30 | # PLATFORM="exe" 31 | # ;; 32 | # esac 33 | 34 | # DOWNLOAD_URL=$(grep "browser_download_url.*$PLATFORM" "$RELEASE_INFO" | cut -d\" -f4) 35 | 36 | # if [ ! -e "$VERSION_FILE" ] || ! grep -q "$TAG_NAME" < "$VERSION_FILE"; then 37 | # rm -rf "$DOWNLOAD_DIR" 38 | # mkdir -p "$DOWNLOAD_DIR" 39 | 40 | # curl -L "$DOWNLOAD_URL" -o "$DOWNLOAD_FILE" 41 | 42 | # cp -R "$DOWNLOAD_DIR/." "$INSTALL_DIR" 43 | # chmod +x "$INSTALL_DIR/$FILE" 44 | # echo "$TAG_NAME" > "$VERSION_FILE" 45 | 46 | # rm -rf "$DOWNLOAD_DIR" 47 | # fi 48 | -------------------------------------------------------------------------------- /git/.gitconfig: -------------------------------------------------------------------------------- 1 | [commit] 2 | verbose = true 3 | template = ~/.gittemplates/commit 4 | 5 | [core] 6 | # Remove delta_side_by_side function when fixed 7 | # https://github.com/dandavison/delta/issues/359 8 | # https://github.com/wfxr/forgit/issues/121 9 | pager = delta --width ${FZF_PREVIEW_COLUMNS-$COLUMNS} 10 | 11 | [delta] 12 | navigate = true 13 | syntax-theme = base16 14 | true-color = always 15 | 16 | [diff] 17 | colorMoved = zebra 18 | # external = difft 19 | tool = difftastic 20 | 21 | [difftool] 22 | prompt = false 23 | 24 | [difftool "difftastic"] 25 | cmd = difft "$LOCAL" "$REMOTE" 26 | 27 | [init] 28 | defaultBranch = main 29 | 30 | [interactive] 31 | diffFilter = delta --color-only 32 | 33 | [fetch] 34 | prune = true 35 | 36 | [filter "lfs"] 37 | clean = git-lfs clean -- %f 38 | smudge = git-lfs smudge -- %f 39 | process = git-lfs filter-process 40 | required = true 41 | 42 | [merge] 43 | conflictStyle = diff3 44 | tool = mergetool 45 | 46 | [mergetool "fugitive"] 47 | cmd = nvim -f -c "Gvdiffsplit!" "$MERGED" 48 | trustExitCode = false 49 | 50 | [mergetool "mergetool"] 51 | cmd = nvim -f -c "MergetoolStart" "$MERGED" "$BASE" "$LOCAL" "$REMOTE" 52 | trustExitCode = true 53 | 54 | [pager] 55 | difftool = true 56 | 57 | [pull] 58 | rebase = true 59 | 60 | [user] 61 | name = Peter Tri Ho 62 | email = mail@petertriho.com 63 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/lsp/format.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | local disabled = { 4 | lua_ls = true, 5 | tsserver = true, 6 | } 7 | 8 | local function filter(client) 9 | return not disabled[client.name] 10 | end 11 | 12 | local null_ls = require("null-ls") 13 | 14 | M.on_attach = function(client, bufnr) 15 | local format = function() 16 | vim.lsp.buf.format({ 17 | bufnr = bufnr, 18 | filter = filter, 19 | async = true, 20 | }) 21 | end 22 | 23 | local slow_format = function() 24 | null_ls.enable({ name = "slow_formatters" }) 25 | format() 26 | null_ls.disable({ name = "slow_formatters" }) 27 | end 28 | 29 | if client.server_capabilities.documentFormattingProvider then 30 | vim.keymap.set("n", "f", function() 31 | format() 32 | end, { buffer = bufnr, desc = "LSP format" }) 33 | 34 | vim.keymap.set("n", "F", function() 35 | slow_format() 36 | end, { buffer = bufnr, desc = "Slow LSP format" }) 37 | end 38 | 39 | if client.server_capabilities.documentRangeFormattingProvider then 40 | vim.keymap.set("v", "f", function() 41 | format() 42 | end, { buffer = bufnr, desc = "LSP range format" }) 43 | 44 | vim.keymap.set("v", "F", function() 45 | slow_format() 46 | end, { buffer = bufnr, desc = "Slow LSP range format" }) 47 | end 48 | end 49 | 50 | return M 51 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/nvim-tree-utils.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | local openfile = require("nvim-tree.actions.node.open-file") 4 | local actions = require("telescope.actions") 5 | local action_state = require("telescope.actions.state") 6 | 7 | local view_selection = function(prompt_bufnr, map) 8 | actions.select_default:replace(function() 9 | actions.close(prompt_bufnr) 10 | local selection = action_state.get_selected_entry() 11 | local filename = selection.filename 12 | if filename == nil then 13 | filename = selection[1] 14 | end 15 | openfile.fn("preview", filename) 16 | end) 17 | return true 18 | end 19 | 20 | function M.launch_telescope(func_name, opts) 21 | local telescope_status_ok, _ = pcall(require, "telescope") 22 | if not telescope_status_ok then 23 | return 24 | end 25 | local lib_status_ok, lib = pcall(require, "nvim-tree.lib") 26 | if not lib_status_ok then 27 | return 28 | end 29 | local node = lib.get_node_at_cursor() 30 | local is_folder = node.fs_stat and node.fs_stat.type == "directory" or false 31 | local basedir = is_folder and node.absolute_path or vim.fn.fnamemodify(node.absolute_path, ":h") 32 | if node.name == ".." and TreeExplorer ~= nil then 33 | basedir = TreeExplorer.cwd 34 | end 35 | opts = opts or { hidden = true } 36 | opts.cwd = basedir 37 | opts.search_dirs = { basedir } 38 | opts.attach_mappings = view_selection 39 | return require("telescope.builtin")[func_name](opts) 40 | end 41 | 42 | return M 43 | -------------------------------------------------------------------------------- /git/.gittemplates/commit: -------------------------------------------------------------------------------- 1 | 2 | # ** Format 3 | # (): 4 | # [BLANK LINE] 5 | # 6 | # [BLANK LINE] 7 | # 8 | # 9 | # ** Type 10 | # * 📦 build: changes affecting build process or auxiliary tools 11 | # * 🔧 chore: changes that don't modify src or test files 12 | # * 👷 ci: ci/cd related changes 13 | # * 📚 docs: documentation only changes 14 | # * ✨ feat: a new feature 15 | # * 🐛 fix: a bug fix 16 | # * ⚡️ perf: a code change that improves performance 17 | # * ♻️ refactor: a code change that neither fixes a bug or adds a feature 18 | # * 🚀 release: create a release commit 19 | # * ⏪ revert: revert previous changes 20 | # * 🎨 style: changes that do not affect the meaning of the code (white­space, formatting, missing semi-colons, etc) 21 | # * 🚨 test: adding missing or correcting existing tests 22 | # 23 | # ** Subject 24 | # * use imperative, present tense: "change" not "changed" nor "changes" 25 | # * no dot (.) at the end. 26 | # 27 | # ** Scope 28 | # * provide additional contextual information 29 | # * contained within parenthesis 30 | # 31 | # ** Body 32 | # * use imperative, present tense: "change" not "changed" nor "changes" 33 | # * should include the motivation for the change and contrast this with 34 | # previous behavior 35 | # 36 | # ** Footer 37 | # * reference any tasks/tickets/issues related to this commit 38 | # * breaking changes start with "BREAKING CHANGE:", or appends "!" after the 39 | # type/scope 40 | # 41 | # ** Additional Notes: 42 | # * subject line 50 chars 43 | # * body/footer 72 chars 44 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/glance.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "dnlhc/glance.nvim", 3 | cmd = { 4 | "Glance", 5 | }, 6 | setup = function() 7 | local set_keymap = vim.keymap.set 8 | 9 | set_keymap("n", "gpd", "Glance definitions") 10 | set_keymap("n", "gpr", "Glance references") 11 | set_keymap("n", "gpy", "Glance type_definitions") 12 | set_keymap("n", "gpm", "Glance implementations") 13 | 14 | set_keymap("n", "gD", "Glance definitions") 15 | set_keymap("n", "gR", "Glance references") 16 | set_keymap("n", "gY", "Glance type_definitions") 17 | set_keymap("n", "gM", "Glance implementations") 18 | end, 19 | config = function() 20 | local glance = require("glance") 21 | local actions = glance.actions 22 | 23 | glance.setup({ 24 | height = 36, 25 | mappings = { 26 | list = { 27 | ["\\"] = actions.jump_vsplit, 28 | ["-"] = actions.jump_split, 29 | ["s"] = "(leap-forward-to)", 30 | ["v"] = "v", 31 | ["gp"] = actions.enter_win("preview"), 32 | ["l"] = "l", 33 | }, 34 | preview = { 35 | ["gp"] = actions.enter_win("list"), 36 | ["l"] = "l", 37 | }, 38 | }, 39 | folds = { 40 | folded = false, 41 | }, 42 | }) 43 | end, 44 | } 45 | -------------------------------------------------------------------------------- /scripts/.local/bin/install_ltex_language_server: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | 5 | INSTALL_DIR="${HOME}/.local/bin" 6 | INSTALL_SUB_DIR="${INSTALL_DIR}/ltex-language-server" 7 | VERSION_FILE="${INSTALL_DIR}/.ltex_language_server_version" 8 | 9 | RELEASE_INFO="/tmp/release-info" 10 | curl -s https://api.github.com/repos/valentjn/ltex-ls/releases/latest > "$RELEASE_INFO" 11 | 12 | TAG_NAME=$(grep "tag_name" "$RELEASE_INFO" | cut -d\" -f4) 13 | DOWNLOAD_DIR="/tmp/ltex-language-server" 14 | DOWNLOAD_ZIP="${DOWNLOAD_DIR}/ltex-language-server.tar.gz" 15 | 16 | OS=$(uname -s | tr "[:upper:]" "[:lower:]") 17 | 18 | case "$OS" in 19 | linux) 20 | PLATFORM="linux" 21 | ;; 22 | darwin) 23 | PLATFORM="mac" 24 | ;; 25 | *) 26 | PLATFORM="windows" 27 | ;; 28 | esac 29 | 30 | DOWNLOAD_URL=$(grep "browser_download_url.*$PLATFORM" "$RELEASE_INFO" | cut -d\" -f4) 31 | 32 | if [ ! -e "$VERSION_FILE" ] || ! grep -q "$TAG_NAME" < "$VERSION_FILE"; then 33 | rm -rf "$DOWNLOAD_DIR" 34 | mkdir -p "$DOWNLOAD_DIR" 35 | 36 | rm -rf "$INSTALL_SUB_DIR" 37 | mkdir -p "$INSTALL_SUB_DIR" 38 | 39 | curl -L "$DOWNLOAD_URL" -o "$DOWNLOAD_ZIP" 40 | tar xvf "$DOWNLOAD_ZIP" --strip-components 2 --directory "$DOWNLOAD_DIR" 41 | rm -rf "$DOWNLOAD_ZIP" 42 | 43 | rm -rf "$INSTALL_SUB_DIR" 44 | 45 | cp -R "$DOWNLOAD_DIR/." "$INSTALL_SUB_DIR" 46 | chmod +x "$INSTALL_SUB_DIR/bin/ltex-ls" 47 | ln -fs "$INSTALL_SUB_DIR/bin/ltex-ls" "$INSTALL_DIR/ltex-ls" 48 | chmod +x "$INSTALL_DIR/ltex-ls" 49 | echo "$TAG_NAME" > "$VERSION_FILE" 50 | 51 | rm -rf "$DOWNLOAD_DIR" 52 | fi 53 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/yanky.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "gbprod/yanky.nvim", 3 | keys = { 4 | "(YankyYank)", 5 | }, 6 | module = "yanky", 7 | setup = function() 8 | local set_keymap = vim.keymap.set 9 | 10 | set_keymap({ "n", "x" }, "y", "(YankyYank)") 11 | end, 12 | config = function() 13 | require("yanky").setup({ 14 | ring = { 15 | storage = "memory", 16 | }, 17 | highlight = { 18 | on_put = true, 19 | on_yank = true, 20 | timer = 200, 21 | }, 22 | }) 23 | 24 | local set_keymap = vim.keymap.set 25 | 26 | set_keymap({ "n", "x" }, "[p", "(YankyGPutBefore)") 27 | set_keymap({ "n", "x" }, "]p", "(YankyGPutAfter)") 28 | set_keymap({ "n", "x" }, "p", "(YankyPutAfter)") 29 | set_keymap({ "n", "x" }, "P", "(YankyPutBefore)") 30 | 31 | set_keymap("n", "]P", "(YankyPutIndentAfterLinewise)") 32 | set_keymap("n", "[P", "(YankyPutIndentBeforeLinewise)") 33 | set_keymap("n", ">p", "(YankyPutIndentAfterShiftRight)") 34 | set_keymap("n", "(YankyPutIndentAfterShiftLeft)") 35 | set_keymap("n", ">P", "(YankyPutIndentBeforeShiftRight)") 36 | set_keymap("n", "(YankyPutIndentBeforeShiftLeft)") 37 | set_keymap("n", "=p", "(YankyPutAfterFilter)") 38 | set_keymap("n", "=P", "(YankyPutBeforeFilter)") 39 | 40 | set_keymap("n", "", "(YankyCycleForward)") 41 | set_keymap("n", "", "(YankyCycleBackward)") 42 | 43 | set_keymap("n", "Y", "y$") 44 | end, 45 | } 46 | -------------------------------------------------------------------------------- /scripts/.local/bin/install_lua_language_server: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | 5 | INSTALL_DIR="${HOME}/.local/bin" 6 | INSTALL_SUB_DIR="${INSTALL_DIR}/sumneko-lua-language-server" 7 | VERSION_FILE="${INSTALL_DIR}/.lua_language_server_version" 8 | 9 | RELEASE_INFO="/tmp/release-info" 10 | curl -s https://api.github.com/repos/sumneko/vscode-lua/releases/latest > "$RELEASE_INFO" 11 | 12 | TAG_NAME=$(grep "tag_name" "$RELEASE_INFO" | cut -d\" -f4) 13 | DOWNLOAD_DIR="/tmp/sumneko-lua-language-server" 14 | DOWNLOAD_ZIP="${DOWNLOAD_DIR}/sumneko-lua-language-server.vsix" 15 | 16 | OS=$(uname -s | tr "[:upper:]" "[:lower:]") 17 | 18 | case "$OS" in 19 | linux) 20 | PLATFORM="linux-x64" 21 | ;; 22 | darwin) 23 | PLATFORM="darwin-x64" 24 | ;; 25 | *) 26 | PLATFORM="win32-x64" 27 | ;; 28 | esac 29 | 30 | DOWNLOAD_URL=$(grep "browser_download_url.*$PLATFORM" "$RELEASE_INFO" | cut -d\" -f4) 31 | 32 | if [ ! -e "$VERSION_FILE" ] || ! grep -q "$TAG_NAME" < "$VERSION_FILE"; then 33 | rm -rf "$DOWNLOAD_DIR" 34 | mkdir -p "$DOWNLOAD_DIR" 35 | 36 | rm -rf "$INSTALL_SUB_DIR" 37 | mkdir -p "$INSTALL_SUB_DIR" 38 | 39 | curl -L "$DOWNLOAD_URL" -o "$DOWNLOAD_ZIP" 40 | unzip "$DOWNLOAD_ZIP" -d "$DOWNLOAD_DIR" 41 | rm -rf "$DOWNLOAD_ZIP" 42 | 43 | cp -R "$DOWNLOAD_DIR/." "$INSTALL_SUB_DIR" 44 | chmod +x "$INSTALL_SUB_DIR/extension/server/bin/lua-language-server" 45 | echo "#!/usr/bin/env bash" > "$INSTALL_DIR/lua-language-server" 46 | echo '$(dirname $0)/sumneko-lua-language-server/extension/server/bin/lua-language-server -E -e LANG=en $(dirname $0)/sumneko-lua-language-server/extension/server/main.lua $*' >> "$INSTALL_DIR/lua-language-server" 47 | chmod +x "$INSTALL_DIR/lua-language-server" 48 | echo "$TAG_NAME" > "$VERSION_FILE" 49 | 50 | rm -rf "$DOWNLOAD_DIR" 51 | fi 52 | -------------------------------------------------------------------------------- /fish/.config/fish/functions/set_theme.fish: -------------------------------------------------------------------------------- 1 | function set_theme --description "Set ansi theme" 2 | set -U fish_greeting 3 | set -U fish_key_bindings fish_hybrid_key_bindings 4 | set -U fzf_fish_custom_keybindings 5 | 6 | set -U fish_cursor_default block 7 | set -U fish_cursor_insert line 8 | set -U fish_cursor_replace_one underscore 9 | set -U fish_cursor_visual block 10 | 11 | set -U fish_color_autosuggestion white 12 | set -U fish_color_cancel brblack 13 | set -U fish_color_command blue 14 | set -U fish_color_comment brblack 15 | set -U fish_color_cwd brred 16 | set -U fish_color_cwd_root red 17 | set -U fish_color_end white 18 | set -U fish_color_error brred 19 | set -U fish_color_escape brcyan 20 | set -U fish_color_history_current brcyan 21 | set -U fish_color_host brgreen 22 | set -U fish_color_match brcyan --underline 23 | set -U fish_color_normal white 24 | set -U fish_color_operator brmagenta 25 | set -U fish_color_param brcyan 26 | set -U fish_color_quote brgreen 27 | set -U fish_color_redirection brcyan 28 | set -U fish_color_search_match --background=blue 29 | set -U fish_color_selection --background=brblack 30 | set -U fish_color_status red 31 | set -U fish_color_user brblue 32 | set -U fish_color_valid_path brblue --underline 33 | set -U fish_pager_color_completion white 34 | set -U fish_pager_color_description white 35 | set -U fish_pager_color_prefix brgreen 36 | set -U fish_pager_color_progress yellow 37 | 38 | set -Ux LS_COLORS (vivid generate tokyonight) 39 | end 40 | -------------------------------------------------------------------------------- /bootstrap/windows/bootstrap.ps1: -------------------------------------------------------------------------------- 1 | # Check list 2 | # - Drivers 3 | # - Sophia app https://github.com/Sophia-Community/SophiApp 4 | # - WSL 5 | # - excludeWSL.ps1 6 | # - Winget 7 | # - Scoop 8 | # - dotfiles 9 | 10 | # WSL 11 | wsl --update 12 | wsl --install -d Ubuntu 13 | 14 | # Winget 15 | winget install --source winget --id Alex313031.Thorium.AVX2 16 | winget install --source winget --id Ablaze.Floorp 17 | winget install --source winget --id AltSnap.AltSnap 18 | winget install --source winget --id Betterbird.Betterbird 19 | winget install --source winget --id Discord.Discord 20 | winget install --source winget --id Giorgiotani.Peazip 21 | winget install --source winget --id Google.Chrome 22 | winget install --source winget --id MartiCliment.UniGetUI 23 | winget install --source winget --id Microsoft.PowerToys 24 | winget install --source winget --id Mozilla.Firefox 25 | winget install --source winget --id Neovide.Neovide 26 | winget install --source winget --id Nextcloud.NextcloudDesktop 27 | winget install --source winget --id RandyRants.SharpKeys 28 | winget install --source winget --id SumatraPDF.SumatraPDF 29 | winget install --source winget --id Valve.Steam 30 | winget install --source winget --id VideoLAN.VLC 31 | winget install --source winget --id voidtools.Everything 32 | winget install --source winget --id WinSCP.WinSCP 33 | winget install --source winget --id WireGuard.WireGuard 34 | winget install --source winget --id wez.wezterm 35 | 36 | # Scoop 37 | Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser 38 | irm get.scoop.sh | iex 39 | scoop install 7zip aria2 curl dark git neovim sudo win32yank 40 | scoop bucket add nerd-fonts 41 | scoop bucket add extras 42 | sudo scoop install --global JetBrainsMono-NF JetBrainsMono-NF-Mono JetBrainsMono-NF-Propo 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /tmux/.tmux/tokyonight.tmux: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | none="NONE" 4 | black="#15161e" 5 | blue="#7aa2f7" 6 | bg_statusline="#16161e" 7 | fg_gutter="#3b4261" 8 | fg_sidebar="#a9b1d6" 9 | 10 | set -g mode-style "fg=${blue},bg=${fg_gutter}" 11 | 12 | set -g message-style "fg=${blue},bg=${fg_gutter}" 13 | set -g message-command-style "fg=${blue},bg=${fg_gutter}" 14 | 15 | set -g pane-border-style "fg=${fg_gutter}" 16 | set -g pane-active-border-style "fg=${blue}" 17 | 18 | set -g status "on" 19 | set -g status-justify "left" 20 | 21 | set -g status-style "fg=${blue},bg=${bg_statusline}" 22 | 23 | set -g status-left-length "200" 24 | set -g status-right-length "100" 25 | 26 | set -g status-left-style ${none} 27 | set -g status-right-style ${none} 28 | 29 | set -g status-left "#[fg=${black},bg=${blue},bold] #S #[fg=${blue},bg=${bg_statusline},nobold,nounderscore,noitalics]" 30 | set -g status-right "#[fg=${bg_statusline},bg=${bg_statusline},nobold,nounderscore,noitalics]#[fg=${blue},bg=${bg_statusline}] #{prefix_highlight} #(gitmux -cfg $HOME/.gitmux.conf '#{pane_current_path}') #[fg=${fg_gutter},bg=${bg_statusline},nobold,nounderscore,noitalics]#[fg=${blue},bg=${fg_gutter}] %Y-%m-%d  %I:%M %p #[fg=${blue},bg=${fg_gutter},nobold,nounderscore,noitalics]#[fg=${black},bg=${blue},bold] #h " 31 | 32 | setw -g window-status-activity-style "underscore,fg=${fg_sidebar},bg=${bg_statusline}" 33 | setw -g window-status-separator "" 34 | setw -g window-status-style "${none},fg=${fg_sidebar},bg=${bg_statusline}" 35 | setw -g window-status-format "#[fg=${bg_statusline},bg=${bg_statusline},nobold,nounderscore,noitalics]#[default] #I  #W #F #[fg=${bg_statusline},bg=${bg_statusline},nobold,nounderscore,noitalics]" 36 | setw -g window-status-current-format "#[fg=${bg_statusline},bg=${fg_gutter},nobold,nounderscore,noitalics]#[fg=${blue},bg=${fg_gutter},bold] #I  #W #F #[fg=${fg_gutter},bg=${bg_statusline},nobold,nounderscore,noitalics]" 37 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/substitute.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "gbprod/substitute.nvim", 3 | module = "substitute", 4 | setup = function() 5 | local set_keymap = vim.api.nvim_set_keymap 6 | 7 | set_keymap("n", "s", "lua require('substitute').operator()", { noremap = true }) 8 | set_keymap("n", "ss", "lua require('substitute').line()", { noremap = true }) 9 | set_keymap("n", "S", "lua require('substitute').eol()", { noremap = true }) 10 | set_keymap("x", "s", "lua require('substitute').visual()", { noremap = true }) 11 | 12 | set_keymap("n", "\\s", "lua require('substitute.range').operator()", { noremap = true }) 13 | set_keymap("x", "\\s", "lua require('substitute.range').visual()", {}) 14 | set_keymap("n", "\\ss", "lua require('substitute.range').word()", {}) 15 | 16 | set_keymap( 17 | "n", 18 | "\\S", 19 | "lua require('substitute.range').operator({ prefix = 'S' })", 20 | { noremap = true } 21 | ) 22 | set_keymap("x", "\\S", "lua require('substitute.range').visual({ prefix = 'S' })", {}) 23 | set_keymap("n", "\\SS", "lua require('substitute.range').word({ prefix = 'S' })", {}) 24 | 25 | set_keymap("n", "cx", "lua require('substitute.exchange').operator()", { noremap = true }) 26 | set_keymap("n", "cxx", "lua require('substitute.exchange').line()", { noremap = true }) 27 | set_keymap("x", "X", "lua require('substitute.exchange').visual()", { noremap = true }) 28 | set_keymap("n", "cxc", "lua require('substitute.exchange').cancel()", { noremap = true }) 29 | end, 30 | config = function() 31 | require("substitute").setup({ 32 | on_substitute = function(event) 33 | require("yanky").init_ring("p", event.register, event.count, event.vmode:match("[vV�]")) 34 | end, 35 | }) 36 | end, 37 | } 38 | -------------------------------------------------------------------------------- /vivid/.config/vivid/themes/one-dark.yml: -------------------------------------------------------------------------------- 1 | colors: 2 | background_color: '282c34' 3 | white: '828997' 4 | red: 'e06c75' 5 | green: '98c379' 6 | yellow: 'e5c07b' 7 | blue: '61afef' 8 | pink: 'ff6ac1' 9 | cyan: '56b6c2' 10 | 11 | black: '000000' 12 | gray: '999999' 13 | darkgray: '666666' 14 | darkergray: '333333' 15 | 16 | core: 17 | normal_text: {} 18 | regular_file: {} 19 | reset_to_normal: {} 20 | 21 | directory: 22 | foreground: blue 23 | 24 | symlink: 25 | foreground: pink 26 | 27 | multi_hard_link: {} 28 | 29 | fifo: 30 | foreground: black 31 | background: blue 32 | 33 | socket: 34 | foreground: black 35 | background: pink 36 | 37 | door: 38 | foreground: black 39 | background: pink 40 | 41 | block_device: 42 | foreground: cyan 43 | background: darkergray 44 | 45 | character_device: 46 | foreground: pink 47 | background: darkergray 48 | 49 | broken_symlink: 50 | foreground: black 51 | background: red 52 | 53 | missing_symlink_target: 54 | foreground: black 55 | background: red 56 | 57 | setuid: {} 58 | 59 | setgid: {} 60 | 61 | file_with_capability: {} 62 | 63 | sticky_other_writable: {} 64 | 65 | other_writable: {} 66 | 67 | sticky: {} 68 | 69 | executable_file: 70 | foreground: red 71 | font-style: bold 72 | 73 | text: 74 | special: 75 | foreground: background_color 76 | background: yellow 77 | 78 | todo: 79 | font-style: bold 80 | 81 | licenses: 82 | foreground: gray 83 | 84 | configuration: 85 | foreground: yellow 86 | 87 | other: 88 | foreground: yellow 89 | 90 | markup: 91 | foreground: yellow 92 | 93 | programming: 94 | source: 95 | foreground: green 96 | 97 | tooling: 98 | foreground: green 99 | 100 | continuous-integration: 101 | foreground: green 102 | 103 | media: 104 | foreground: pink 105 | 106 | office: 107 | foreground: red 108 | 109 | archives: 110 | foreground: cyan 111 | font-style: underline 112 | 113 | executable: 114 | foreground: red 115 | font-style: bold 116 | 117 | unimportant: 118 | foreground: darkgray 119 | -------------------------------------------------------------------------------- /vivid/.config/vivid/themes/tokyonight.yml: -------------------------------------------------------------------------------- 1 | colors: 2 | background_color: '24284b' 3 | white: 'c0caf5' 4 | red: 'f7768e' 5 | green: '9ece6a' 6 | yellow: 'e0af68' 7 | blue: '7aa2f7' 8 | pink: 'bb9af7' 9 | cyan: '7dcfff' 10 | 11 | black: '000000' 12 | gray: '999999' 13 | darkgray: '666666' 14 | darkergray: '333333' 15 | 16 | core: 17 | normal_text: {} 18 | regular_file: {} 19 | reset_to_normal: {} 20 | 21 | directory: 22 | foreground: blue 23 | 24 | symlink: 25 | foreground: pink 26 | 27 | multi_hard_link: {} 28 | 29 | fifo: 30 | foreground: black 31 | background: blue 32 | 33 | socket: 34 | foreground: black 35 | background: pink 36 | 37 | door: 38 | foreground: black 39 | background: pink 40 | 41 | block_device: 42 | foreground: cyan 43 | background: darkergray 44 | 45 | character_device: 46 | foreground: pink 47 | background: darkergray 48 | 49 | broken_symlink: 50 | foreground: black 51 | background: red 52 | 53 | missing_symlink_target: 54 | foreground: black 55 | background: red 56 | 57 | setuid: {} 58 | 59 | setgid: {} 60 | 61 | file_with_capability: {} 62 | 63 | sticky_other_writable: {} 64 | 65 | other_writable: {} 66 | 67 | sticky: {} 68 | 69 | executable_file: 70 | foreground: red 71 | font-style: bold 72 | 73 | text: 74 | special: 75 | foreground: background_color 76 | background: yellow 77 | 78 | todo: 79 | font-style: bold 80 | 81 | licenses: 82 | foreground: gray 83 | 84 | configuration: 85 | foreground: yellow 86 | 87 | other: 88 | foreground: yellow 89 | 90 | markup: 91 | foreground: yellow 92 | 93 | programming: 94 | source: 95 | foreground: green 96 | 97 | tooling: 98 | foreground: green 99 | 100 | continuous-integration: 101 | foreground: green 102 | 103 | media: 104 | foreground: pink 105 | 106 | office: 107 | foreground: red 108 | 109 | archives: 110 | foreground: cyan 111 | font-style: underline 112 | 113 | executable: 114 | foreground: red 115 | font-style: bold 116 | 117 | unimportant: 118 | foreground: darkgray 119 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/vim-visual-multi.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "mg979/vim-visual-multi", 3 | setup = function() 4 | vim.g.VM_leader = "\\" 5 | vim.g.VM_maps = { ["Find Under"] = "\\f", ["Find Subword Under"] = "\\f" } 6 | vim.g.VM_mouse_mappings = 1 7 | vim.g.VM_Mono_hl = "DiffText" 8 | vim.g.VM_Extend_hl = "DiffAdd" 9 | vim.g.VM_Cursor_hl = "Visual" 10 | vim.g.VM_Insert_hl = "DiffChange" 11 | 12 | local config 13 | local lens_backup 14 | 15 | local function override_lens(render, plist, nearest, idx, r_idx) 16 | local _ = r_idx 17 | local lnum, col = unpack(plist[idx]) 18 | 19 | local text, chunks 20 | if nearest then 21 | text = ("[%d/%d]"):format(idx, #plist) 22 | chunks = { { " ", "Ignore" }, { text, "VM_Extend" } } 23 | else 24 | text = ("[%d]"):format(idx) 25 | chunks = { { " ", "Ignore" }, { text, "HlSearchLens" } } 26 | end 27 | render.set_virt(0, lnum - 1, col - 1, chunks, nearest) 28 | end 29 | 30 | local function vm_lens_start() 31 | local hlslens = require("hlslens") 32 | if hlslens then 33 | config = require("hlslens.config") 34 | lens_backup = config.override_lens 35 | config.override_lens = override_lens 36 | hlslens.start() 37 | end 38 | end 39 | 40 | local function vm_lens_exit() 41 | local hlslens = require("hlslens") 42 | if hlslens then 43 | config.override_lens = lens_backup 44 | hlslens.start() 45 | end 46 | end 47 | 48 | vim.api.nvim_create_augroup("vmlens", {}) 49 | vim.api.nvim_create_autocmd("User", { 50 | group = "vmlens", 51 | pattern = "visual_multi_start", 52 | callback = vm_lens_start, 53 | desc = "Visual multi lens start callback", 54 | }) 55 | 56 | vim.api.nvim_create_autocmd("User", { 57 | group = "vmlens", 58 | pattern = "visual_multi_exit", 59 | callback = vm_lens_exit, 60 | desc = "Visual multi lens exit callback", 61 | }) 62 | end, 63 | } 64 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/nvim-treesitter-textobjects.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "nvim-treesitter/nvim-treesitter-textobjects", 3 | requires = "nvim-treesitter/nvim-treesitter", 4 | after = "nvim-treesitter", 5 | config = function() 6 | require("nvim-treesitter.configs").setup({ 7 | textobjects = { 8 | select = { 9 | enable = true, 10 | lookahead = true, 11 | keymaps = { 12 | ["a/"] = "@comment.outer", 13 | ["ac"] = "@conditional.outer", 14 | ["ic"] = "@conditional.inner", 15 | ["aC"] = "@class.outer", 16 | ["iC"] = "@class.inner", 17 | ["ae"] = "@block.outer", 18 | ["ie"] = "@block.inner", 19 | ["af"] = "@function.outer", 20 | ["if"] = "@function.inner", 21 | ["aL"] = "@loop.outer", 22 | ["iL"] = "@loop.inner", 23 | ["aP"] = "@parameter.outer", 24 | ["iP"] = "@parameter.inner", 25 | ["ar"] = "@call.outer", 26 | ["ir"] = "@call.inner", 27 | ["aS"] = "@statement.outer", 28 | ["iS"] = "@statement.inner", 29 | }, 30 | }, 31 | move = { 32 | enable = true, 33 | set_jumps = true, 34 | goto_next_start = { 35 | ["]m"] = "@function.outer", 36 | ["]]"] = "@class.outer", 37 | }, 38 | goto_next_end = { 39 | ["]M"] = "@function.outer", 40 | ["]["] = "@class.outer", 41 | }, 42 | goto_previous_start = { 43 | ["[m"] = "@function.outer", 44 | ["[["] = "@class.outer", 45 | }, 46 | goto_previous_end = { 47 | ["[M"] = "@function.outer", 48 | ["[]"] = "@class.outer", 49 | }, 50 | }, 51 | }, 52 | }) 53 | end, 54 | } 55 | -------------------------------------------------------------------------------- /scripts/.local/bin/tj: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Tmux Jump 4 | # Assumptions: 5 | # - Project is a web project with backend & frontend 6 | # - Project lives inside $PROJECTS directories (accessed via pj) 7 | # - Backend started with "docker-compose up -d" 8 | # - Frontend started with "yarn start" 9 | # - Backend folder = e.g. cool-backend 10 | # - Frontend folder = e.g. cool-frontend 11 | 12 | #set -euo pipefail 13 | 14 | project=$1 15 | # TODO: Work with main & master 16 | bare_repo_folder=${2:-main} 17 | 18 | # TODO: Work with different separators 19 | #separators="-" 20 | 21 | # TODO: Work with different suffixes 22 | #backend_suffixes="backend server" 23 | #frontend_suffixes="frontend web-client client" 24 | 25 | if ! eval "$(tmux list-sessions 2> /dev/null | grep -q "$project")"; then 26 | tmux new-session -d -s "$project" 27 | 28 | separator="-" 29 | 30 | cd_backend_cmd="pj ${project}${separator}server" 31 | # TODO: Don't rely on pj here 32 | bare_repo_check_cmd="$cd_backend_cmd; git rev-parse --is-bare-repository" 33 | if [[ $(fish -c "$bare_repo_check_cmd") == "true" ]]; then 34 | cd_backend_cmd="$cd_backend_cmd; cd $bare_repo_folder" 35 | fi 36 | 37 | tmux rename-window -t "$project:1" "backend" 38 | tmux send-keys -t "$project:1" "$cd_backend_cmd" ENTER 39 | tmux send-keys -t "$project:1" "clear" ENTER 40 | #tmux send-keys -t "$project:1" "docker-compose up -d" ENTER 41 | 42 | tmux new-window -t "$project:2" 43 | tmux send-keys -t "$project:2" "$cd_backend_cmd" ENTER 44 | tmux send-keys -t "$project:2" "clear" ENTER 45 | 46 | cd_frontend_cmd="pj ${project}${separator}web-client" 47 | bare_repo_check_cmd="$cd_frontend_cmd; git rev-parse --is-bare-repository" 48 | if [[ $(fish -c "$bare_repo_check_cmd") == "true" ]]; then 49 | cd_frontend_cmd="$cd_frontend_cmd; cd $bare_repo_folder" 50 | fi 51 | 52 | tmux new-window -t "$project:3" -n "frontend" 53 | tmux send-keys -t "$project:3" "$cd_frontend_cmd" ENTER 54 | tmux send-keys -t "$project:3" "clear" ENTER 55 | #tmux send-keys -t "$project:3" "yarn start" ENTER 56 | 57 | tmux new-window -t "$project:4" 58 | tmux send-keys -t "$project:4" "$cd_frontend_cmd" ENTER 59 | tmux send-keys -t "$project:4" "clear" ENTER 60 | fi 61 | 62 | tmux attach-session -t "$project" 63 | -------------------------------------------------------------------------------- /jetbrains/.ideavimrc: -------------------------------------------------------------------------------- 1 | set hlsearch 2 | set ignorecase 3 | set incsearch 4 | set number 5 | 6 | set clipboard+=unnamedplus 7 | set clipboard+=ideaput 8 | set ideajoin 9 | set ideamarks 10 | set relativenumber 11 | set showmode 12 | 13 | Plug 'tpope/vim-commentary' 14 | Plug 'tpope/vim-surround' 15 | 16 | Plug 'preservim/nerdtree` 17 | set NERDTree 18 | 19 | Plug 'vim-scripts/argtextobj.vim' 20 | let g:argtextobj_pairs="(:),{:},<:>" 21 | 22 | set quickscope 23 | let g:qs_primary_color = '#7aa2f7' 24 | let g:qs_secondary_color = '#f7768e' 25 | 26 | " AceJump 27 | nmap s (AceForwardAction) 28 | nmap S (AceBackwardAction) 29 | 30 | nnoremap Y y$ 31 | 32 | cnoremap 33 | cnoremap 34 | cnoremap 35 | cnoremap 36 | cnoremap 37 | cnoremap 38 | cnoremap 39 | 40 | inoremap 41 | inoremap 42 | inoremap 43 | inoremap 44 | inoremap 45 | inoremap 46 | inoremap 47 | 48 | map 49 | 50 | nmap (NextTab) 51 | nmap (PreviousTab) 52 | 53 | sethandler a:vim 54 | sethandler a:vim 55 | nnoremap h 56 | nnoremap l 57 | nnoremap j 58 | nnoremap k 59 | nnoremap p 60 | nmap (MoveEditorToOppositeTabGroup) 61 | 62 | nmap (Forward) 63 | nmap (Back) 64 | 65 | nmap gh (ShowErrorDescription) 66 | 67 | let mapleader = ' ' 68 | 69 | nmap 1 (GoToTab1) 70 | nmap 2 (GoToTab2) 71 | nmap 3 (GoToTab3) 72 | nmap 4 (GoToTab4) 73 | nmap 5 (GoToTab5) 74 | nmap 6 (GoToTab6) 75 | nmap 7 (GoToTab7) 76 | nmap 8 (GoToTab8) 77 | nmap 9 (GoToTab9) 78 | nmap 0 (GoToTab10) 79 | 80 | nmap :w 81 | nmap / (CommentByLineComment) 82 | vmap / (CommentByLineComment) 83 | nmap . (CloseAllEditorsButActive) 84 | nmap \ (SplitVertically) 85 | nmap - (SplitHorizontally) 86 | nmap = Unsplit) 87 | 88 | nmap d (CloseContent) 89 | nmap e :NERDTreeFocus 90 | nmap f (ReformatCode) 91 | nmap n :nohl 92 | nmap o (OptimizeImports) 93 | nmap r (Refactorings.QuickListPopupAction) 94 | nmap z (ToggleDistractionFreeMode) 95 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/nvim-tree.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "nvim-tree/nvim-tree.lua", 3 | requires = "nvim-tree/nvim-web-devicons", 4 | cmd = { 5 | "NvimTreeOpen", 6 | "NvimTreeClose", 7 | "NvimTreeToggle", 8 | "NvimTreeRefresh", 9 | "NvimTreeFindFile", 10 | "NvimTreeFindFileToggle", 11 | "NvimTreeClipboard", 12 | }, 13 | config = function() 14 | require("nvim-tree").setup({ 15 | auto_reload_on_write = false, 16 | hijack_unnamed_buffer_when_opening = false, 17 | hijack_directories = { 18 | enable = false, 19 | }, 20 | update_focused_file = { 21 | enable = true, 22 | }, 23 | filters = { 24 | custom = { 25 | "^.git$", 26 | "^.venv$", 27 | "^__pycache__$", 28 | "^node_modules$", 29 | }, 30 | }, 31 | git = { 32 | ignore = false, 33 | }, 34 | view = { 35 | signcolumn = "no", 36 | }, 37 | on_attach = function(bufnr) 38 | local api = require("nvim-tree.api") 39 | 40 | local function opts(desc) 41 | return { desc = "nvim-tree: " .. desc, buffer = bufnr, noremap = true, silent = true, nowait = true } 42 | end 43 | 44 | api.config.mappings.default_on_attach(bufnr) 45 | 46 | vim.keymap.del("n", "s", { buffer = bufnr }) 47 | vim.keymap.del("n", "S", { buffer = bufnr }) 48 | 49 | vim.keymap.set("n", "", function() 50 | require("plugins.nvim-tree-utils").launch_telescope("find_files") 51 | end, opts("Telescope Files")) 52 | 53 | vim.keymap.set("n", "", function() 54 | require("plugins.nvim-tree-utils").launch_telescope("live_grep") 55 | end, opts("Telescope Grep")) 56 | end, 57 | actions = { 58 | open_file = { 59 | window_picker = { 60 | exclude = { 61 | filetype = require("filetypes").excludes, 62 | buftype = { "nofile", "terminal", "help" }, 63 | }, 64 | }, 65 | }, 66 | }, 67 | renderer = { 68 | highlight_git = true, 69 | }, 70 | }) 71 | end, 72 | } 73 | -------------------------------------------------------------------------------- /tmux/.tmux.conf: -------------------------------------------------------------------------------- 1 | # General 2 | set -g default-terminal "screen-256color" 3 | set -as terminal-overrides ",xterm*:RGB" 4 | set -as terminal-overrides ",*:Smulx=\E[4::%p1%dm" 5 | set -as terminal-overrides ",*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m" 6 | set -g prefix C-a 7 | 8 | set -g base-index 1 9 | set -g pane-base-index 1 10 | 11 | set -g focus-events on 12 | set -g mode-keys vi 13 | set -g mouse on 14 | set -g renumber-windows on 15 | 16 | set -g set-titles on 17 | set -g set-titles-string "[#S/#W] #T" 18 | 19 | # Theme 20 | if-shell "test -f ~/.tmux/tokyonight.tmux" "source ~/.tmux/tokyonight.tmux" 21 | hl_fg="#7aa2f7" 22 | hl_bg="#16161e" 23 | 24 | # Key Mappings 25 | bind-key -N "Popup" T popup -x "#{popup_pane_right}" -y "#{popup_pane_bottom}" -w "40%" -h "40%" -d "#{pane_current_path}" 26 | 27 | bind-key -N "Next layout" v next-layout 28 | bind-key -T copy-mode-vi v send-keys -X begin-selection 29 | 30 | # Remove confirm-before 31 | bind-key -N "Kill window" & kill-window 32 | bind-key -N "Kill pane" x kill-pane 33 | 34 | # List of plugins 35 | set -g @plugin "tmux-plugins/tpm" 36 | 37 | set -g @plugin "tmux-plugins/tmux-sensible" 38 | set -g @plugin "tmux-plugins/tmux-pain-control" 39 | set -g @plugin "petertriho/tmux-sessionist" 40 | set -g @plugin "tmux-plugins/tmux-yank" 41 | 42 | set -g @plugin "tmux-plugins/tmux-prefix-highlight" 43 | set -g @prefix_highlight_fg $hl_fg 44 | set -g @prefix_highlight_bg $hl_bg 45 | set -g @prefix_highlight_show_copy_mode "on" 46 | set -g @prefix_highlight_copy_mode_attr "fg=$hl_fg,bg=$hl_bg" 47 | set -g @prefix_highlight_show_sync_mode "on" 48 | set -g @prefix_highlight_sync_mode_attr "fg=$hl_fg,bg=$hl_bg" 49 | 50 | set -g @plugin "IngoMeyer441/tmux-easy-motion" 51 | set -g @easy-motion-verbose "true" 52 | set -g @easy-motion-default-motion "bd-f" 53 | 54 | set -g @plugin "fcsonline/tmux-thumbs" 55 | set -g @thumbs-key F 56 | 57 | set -g @plugin "laktak/extrakto" 58 | set -g @extrakto_copy_key "tab" 59 | set -g @extrakto_insert_key "enter" 60 | set -g @extrakto_fzf_layout "reverse" 61 | set -g @extrakto_popup_size "50%,50%" 62 | set -g @extrakto_split_direction "p" 63 | set -g @extrakto_popup_position "200,100" 64 | 65 | set -g @plugin "ofirgall/tmux-window-name" 66 | set -g @tmux_window_name_shells "['fish', 'zsh', 'bash', 'sh', '/usr/local/bin/fish', '/opt/homebrew/bin/fish']" 67 | set -g @tmux_window_dir_programs "['nvim', 'vim', 'vi', 'git', 'pytest']" 68 | 69 | set -g @plugin "roosta/tmux-fuzzback#main" 70 | set -g @fuzzback-bind "/" 71 | set -g @fuzzback-popup 1 72 | set -g @fuzzback-popup-size "80%" 73 | 74 | # Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) 75 | run "~/.tmux/plugins/tpm/tpm" 76 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/nvim-treesitter.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "nvim-treesitter/nvim-treesitter", 3 | opt = true, 4 | run = ":TSUpdateSync", 5 | config = function() 6 | require("nvim-treesitter.configs").setup({ 7 | ensure_installed = { 8 | "bash", 9 | -- "comment", 10 | "markdown_inline", 11 | "prisma", 12 | "regex", 13 | "todotxt", 14 | "tsx", 15 | "vimdoc", 16 | unpack(require("filetypes").treesitter), 17 | }, 18 | sync_install = true, 19 | highlight = { 20 | enable = true, 21 | use_languagetree = true, 22 | disable = function(lang, bufnr) 23 | if vim.api.nvim_buf_line_count(bufnr) > 5000 then 24 | pcall(require("illuminate").pause_buf) 25 | return true 26 | end 27 | 28 | local max_filesize = 100 * 1024 -- 100 KB 29 | local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(bufnr)) 30 | if ok and stats and stats.size > max_filesize then 31 | pcall(require("illuminate").pause_buf) 32 | return true 33 | end 34 | end, 35 | }, 36 | incremental_selection = { 37 | enable = false, 38 | }, 39 | indent = { 40 | enable = false, 41 | disable = { "python" }, 42 | }, 43 | fold = { enable = false }, 44 | }) 45 | require("nvim-treesitter").define_modules({ 46 | fold = { 47 | attach = function() 48 | vim.opt_local.foldmethod = "expr" 49 | vim.opt_local.foldexpr = "nvim_treesitter#foldexpr()" 50 | vim.opt_local.foldminlines = 1 51 | vim.opt_local.foldnestmax = 3 52 | vim.opt_local.foldlevel = 3 53 | vim.opt_local.foldtext = 54 | "substitute(getline(v:foldstart),'\\t',repeat(' ',&tabstop),'g').'...'.trim(getline(v:foldend)).' ('.(v:foldend-v:foldstart+1).' lines)'" 55 | end, 56 | detach = function() end, 57 | is_supported = function() 58 | return true 59 | end, 60 | }, 61 | }) 62 | 63 | local parser_config = require("nvim-treesitter.parsers").get_parser_configs() 64 | parser_config.markdown.filetype_to_parsername = "octo" 65 | end, 66 | } 67 | -------------------------------------------------------------------------------- /fish/.config/fish/config.fish: -------------------------------------------------------------------------------- 1 | switch (uname) 2 | case Linux 3 | set -gx HOMEBREW_PREFIX /home/linuxbrew/.linuxbrew 4 | 5 | if test -e /proc/version && test -n (string match -r "microsoft" (cat "/proc/version")) 6 | set -gx FORGIT_COPY_CMD "win32yank.exe -i" 7 | end 8 | case Darwin 9 | switch (uname -m): 10 | case arm64: 11 | set -gx HOMEBREW_PREFIX /opt/homebrew 12 | case x86_64: 13 | set -gx HOMEBREW_PREFIX /usr/local 14 | end 15 | end 16 | 17 | eval ($HOMEBREW_PREFIX/bin/brew shellenv | grep -v '$PATH') 18 | fish_add_path -g "$HOMEBREW_PREFIX/bin" 19 | fish_add_path -g "$HOMEBREW_PREFIX/sbin" 20 | # test -e $HOMEBREW_PREFIX/opt/asdf/asdf.fish; and source $HOMEBREW_PREFIX/opt/asdf/asdf.fish 21 | fish_add_path -g "$HOMEBREW_PREFIX/opt/asdf/bin" 22 | if test -n "$ASDF_DATA_DIR" 23 | fish_add_path -g "$ASDF_DATA_DIR/shims" 24 | end 25 | fish_add_path -amP "$HOME/.asdf/shims" 26 | fish_add_path -g "$HOME/.local/bin" 27 | 28 | set -gx CC "$HOMEBREW_PREFIX/bin/gcc-13" 29 | set -gx EDITOR nvim 30 | 31 | if command -v starship &>/dev/null 32 | # function starship_transient_prompt_func 33 | # starship module character 34 | # end 35 | 36 | # function starship_transient_rprompt_func 37 | # starship module time 38 | # end 39 | 40 | starship init fish | source 41 | # enable_transience 42 | end 43 | 44 | if status is-interactive 45 | set -gx DIRENV_LOG_FORMAT "" 46 | 47 | set -gx FZF_DEFAULT_OPTS \ 48 | --ansi \ 49 | --exact \ 50 | --border \ 51 | --cycle \ 52 | --reverse \ 53 | "--height '80%'" \ 54 | "--bind 'ctrl-space:toggle-preview'" \ 55 | "--bind 'ctrl-d:preview-half-page-down,ctrl-u:preview-half-page-up'" \ 56 | "--bind 'alt-a:select-all,alt-d:deselect-all'" \ 57 | "--color=dark" \ 58 | "--color=border:7,fg:-1,bg:-1,hl:5,fg+:7,bg+:8,hl+:5" \ 59 | "--color=info:6,prompt:2,pointer:2,marker:3,spinner:1,header:4" 60 | 61 | set -gx FORGIT_FZF_DEFAULT_OPTS "$FZF_DEFAULT_OPTS" 62 | set -gx FORGIT_LOG_GRAPH_ENABLE true 63 | 64 | if type --query fzf_configure_bindings 65 | set -g fzf_fd_opts --hidden --exclude .git 66 | fzf_configure_bindings \ 67 | --directory=\e\cf \ 68 | --git_log=\e\cl \ 69 | --git_status=\e\cs \ 70 | --history=\e\cr \ 71 | --variable=\e\ce 72 | end 73 | 74 | delta_side_by_side 75 | 76 | set -g sponge_delay 10 77 | set -g sponge_purge_only_on_exit true 78 | 79 | if command -v zoxide &>/dev/null 80 | zoxide init fish | source 81 | set -gx _ZO_FZF_OPTS "$FZF_DEFAULT_OPTS --keep-right --exit-0 --select-1 --preview='command exa {2..}' --preview-window=bottom" 82 | end 83 | end 84 | -------------------------------------------------------------------------------- /fish/.config/fish/conf.d/set_abbr.fish: -------------------------------------------------------------------------------- 1 | abbr -a -- aa "arch -arm64" 2 | abbr -a -- af afish 3 | abbr -a -- ax "arch -x86_64" 4 | abbr -a -- d docker 5 | abbr -a -- dc 'docker compose' 6 | abbr -a -- dcd 'docker compose down --remove-orphans' 7 | abbr -a -- dcl 'docker compose logs -f -t --tail=100' 8 | abbr -a -- dcp 'docker compose -p (git_repo_name)' 9 | abbr -a -- dcpd 'docker compose -p (git_repo_name) down --remove-orphans' 10 | abbr -a -- dcpl 'docker compose -p (git_repo_name) logs -f -t --tail=100' 11 | abbr -a -- dcpr 'docker compose -p (git_repo_name) restart' 12 | abbr -a -- dcpu 'docker compose -p (git_repo_name) up -d' 13 | abbr -a -- dcu 'docker compose up -d' 14 | abbr -a -- e 'exa --classify' 15 | abbr -a -- el 'exa --classify --long --header --all --git' 16 | abbr -a -- et 'exa --classify --tree --level=3' 17 | abbr -a -- g git 18 | abbr -a -- gaa 'git add --all' 19 | abbr -a -- gb 'git branch' 20 | abbr -a -- gbrd 'git branch -D' 21 | abbr -a -- gbs 'git_branch_set_upstream' 22 | abbr -a -- gbu 'git branch --unset-upstream' 23 | abbr -a -- gc 'git commit' 24 | abbr -a -- gcam 'git commit -am' 25 | abbr -a -- gcl 'git clone' 26 | abbr -a -- gclb 'git_clone_bare' 27 | abbr -a -- gco 'git checkout' 28 | abbr -a -- gcob 'git checkout -b' 29 | abbr -a -- gdi 'git diff' 30 | abbr -a -- gdt 'git difftool' 31 | abbr -a -- gf 'git fetch' 32 | abbr -a -- gl 'begin; set -lx GIT_EXTERNAL_DIFF difft; git log -p --ext-diff; end' 33 | abbr -a -- gm 'git merge' 34 | abbr -a -- gma 'git merge --abort' 35 | abbr -a -- gmt 'git mergetool' 36 | abbr -a -- gpl 'git pull' 37 | abbr -a -- gplo 'git pull origin' 38 | abbr -a -- gps 'git push' 39 | abbr -a -- gpsf 'git push --force-with-lease' 40 | abbr -a -- gr 'git rebase' 41 | abbr -a -- gra 'git rebase --abort' 42 | abbr -a -- grbc 'git rebase --continue' 43 | abbr -a -- gri 'git rebase --interactive' 44 | abbr -a -- grf 'git reflog' 45 | abbr -a -- grs 'git reset' 46 | abbr -a -- grs1 "git reset --soft HEAD@{1}" 47 | abbr -a -- grsh 'git reset --hard' 48 | abbr -a -- grss 'git reset --soft' 49 | abbr -a -- gs 'git status' 50 | abbr -a -- gst 'git stash' 51 | abbr -a -- gsta 'git stash apply' 52 | abbr -a -- gstp 'git stash pop' 53 | abbr -a -- gsw 'git switch' 54 | abbr -a -- gw 'git worktree' 55 | abbr -a -- gwa 'git worktree add' 56 | abbr -a -- gwl 'git worktree list' 57 | abbr -a -- gwm 'git worktree move' 58 | abbr -a -- gwr 'git worktree remove' 59 | abbr -a -- k kubectl 60 | abbr -a -- ll 'ls -la' 61 | abbr -a -- mk minikube 62 | abbr -a -- pv 'python -m venv .venv' 63 | abbr -a -- rmf 'rm -rf' 64 | abbr -a -- rv 'rm -rf .venv' 65 | abbr -a -- sv 'source .venv/bin/activate.fish' 66 | abbr -a -- t tmux 67 | abbr -a -- ta 'tmux attach-session -t' 68 | abbr -a -- task ./Taskfile 69 | abbr -a -- tf terraform 70 | abbr -a -- tk 'tmux kill-session -t' 71 | abbr -a -- tl 'tmux list-sessions' 72 | abbr -a -- tn 'tmux new-session -s' 73 | abbr -a -- xf xfish 74 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/tokyonight.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "folke/tokyonight.nvim", 3 | config = function() 4 | require("tokyonight").setup({ 5 | style = "night", 6 | sidebars = require("filetypes").sidebars, 7 | on_colors = function(colors) 8 | colors.border_highlight = "#2d3149" 9 | end, 10 | on_highlights = function(hl, colors) 11 | hl.ConflictMarkerBegin = { bg = colors.diff.add } 12 | hl.ConflictMarkerOurs = { bg = colors.diff.add } 13 | hl.ConflictMarkerCommonAncestors = { bg = colors.diff.delete } 14 | hl.ConflictMarkerCommonAncestorsHunk = { bg = colors.diff.delete } 15 | hl.ConflictMarkerSeparator = { bg = colors.diff.change } 16 | hl.ConflictMarkerTheirs = { bg = colors.diff.change } 17 | hl.ConflictMarkerEnd = { bg = colors.diff.change } 18 | 19 | hl.EyelinerPrimary = { fg = colors.blue, style = "underline" } 20 | hl.EyelinerSecondary = { fg = colors.red, style = "underline" } 21 | 22 | hl.Folded = { fg = colors.comment, bg = nil } 23 | 24 | hl.TelescopeNormal = { 25 | bg = colors.bg_dark, 26 | fg = colors.fg_dark, 27 | } 28 | hl.TelescopeBorder = { 29 | bg = colors.bg_dark, 30 | fg = colors.bg_dark, 31 | } 32 | hl.TelescopePromptNormal = { 33 | bg = colors.border_highlight, 34 | } 35 | hl.TelescopePromptBorder = { 36 | bg = colors.border_highlight, 37 | fg = colors.border_highlight, 38 | } 39 | hl.TelescopePromptTitle = { 40 | bg = colors.border_highlight, 41 | fg = colors.fg_dark, 42 | } 43 | hl.TelescopePreviewTitle = { 44 | bg = colors.border_highlight, 45 | fg = colors.fg_dark, 46 | } 47 | hl.TelescopeResultsTitle = { 48 | bg = colors.border_highlight, 49 | fg = colors.fg_dark, 50 | } 51 | end, 52 | }) 53 | 54 | vim.cmd("colorscheme tokyonight") 55 | 56 | vim.fn.sign_define("LightBulbSign", { text = "󰌶", texthl = "DiagnosticSignWarn" }) 57 | 58 | local diagnostic_signs = { 59 | [vim.diagnostic.severity.ERROR] = { "Error", "󰅚 " }, 60 | [vim.diagnostic.severity.WARN] = { "Warn", "󰀪 " }, 61 | [vim.diagnostic.severity.INFO] = { "Info", " " }, 62 | [vim.diagnostic.severity.HINT] = { "Hint", "󰌶 " }, 63 | } 64 | 65 | for _, properties in pairs(diagnostic_signs) do 66 | local hl = "DiagnosticSign" .. properties[1] 67 | vim.fn.sign_define(hl, { text = properties[2], texthl = hl, numhl = "" }) 68 | end 69 | end, 70 | } 71 | -------------------------------------------------------------------------------- /bootstrap/windows/excludeWSL.ps1: -------------------------------------------------------------------------------- 1 | # Modified from https://gist.github.com/dkorobtsov/963f3b90418e51d12aecb1eaf6106958 2 | # PowerShell script to add Windows Defender exclusions for WSL2 performance issues 3 | # 4 | # For context please read this thread: 5 | # https://github.com/microsoft/WSL/issues/8995 6 | # 7 | # How to use? 8 | # - Save the Script: Open a text editor like Notepad and paste the PowerShell script into it. 9 | # - Save the file with a .ps1 extension, for example, Add_WindowsDefender_Exclusions.ps1. 10 | # - Run PowerShell as Administrator: Search for "PowerShell" in the Start menu, right-click on it, and choose "Run as administrator". 11 | # - Navigate to the Script's Location: Use the cd command to navigate to the directory where you saved the .ps1 file. 12 | # - Run the Script: Type .\Add_WindowsDefender_Exclusions.ps1 and press Enter. This will execute the script. 13 | # - You will be prompted to enter your WSL distro (tested only on Ubuntu), username and IDE of choice 14 | 15 | # Check if running as administrator 16 | $isAdmin = ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator") 17 | if (-not $isAdmin) { 18 | Write-Host "This script must be run as Administrator. Exiting." 19 | return 20 | } 21 | 22 | # Define folders to exclude, adjust if needed 23 | $foldersToExclude = @( 24 | "C:\Program Files\Docker", 25 | "\\wsl$\NixOS", 26 | "\\wsl.localhost\NixOS", 27 | "\\wsl$\docker-desktop", 28 | "\\wsl.localhost\docker-desktop" 29 | ) 30 | 31 | # Define file types to exclude, adjust if needed 32 | $fileTypesToExclude = @( 33 | "vhd", 34 | "vhdx" 35 | ) 36 | 37 | # Define processes to exclude, adjust if needed 38 | $processesToExclude = @( 39 | "docker.exe", 40 | "com.docker.*.*", 41 | "Desktop Docker.exe", 42 | "wsl.exe", 43 | "wslhost.exe", 44 | "vmmemWSL" 45 | ) 46 | 47 | # Add Firewall Rule for WSL 48 | # For details please read official documentation: 49 | # https://www.jetbrains.com/help/idea/how-to-use-wsl-development-environment-in-product.html#debugging_system_settings 50 | Write-Host "Adding firewall rules for WSL. This step may take a few minutes..." 51 | try { 52 | New-NetFirewallRule -DisplayName "WSL" -Direction Inbound -InterfaceAlias "vEthernet (WSL)" -Action Allow 53 | Get-NetFirewallProfile -Name Public | Get-NetFirewallRule | Where-Object DisplayName -ILike "$($selectedIDE)*" | Disable-NetFirewallRule 54 | } catch { 55 | Write-Host "Error adding firewall rule: $_" 56 | } 57 | 58 | # Add folder exclusions 59 | Write-Host "Adding folder exclusions..." 60 | foreach ($folder in $foldersToExclude) { 61 | Add-MpPreference -ExclusionPath $folder 62 | } 63 | 64 | # Add file type exclusions 65 | Write-Host "Adding file type exclusions..." 66 | foreach ($fileType in $fileTypesToExclude) { 67 | Add-MpPreference -ExclusionExtension $fileType 68 | } 69 | 70 | # Add process exclusions 71 | Write-Host "Adding process exclusions..." 72 | foreach ($process in $processesToExclude) { 73 | Add-MpPreference -ExclusionProcess $process 74 | } 75 | 76 | Write-Host "Script execution completed." 77 | -------------------------------------------------------------------------------- /todo/.todo/config: -------------------------------------------------------------------------------- 1 | # === EDIT FILE LOCATIONS BELOW === 2 | 3 | # Your todo.txt directory (this should be an absolute path) 4 | #export TODO_DIR="/Users/gina/Documents/todo" 5 | export TODO_DIR=$TODO_DIR 6 | 7 | # Your todo/done/report.txt locations 8 | export TODO_FILE=$TODO_FILE 9 | export DONE_FILE=$DONE_FILE 10 | export REPORT_FILE=$REPORT_FILE 11 | 12 | # You can customize your actions directory location 13 | #export TODO_ACTIONS_DIR="$HOME/.todo.actions.d" 14 | 15 | # == EDIT FILE LOCATIONS ABOVE === 16 | 17 | # === COLOR MAP === 18 | 19 | ## Text coloring and formatting is done by inserting ANSI escape codes. 20 | ## If you have re-mapped your color codes, or use the todo.txt 21 | ## output in another output system (like Conky), you may need to 22 | ## over-ride by uncommenting and editing these defaults. 23 | ## If you change any of these here, you also need to uncomment 24 | ## the defaults in the COLORS section below. Otherwise, todo.txt 25 | ## will still use the defaults! 26 | 27 | # export BLACK='\\033[0;30m' 28 | # export RED='\\033[0;31m' 29 | # export GREEN='\\033[0;32m' 30 | # export BROWN='\\033[0;33m' 31 | # export BLUE='\\033[0;34m' 32 | # export PURPLE='\\033[0;35m' 33 | # export CYAN='\\033[0;36m' 34 | # export LIGHT_GREY='\\033[0;37m' 35 | # export DARK_GREY='\\033[1;30m' 36 | # export LIGHT_RED='\\033[1;31m' 37 | # export LIGHT_GREEN='\\033[1;32m' 38 | # export YELLOW='\\033[1;33m' 39 | # export LIGHT_BLUE='\\033[1;34m' 40 | # export LIGHT_PURPLE='\\033[1;35m' 41 | # export LIGHT_CYAN='\\033[1;36m' 42 | # export WHITE='\\033[1;37m' 43 | # export DEFAULT='\\033[0m' 44 | 45 | # === COLORS === 46 | 47 | ## Uncomment and edit to override these defaults. 48 | ## Reference the constants from the color map above, 49 | ## or use $NONE to disable highlighting. 50 | # 51 | # Priorities can be any upper-case letter. 52 | # A,B,C are highlighted; you can add coloring for more. 53 | # 54 | # export PRI_A=$YELLOW # color for A priority 55 | # export PRI_B=$GREEN # color for B priority 56 | # export PRI_C=$LIGHT_BLUE # color for C priority 57 | # export PRI_D=... # define your own 58 | # export PRI_X=$WHITE # color unless explicitly defined 59 | 60 | # There is highlighting for tasks that have been done, 61 | # but haven't been archived yet. 62 | # 63 | # export COLOR_DONE=$LIGHT_GREY 64 | 65 | # There is highlighting for projects, contexts, dates, and item numbers. 66 | # 67 | # export COLOR_PROJECT=$RED 68 | # export COLOR_CONTEXT=$RED 69 | # export COLOR_DATE=$BLUE 70 | # export COLOR_NUMBER=$LIGHT_GRAY 71 | 72 | # There is highlighting for metadata key:value pairs e.g. 73 | # DUE:2006-08-01 or note:MYNOTE 74 | # 75 | # export COLOR_META=$CYAN 76 | 77 | # === BEHAVIOR === 78 | 79 | ## customize list output 80 | # 81 | # TODOTXT_SORT_COMMAND will filter after line numbers are 82 | # inserted, but before colorization, and before hiding of 83 | # priority, context, and project. 84 | # 85 | # export TODOTXT_SORT_COMMAND='env LC_COLLATE=C sort -f -k2' 86 | 87 | # TODOTXT_FINAL_FILTER will filter list output after colorization, 88 | # priority hiding, context hiding, and project hiding. That is, 89 | # just before the list output is displayed. 90 | # 91 | # export TODOTXT_FINAL_FILTER='cat' 92 | -------------------------------------------------------------------------------- /scripts/.local/bin/install_language_servers: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | 5 | function main { 6 | if ! command -v gopls &> /dev/null; then 7 | brew install gopls 8 | fi 9 | 10 | if ! command -v jdtls &> /dev/null; then 11 | brew install jdtls 12 | fi 13 | 14 | if ! command -v lua-language-server &> /dev/null; then 15 | brew install lua-language-server 16 | fi 17 | 18 | install_marksman_language_server 19 | if ! command -v marksman &> /dev/null; then 20 | brew install marksman 21 | fi 22 | 23 | if ! command -v rust-analyzer &> /dev/null; then 24 | brew install rust-analyzer 25 | fi 26 | 27 | if ! command -v terraform-ls &> /dev/null; then 28 | brew install hashicorp/tap/terraform-ls 29 | fi 30 | 31 | if ! command -v tflint &> /dev/null; then 32 | brew install tflint 33 | fi 34 | 35 | if ! command -v taplo &> /dev/null; then 36 | cargo install --features lsp --locked taplo-cli 37 | fi 38 | 39 | if ! command -v pylyzer &> /dev/null; then 40 | pipx install pylyzer 41 | fi 42 | 43 | if ! command -v ruff-lsp &> /dev/null; then 44 | pipx install ruff-lsp 45 | fi 46 | 47 | if ! command -v bash-language-server &> /dev/null; then 48 | npm install --global bash-language-server 49 | fi 50 | 51 | if ! command -v docker-langserver &> /dev/null; then 52 | npm install --global dockerfile-language-server-nodejs 53 | fi 54 | 55 | if ! command -v emmet-ls &> /dev/null; then 56 | npm install --global emmet-ls 57 | fi 58 | 59 | if ! command -v graphql-lsp &> /dev/null; then 60 | npm install --global graphql-language-service-cli 61 | fi 62 | 63 | if ! command -v svelteserver &> /dev/null; then 64 | npm install --global svelte-language-server 65 | fi 66 | 67 | if ! command -v prisma-language-server &> /dev/null; then 68 | npm install --global @prisma/language-server 69 | fi 70 | 71 | if ! command -v pyright-langserver &> /dev/null; then 72 | npm install --global pyright 73 | fi 74 | 75 | if ! command -v quick-lint-js &> /dev/null; then 76 | npm install --global quick-lint-js 77 | fi 78 | 79 | if ! command -v tailwindcss-language-server &> /dev/null; then 80 | npm install --global @tailwindcss/language-server 81 | fi 82 | 83 | if ! command -v typescript-language-server &> /dev/null; then 84 | npm install --global typescript typescript-language-server 85 | fi 86 | 87 | if ! command -v vscode-css-language-server &> /dev/null \ 88 | || ! command -v vscode-html-language-server &> /dev/null \ 89 | || ! command -v vscode-json-language-server &> /dev/null \ 90 | || ! command -v vscode-eslint-language-server &> /dev/null; then 91 | npm install --global vscode-langservers-extracted 92 | fi 93 | 94 | if ! command -v yaml-language-server &> /dev/null; then 95 | npm install --global yaml-language-server 96 | fi 97 | 98 | if ! command -v ltex-ls &> /dev/null; then 99 | install_ltex_language_server 100 | fi 101 | 102 | asdf reshim 103 | } 104 | 105 | main 106 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/lsp/config.lua: -------------------------------------------------------------------------------- 1 | return { 2 | bashls = {}, 3 | cssls = {}, 4 | dockerls = {}, 5 | emmet_ls = { 6 | filetypes = { 7 | "css", 8 | "html", 9 | "sass", 10 | "scss", 11 | "xml", 12 | }, 13 | }, 14 | eslint = {}, 15 | gopls = {}, 16 | graphql = { 17 | filetypes = { "graphql" }, 18 | }, 19 | html = { 20 | init_options = { 21 | provideFormatter = false, 22 | }, 23 | }, 24 | jdtls = {}, 25 | jsonls = { 26 | init_options = { 27 | provideFormatter = false, 28 | }, 29 | settings = { 30 | json = { 31 | validate = { enable = true }, 32 | schemas = require("schemastore").json.schemas(), 33 | }, 34 | }, 35 | }, 36 | ltex = { 37 | filetypes = { "bib", "markdown", "org", "plaintex", "rst", "rnoweb", "tex" }, 38 | }, 39 | lua_ls = {}, 40 | marksman = {}, 41 | quick_lint_js = { 42 | filetypes = { "javascript", "javascriptreact", "jsx" }, 43 | }, 44 | ruff_lsp = { 45 | init_options = { 46 | args = { 47 | "--config", 48 | vim.fn.expand("$HOME/.config/format-lint/.ruff.toml"), 49 | }, 50 | }, 51 | commands = { 52 | RuffOrganizeImports = { 53 | function() 54 | local params = { 55 | command = "ruff.applyOrganizeImports", 56 | arguments = { vim.api.nvim_buf_get_name(0) }, 57 | } 58 | vim.lsp.buf.execute_command(params) 59 | end, 60 | description = "Organize Imports", 61 | }, 62 | }, 63 | }, 64 | rust_analyzer = {}, 65 | prismals = {}, 66 | -- pylyzer = {}, -- NOTE: disabled until virtualenv imports is supported 67 | pyright = { 68 | python = { 69 | analysis = { 70 | diagnosticMode = "workspace", 71 | useLibraryCodeForTypes = true, 72 | diagnosticSeverityOverrides = { 73 | reportGeneralTypeIssues = "information", 74 | }, 75 | }, 76 | }, 77 | }, 78 | svelte = {}, 79 | tailwindcss = { 80 | settings = { 81 | tailwindCSS = { 82 | experimental = { 83 | classRegex = { 84 | "[\\w]*[cC]lass[\\w]*\\s*[:=]\\s*[{\"'`]+(.*)[\"'`}]+", 85 | }, 86 | }, 87 | }, 88 | }, 89 | }, 90 | taplo = {}, 91 | terraformls = {}, 92 | tflint = {}, 93 | tsserver = { 94 | commands = { 95 | TSServerOrganizeImports = { 96 | function() 97 | local params = { 98 | command = "_typescript.organizeImports", 99 | arguments = { vim.api.nvim_buf_get_name(0) }, 100 | } 101 | vim.lsp.buf.execute_command(params) 102 | end, 103 | description = "Organize Imports", 104 | }, 105 | }, 106 | }, 107 | yamlls = {}, 108 | } 109 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/gitsigns.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "lewis6991/gitsigns.nvim", 3 | requires = "nvim-lua/plenary.nvim", 4 | opt = true, 5 | config = function() 6 | require("gitsigns").setup({ 7 | signs = { 8 | add = { 9 | text = "│", 10 | }, 11 | change = { 12 | text = "│", 13 | }, 14 | delete = { 15 | text = "│", 16 | }, 17 | topdelete = { 18 | text = "│", 19 | }, 20 | changedelete = { 21 | text = "│", 22 | }, 23 | untracked = { 24 | text = "│", 25 | }, 26 | }, 27 | current_line_blame_opts = { 28 | delay = 150, 29 | }, 30 | on_attach = function(bufnr) 31 | local gs = package.loaded.gitsigns 32 | 33 | local function map(mode, l, r, opts) 34 | opts = opts or {} 35 | opts.buffer = bufnr 36 | vim.keymap.set(mode, l, r, opts) 37 | end 38 | 39 | -- Navigation 40 | map("n", "]c", function() 41 | if vim.wo.diff then 42 | return "]c" 43 | end 44 | vim.schedule(function() 45 | gs.next_hunk() 46 | end) 47 | return "" 48 | end, { expr = true, desc = "Next change" }) 49 | 50 | map("n", "[c", function() 51 | if vim.wo.diff then 52 | return "[c" 53 | end 54 | vim.schedule(function() 55 | gs.prev_hunk() 56 | end) 57 | return "" 58 | end, { expr = true, desc = "Previous change" }) 59 | 60 | require("which-key").register({ 61 | ["[c"] = "Previous change", 62 | ["]c"] = "Next change", 63 | }, {}) 64 | 65 | -- Actions 66 | map("n", "hb", function() 67 | gs.blame_line({ full = true }) 68 | end) 69 | map("n", "hD", function() 70 | gs.diffthis("~") 71 | end) 72 | map("n", "hd", gs.diffthis, { desc = "Diff this" }) 73 | map("n", "hp", gs.preview_hunk, { desc = "Preview hunk" }) 74 | map("n", "hR", gs.reset_buffer, { desc = "Reset buffer" }) 75 | map({ "n", "v" }, "hr", ":Gitsigns reset_hunk", { desc = "Reset hunk" }) 76 | map("n", "hS", gs.stage_buffer, { desc = "Stage buffer" }) 77 | map({ "n", "v" }, "hs", ":Gitsigns stage_hunk", { desc = "Stage hunk" }) 78 | map("n", "hu", gs.undo_stage_hunk, { desc = "Undo stage hunk" }) 79 | 80 | -- Text object 81 | map({ "o", "x" }, "ih", ":Gitsigns select_hunk", { desc = "Inner hunk" }) 82 | end, 83 | }) 84 | 85 | require("scrollbar.handlers.gitsigns").setup() 86 | end, 87 | } 88 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/bufferline.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "akinsho/bufferline.nvim", 3 | requires = "nvim-tree/nvim-web-devicons", 4 | after = "tokyonight.nvim", 5 | setup = function() 6 | local set_keymap = vim.api.nvim_set_keymap 7 | local opts = { noremap = true, silent = true } 8 | 9 | set_keymap("n", "", "BufferLineCycleNext", opts) 10 | set_keymap("n", "", "BufferLineCyclePrev", opts) 11 | 12 | set_keymap("n", "1", "lua require('bufferline').go_to_buffer(1)", {}) 13 | set_keymap("n", "2", "lua require('bufferline').go_to_buffer(2)", {}) 14 | set_keymap("n", "3", "lua require('bufferline').go_to_buffer(3)", {}) 15 | set_keymap("n", "4", "lua require('bufferline').go_to_buffer(4)", {}) 16 | set_keymap("n", "5", "lua require('bufferline').go_to_buffer(5)", {}) 17 | set_keymap("n", "6", "lua require('bufferline').go_to_buffer(6)", {}) 18 | set_keymap("n", "7", "lua require('bufferline').go_to_buffer(7)", {}) 19 | set_keymap("n", "8", "lua require('bufferline').go_to_buffer(8)", {}) 20 | set_keymap("n", "9", "lua require('bufferline').go_to_buffer(9)", {}) 21 | set_keymap("n", "0", "lua require('bufferline').go_to_buffer(10)", {}) 22 | end, 23 | config = function() 24 | require("bufferline").setup({ 25 | options = { 26 | numbers = "ordinal", 27 | close_command = "Bwipeout! %d", 28 | right_mouse_command = "Bwipeout! %d", 29 | offsets = { 30 | { 31 | filetype = "dbui", 32 | text = "DATABASE", 33 | highlight = "Directory", 34 | text_align = "center", 35 | }, 36 | { 37 | filetype = "DiffViewFiles", 38 | text = "DIFFVIEW", 39 | highlight = "Directory", 40 | text_align = "center", 41 | }, 42 | { 43 | filetype = "Mundo", 44 | text = "UNDOTREE", 45 | highlight = "Directory", 46 | text_align = "center", 47 | }, 48 | { 49 | filetype = "NvimTree", 50 | text = "EXPLORER", 51 | highlight = "Directory", 52 | text_align = "center", 53 | }, 54 | { 55 | filetype = "Outline", 56 | text = "OUTLINE", 57 | highlight = "Directory", 58 | text_align = "center", 59 | }, 60 | }, 61 | custom_filter = function(buf_number) 62 | return vim.bo[buf_number].filetype ~= "fugitive" 63 | and vim.bo[buf_number].filetype ~= "NeogitStatus" 64 | and vim.bo[buf_number].buftype ~= "terminal" 65 | end, 66 | diagnostics = "nvim_lsp", 67 | diagnostics_indicator = function(count, level, diagnostics_dict, context) 68 | return "(" .. count .. ")" 69 | end, 70 | }, 71 | }) 72 | end, 73 | } 74 | -------------------------------------------------------------------------------- /tmux/.gitmux.conf: -------------------------------------------------------------------------------- 1 | tmux: 2 | # The symbols section defines the symbols printed before specific elements 3 | # of Git status displayed in tmux status string. 4 | symbols: 5 | # current branch name. 6 | branch: "⎇ " 7 | # Git SHA1 hash (in 'detached' state). 8 | hashprefix: ":" 9 | # 'ahead count' when local and remote branch diverged. 10 | ahead: ↑· 11 | # 'behind count' when local and remote branch diverged. 12 | behind: ↓· 13 | # count of files in the staging area. 14 | staged: "● " 15 | # count of files in conflicts. 16 | conflict: "✖ " 17 | # count of modified files. 18 | modified: "✚ " 19 | # count of untracked files. 20 | untracked: "… " 21 | # count of stash entries. 22 | stashed: "⚑ " 23 | # count of inserted lines (stats section). 24 | insertions: Σ 25 | # count of deleted lines (stats section). 26 | deletions: Δ 27 | # Shown when the working tree is clean. 28 | clean: ✔ 29 | 30 | # Styles are tmux format strings used to specify text colors and attributes 31 | # of Git status elements. See the STYLES section of tmux man page. 32 | # https://man7.org/linux/man-pages/man1/tmux.1.html#STYLES. 33 | styles: 34 | # Clear previous style. 35 | clear: "#[fg=default]" 36 | # Special tree state strings such as [rebase], [merge], etc. 37 | state: "#[fg=red,bold]" 38 | # Local branch name 39 | branch: "#[fg=white,bold]" 40 | # Remote branch name 41 | remote: "#[fg=cyan]" 42 | # 'divergence' counts 43 | divergence: "#[fg=yellow]" 44 | # 'staged' count 45 | staged: "#[fg=green,bold]" 46 | # 'conflicts' count 47 | conflict: "#[fg=red,bold]" 48 | # 'modified' count 49 | modified: "#[fg=red,bold]" 50 | # 'untracked' count 51 | untracked: "#[fg=magenta,bold]" 52 | # 'stash' count 53 | stashed: "#[fg=cyan,bold]" 54 | # 'insertions' count 55 | insertions: "#[fg=green]" 56 | # 'deletions' count 57 | deletions: "#[fg=red]" 58 | # 'clean' symbol 59 | clean: "#[fg=green,bold]" 60 | 61 | # The layout section defines what components gitmux shows and the order in 62 | # which they appear on tmux status bar. 63 | # 64 | # Allowed components: 65 | # - branch: local branch name. Examples: `⎇ main`, `⎇ :345e7a0` or `[rebase]` 66 | # - remote-branch: remote branch name, for example: `origin/main`. 67 | # - divergence: divergence between local and remote branch, if any. Example: `↓·2↑·1` 68 | # - remote: alias for `remote-branch` followed by `divergence`, for example: `origin/main ↓·2↑·1` 69 | # - flags: symbols representing the working tree state, for example `✚ 1 ⚑ 1 … 2` 70 | # - stats: insertions/deletions (lines), for example`Σ56 Δ21` 71 | # - some string `foo`: any other character of string is directly shown, for example `foo` or `|` 72 | layout: [branch, divergence, " ", flags] 73 | 74 | # Additional configuration options. 75 | options: 76 | # Maximum displayed length for local and remote branch names. 77 | branch_max_len: 0 78 | # Trim left or right end of the branch (`right` or `left`). 79 | branch_trim: right 80 | # Character indicating whether and where a branch was truncated. 81 | ellipsis: … 82 | # Hides the clean flag 83 | hide_clean: false 84 | -------------------------------------------------------------------------------- /scripts/.local/bin/install_formatters_linters: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | 5 | function main { 6 | if ! command -v dotenv-linter &> /dev/null; then 7 | brew install dotenv-linter 8 | fi 9 | 10 | if ! command -v google-java-format &> /dev/null; then 11 | brew install google-java-format 12 | fi 13 | 14 | if ! command -v hadolint &> /dev/null; then 15 | brew install hadolint 16 | fi 17 | 18 | if ! command -v jq &> /dev/null; then 19 | brew install jq 20 | fi 21 | 22 | if ! command -v shellcheck &> /dev/null; then 23 | brew install shellcheck 24 | fi 25 | 26 | if ! command -v shfmt &> /dev/null; then 27 | brew install shfmt 28 | fi 29 | 30 | if ! command -v selene &> /dev/null; then 31 | brew install selene 32 | fi 33 | 34 | if ! command -v stylua &> /dev/null; then 35 | brew install stylua 36 | fi 37 | 38 | if ! command -v tidy &> /dev/null; then 39 | brew install tidy-html5 40 | fi 41 | 42 | if ! command -v vale &> /dev/null; then 43 | brew install vale 44 | fi 45 | 46 | if ! command -v autoflake &> /dev/null; then 47 | pipx install autoflake 48 | fi 49 | 50 | if ! command -v bandit &> /dev/null; then 51 | pipx install bandit 52 | fi 53 | 54 | if ! command -v black &> /dev/null; then 55 | pipx install black 56 | fi 57 | 58 | if ! command -v codespell &> /dev/null; then 59 | pipx install codespell 60 | fi 61 | 62 | if ! command -v docformatter &> /dev/null; then 63 | pipx install docformatter 64 | fi 65 | 66 | if ! command -v isort &> /dev/null; then 67 | pipx install isort 68 | fi 69 | 70 | if ! command -v gixy &> /dev/null; then 71 | pipx install gixy 72 | pipx inject gixy pyparsing==2.4.7 73 | fi 74 | 75 | if ! command -v pybetter &> /dev/null; then 76 | pipx install pybetter 77 | fi 78 | 79 | if ! command -v refurb &> /dev/null; then 80 | pipx install refurb 81 | fi 82 | 83 | if ! command -v reorder-python-imports &> /dev/null; then 84 | pipx install reorder-python-imports 85 | fi 86 | 87 | if ! command -v ruff &> /dev/null; then 88 | pipx install ruff 89 | fi 90 | 91 | if ! command -v ssort &> /dev/null; then 92 | pipx install ssort 93 | fi 94 | 95 | if ! command -v cspell &> /dev/null; then 96 | npm install --global cspell 97 | fi 98 | 99 | if ! command -v eslint_d &> /dev/null; then 100 | npm install --global eslint_d 101 | fi 102 | 103 | if ! command -v markdownlint &> /dev/null; then 104 | npm install --global markdownlint-cli 105 | fi 106 | 107 | if ! command -v nginxbeautifier &> /dev/null; then 108 | npm install --global nginxbeautifier 109 | fi 110 | 111 | if ! command -v prettier &> /dev/null; then 112 | npm install --global add prettier 113 | fi 114 | 115 | if ! command -v prettierd &> /dev/null; then 116 | npm install --global @fsouza/prettierd 117 | fi 118 | 119 | if ! command -v sort-package-json &> /dev/null; then 120 | npm install --global sort-package-json 121 | fi 122 | 123 | if ! command -v stylelint &> /dev/null; then 124 | npm install --global stylelint stylelint-config-standard 125 | fi 126 | 127 | if ! command -v svgo &> /dev/null; then 128 | npm install --global svgo 129 | fi 130 | 131 | asdf reshim 132 | } 133 | 134 | main 135 | -------------------------------------------------------------------------------- /bootstrap.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -eo pipefail 4 | 5 | PYTHON_VERSION=3.12 6 | NODEJS_VERSION=18 7 | 8 | DOTFILES_DIR=$( 9 | cd "$(dirname "$0")" 10 | pwd -P 11 | ) 12 | OS=$(uname -s | tr "[:upper:]" "[:lower:]") 13 | ARCH=$(uname -m) 14 | 15 | function install_homebrew { 16 | case "$OS" in 17 | linux) 18 | # assume debian/ubuntu 19 | sudo apt update 20 | sudo apt install procps curl file git 21 | sudo apt install build-essential libssl-dev zlib1g-dev \ 22 | libbz2-dev libreadline-dev libsqlite3-dev curl llvm \ 23 | libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev 24 | HOMEBREW_PREFIX="/home/linuxbrew/.linuxbrew" 25 | ;; 26 | darwin) 27 | case "$ARCH" in 28 | arm64) 29 | HOMEBREW_PREFIX=/opt/homebrew 30 | ;; 31 | x86_64) 32 | HOMEBREW_PREFIX=/usr/local 33 | ;; 34 | esac 35 | ;; 36 | *) 37 | echo "Homebrew does not support $OS" 38 | exit 1 39 | ;; 40 | esac 41 | 42 | /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" 43 | 44 | eval "$("$HOMEBREW_PREFIX/bin/brew" shellenv)" 45 | export CC="$HOMEBREW_PREFIX/bin/gcc-11" 46 | 47 | brew bundle install --file "$DOTFILES_DIR/bootstrap/homebrew/Brewfile" 48 | 49 | if [[ $OS == "darwin" ]]; then 50 | brew bundle install --file "$DOTFILES_DIR/bootstrap/homebrew/Brewfile-macos" 51 | fi 52 | } 53 | 54 | function install_asdf { 55 | brew install asdf 56 | 57 | asdf plugin add direnv 58 | asdf direnv setup --shell fish --version latest 59 | asdf global direnv latest 60 | 61 | asdf plugin add golang 62 | asdf install golang latest 63 | asdf global golang latest 64 | 65 | asdf plugin add nodejs 66 | asdf install nodejs latest:$NODEJS_VERSION 67 | asdf global nodejs latest:$NODEJS_VERSION 68 | 69 | asdf plugin add python 70 | asdf install python latest:$PYTHON_VERSION 71 | asdf global python latest:$PYTHON_VERSION 72 | 73 | asdf plugin add rust 74 | asdf install rust stable 75 | asdf global rust stable 76 | 77 | if [[ $OS == "linux" ]]; then 78 | cargo install cargo-update --force --features vendored-openssl --features vendored-libgit2 79 | fi 80 | 81 | asdf reshim 82 | } 83 | 84 | function install_plugin_managers { 85 | # Fish - fisher 86 | fish -c "curl -sL https://git.io/fisher | source && fisher install jorgebucaran/fisher" 87 | 88 | # Neovim - packer 89 | git clone --depth 1 https://github.com/wbthomason/packer.nvim ~/.local/share/nvim/site/pack/packer/start/packer.nvim 90 | 91 | # Tmux - tpm 92 | git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm 93 | } 94 | 95 | function setup_misc { 96 | FISH_PATH=$(which fish) 97 | echo "$FISH_PATH" | sudo tee -a /etc/shells 98 | chsh -s "$FISH_PATH" 99 | 100 | gh auth login 101 | gh extension install dlvhdr/gh-dash 102 | 103 | rm ~/.config/gh/config.yml 104 | 105 | (cd "$DOTFILES_DIR" && git config remote.origin.url git@github.com:petertriho/dotfiles.git) 106 | 107 | (cd "$DOTFILES_DIR" && stow --no-folding -t ~ */) 108 | } 109 | 110 | function main { 111 | install_homebrew 112 | setup_misc 113 | 114 | install_asdf 115 | install_plugin_managers 116 | } 117 | 118 | main 119 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/config/telescope.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "nvim-telescope/telescope.nvim", 3 | requires = { 4 | "nvim-lua/plenary.nvim", 5 | }, 6 | cmd = "Telescope", 7 | module = "telescope", 8 | config = function() 9 | local telescope = require("telescope") 10 | local actions = require("telescope.actions") 11 | 12 | telescope.setup({ 13 | defaults = { 14 | vimgrep_arguments = { 15 | "rg", 16 | "--color=never", 17 | "--no-heading", 18 | "--with-filename", 19 | "--line-number", 20 | "--column", 21 | "--smart-case", 22 | "--hidden", 23 | }, 24 | prompt_prefix = "  ", 25 | selection_caret = " ", 26 | mappings = { 27 | i = { 28 | [""] = actions.move_selection_next, 29 | [""] = actions.move_selection_previous, 30 | }, 31 | n = { 32 | [""] = actions.move_selection_next, 33 | [""] = actions.move_selection_previous, 34 | }, 35 | }, 36 | history = false, 37 | file_ignore_patterns = { "%.git/*" }, 38 | sorting_strategy = "ascending", 39 | layout_strategy = "flex", 40 | layout_config = { 41 | horizontal = { preview_width = 0.6, prompt_position = "top" }, 42 | vertical = { mirror = true }, 43 | }, 44 | }, 45 | extensions = { 46 | fzf = { 47 | fuzzy = true, 48 | override_generic_sorter = false, 49 | override_file_sorter = true, 50 | case_mode = "smart_case", 51 | }, 52 | }, 53 | pickers = { 54 | file_browser = { 55 | hidden = true, 56 | }, 57 | find_files = { 58 | hidden = true, 59 | attach_mappings = function() 60 | require("telescope.actions.set").select:enhance({ 61 | post = function() 62 | vim.cmd(":normal! zx") 63 | end, 64 | }) 65 | return true 66 | end, 67 | }, 68 | }, 69 | }) 70 | 71 | telescope.load_extension("fzf") 72 | telescope.load_extension("yaml_schema") 73 | 74 | local commands = require("github-notifications.telescope.commands") 75 | commands.open_in_browser = function(notification) 76 | local url = string 77 | .gsub(notification.value.subject.url, "api%.github%.com/repos", "github.com") 78 | :gsub("/pulls/(%d+)", "/pull/%1") 79 | 80 | if vim.fn.has("mac") == 1 then 81 | vim.cmd('call jobstart(["open", expand("' .. url .. '")], {"detach": v:true})') 82 | elseif vim.fn.has("unix") == 1 then 83 | local open_cmd = "xdg-open" 84 | 85 | if vim.fn.executable("wslview") == 1 then 86 | open_cmd = "wslview" 87 | end 88 | 89 | vim.cmd('call jobstart(["' .. open_cmd .. '", expand("' .. url .. '")], {"detach": v:true})') 90 | else 91 | vim.notify("gx not supported on this OS", vim.log.levels.ERROR) 92 | end 93 | end 94 | end, 95 | } 96 | -------------------------------------------------------------------------------- /wezterm/.config/wezterm/wezterm.lua: -------------------------------------------------------------------------------- 1 | local wezterm = require("wezterm") 2 | 3 | local leader_key = "b" 4 | 5 | local config = { 6 | color_scheme = "tokyonight", 7 | bold_brightens_ansi_colors = true, 8 | -- harfbuzz_features = { "calt=0", "clig=0", "liga=0" }, 9 | window_close_confirmation = "NeverPrompt", 10 | hide_tab_bar_if_only_one_tab = true, 11 | leader = { key = leader_key, mods = "CTRL" }, 12 | keys = { 13 | { mods = "LEADER|CTRL", key = leader_key, action = { SendKey = { mods = "CTRL", key = leader_key } } }, 14 | { mods = "LEADER", key = leader_key, action = "ActivateLastTab" }, 15 | { 16 | mods = "LEADER", 17 | key = "\\", 18 | action = wezterm.action({ SplitHorizontal = { domain = "CurrentPaneDomain" } }), 19 | }, 20 | { mods = "LEADER", key = "-", action = wezterm.action({ SplitVertical = { domain = "CurrentPaneDomain" } }) }, 21 | { mods = "LEADER", key = "[", action = "ActivateCopyMode" }, 22 | { mods = "LEADER", key = "]", action = wezterm.action.PasteFrom("Clipboard") }, 23 | { mods = "LEADER", key = "1", action = wezterm.action({ ActivateTab = 0 }) }, 24 | { mods = "LEADER", key = "2", action = wezterm.action({ ActivateTab = 1 }) }, 25 | { mods = "LEADER", key = "3", action = wezterm.action({ ActivateTab = 2 }) }, 26 | { mods = "LEADER", key = "4", action = wezterm.action({ ActivateTab = 3 }) }, 27 | { mods = "LEADER", key = "5", action = wezterm.action({ ActivateTab = 4 }) }, 28 | { mods = "LEADER", key = "6", action = wezterm.action({ ActivateTab = 5 }) }, 29 | { mods = "LEADER", key = "7", action = wezterm.action({ ActivateTab = 6 }) }, 30 | { mods = "LEADER", key = "8", action = wezterm.action({ ActivateTab = 7 }) }, 31 | { mods = "LEADER", key = "9", action = wezterm.action({ ActivateTab = 8 }) }, 32 | { mods = "LEADER", key = "Tab", action = "QuickSelect" }, 33 | { mods = "LEADER", key = "a", action = "ShowTabNavigator" }, 34 | { mods = "LEADER", key = "c", action = wezterm.action({ SpawnTab = "CurrentPaneDomain" }) }, 35 | { mods = "LEADER", key = "f", action = "ToggleFullScreen" }, 36 | { mods = "LEADER", key = "h", action = wezterm.action({ ActivatePaneDirection = "Left" }) }, 37 | { mods = "LEADER", key = "j", action = wezterm.action({ ActivatePaneDirection = "Down" }) }, 38 | { mods = "LEADER", key = "k", action = wezterm.action({ ActivatePaneDirection = "Up" }) }, 39 | { mods = "LEADER", key = "l", action = wezterm.action({ ActivatePaneDirection = "Right" }) }, 40 | { mods = "LEADER", key = "n", action = wezterm.action({ ActivateTabRelative = 1 }) }, 41 | { mods = "LEADER", key = "p", action = wezterm.action({ ActivateTabRelative = -1 }) }, 42 | { mods = "LEADER", key = "x", action = wezterm.action({ CloseCurrentPane = { confirm = false } }) }, 43 | { mods = "LEADER", key = "z", action = "TogglePaneZoomState" }, 44 | { mods = "LEADER|SHIFT", key = "&", action = wezterm.action({ CloseCurrentTab = { confirm = false } }) }, 45 | { mods = "LEADER|SHIFT", key = "H", action = wezterm.action({ AdjustPaneSize = { "Left", 5 } }) }, 46 | { mods = "LEADER|SHIFT", key = "J", action = wezterm.action({ AdjustPaneSize = { "Down", 5 } }) }, 47 | { mods = "LEADER|SHIFT", key = "K", action = wezterm.action({ AdjustPaneSize = { "Up", 5 } }) }, 48 | { mods = "LEADER|SHIFT", key = "L", action = wezterm.action({ AdjustPaneSize = { "Right", 5 } }) }, 49 | }, 50 | colors = { 51 | tab_bar = { 52 | background = "#0E0E14", 53 | active_tab = { 54 | bg_color = "#1A1B26", 55 | fg_color = "#C0CAF5", 56 | }, 57 | inactive_tab = { 58 | bg_color = "#13141C", 59 | fg_color = "#565F89", 60 | }, 61 | inactive_tab_hover = { 62 | bg_color = "#1A1B26", 63 | fg_color = "#C0CAF5", 64 | }, 65 | new_tab = { 66 | bg_color = "#13141C", 67 | fg_color = "#565F89", 68 | }, 69 | new_tab_hover = { 70 | bg_color = "#1A1B26", 71 | fg_color = "#C0CAF5", 72 | }, 73 | }, 74 | }, 75 | inactive_pane_hsb = { 76 | saturation = 1.0, 77 | brightness = 1.0, 78 | }, 79 | window_padding = { 80 | left = 0, 81 | right = 0, 82 | top = 0, 83 | bottom = 0, 84 | }, 85 | } 86 | 87 | wezterm.on("format-tab-title", function(tab) 88 | if tab.is_active then 89 | return { 90 | { Text = "▎" .. tab.active_pane.title }, 91 | } 92 | end 93 | 94 | return { 95 | { Text = " " .. tab.active_pane.title }, 96 | } 97 | end) 98 | 99 | if wezterm.target_triple == "x86_64-pc-windows-msvc" then 100 | config.default_domain = "WSL:NixOS" 101 | config.font = wezterm.font("JetBrainsMono Nerd Font") 102 | config.font_size = 12 103 | config.allow_win32_input_mode = false 104 | else 105 | config.font = wezterm.font("JetBrainsMono Nerd Font Mono") 106 | config.font_size = 14 107 | end 108 | 109 | return config 110 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/lsp/init.lua: -------------------------------------------------------------------------------- 1 | -- Setup 2 | local function on_attach(client, bufnr) 3 | require("lsp.format").on_attach(client, bufnr) 4 | 5 | local opts = { noremap = true, silent = true } 6 | 7 | local function buf_set_keymap(mode, lhs, rhs) 8 | vim.api.nvim_buf_set_keymap(bufnr, mode, lhs, rhs, opts) 9 | end 10 | 11 | local function buf_set_option(...) 12 | vim.api.nvim_buf_set_option(bufnr, ...) 13 | end 14 | 15 | buf_set_option("omnifunc", "v:lua.vim.lsp.omnifunc") 16 | 17 | if client.name == "pyright" then 18 | buf_set_keymap("n", "o", "PyrightOrganizeImports") 19 | elseif client.name == "ruff_lsp" then 20 | buf_set_keymap("n", "o", "RuffOrganizeImports") 21 | elseif client.name == "tsserver" then 22 | buf_set_keymap("n", "o", "TSServerOrganizeImports") 23 | end 24 | 25 | buf_set_keymap( 26 | "n", 27 | "gh", 28 | "lua vim.diagnostic.open_float(0, { scope = 'line', source = 'always', border = 'rounded' })" 29 | ) 30 | buf_set_keymap("n", "[d", "lua vim.diagnostic.goto_prev()") 31 | buf_set_keymap("n", "]d", "lua vim.diagnostic.goto_next()") 32 | 33 | if client.server_capabilities.codeActionProvider then 34 | vim.api.nvim_create_augroup("lsp_code_action", {}) 35 | vim.api.nvim_create_autocmd({ "CursorHold", "CursorHoldI" }, { 36 | group = "lsp_code_action", 37 | callback = function() 38 | require("nvim-lightbulb").update_lightbulb() 39 | end, 40 | buffer = bufnr, 41 | desc = "LSP code action lightbulb", 42 | }) 43 | end 44 | 45 | if client.server_capabilities.definitionProvider then 46 | buf_set_keymap("n", "gd", "lua vim.lsp.buf.definition()") 47 | end 48 | 49 | if client.server_capabilities.declarationProvider then 50 | buf_set_keymap("n", "gl", "lua vim.lsp.buf.declaration()") 51 | end 52 | 53 | if client.server_capabilities.documentSymbolProvider then 54 | require("nvim-navic").attach(client, bufnr) 55 | end 56 | 57 | if client.server_capabilities.hoverProvider then 58 | buf_set_keymap("n", "K", "lua vim.lsp.buf.hover()") 59 | end 60 | 61 | if client.server_capabilities.implementationProvider then 62 | buf_set_keymap("n", "gm", "lua vim.lsp.buf.implementation()") 63 | end 64 | 65 | if client.server_capabilities.renameProvider then 66 | buf_set_keymap("n", "ar", "lua vim.lsp.buf.rename()") 67 | end 68 | 69 | if client.server_capabilities.referencesProvider then 70 | buf_set_keymap("n", "gr", "lua vim.lsp.buf.references()") 71 | end 72 | 73 | if client.server_capabilities.signatureHelpProvider then 74 | buf_set_keymap("n", "gs", "lua vim.lsp.buf.signature_help()") 75 | end 76 | 77 | if client.server_capabilities.typeDefinitionProvider then 78 | buf_set_keymap("n", "gy", "lua vim.lsp.buf.type_definition()") 79 | end 80 | end 81 | 82 | local function make_base_config() 83 | local capabilities = vim.lsp.protocol.make_client_capabilities() 84 | local completionItem = capabilities.textDocument.completion.completionItem 85 | completionItem.snippetSupport = true 86 | completionItem.preselectSupport = true 87 | completionItem.insertReplaceSupport = true 88 | completionItem.labelDetailsSupport = true 89 | completionItem.deprecatedSupport = true 90 | completionItem.commitCharactersSupport = true 91 | completionItem.tagSupport = { valueSet = { 1 } } 92 | completionItem.resolveSupport = { 93 | properties = { 94 | "documentation", 95 | "detail", 96 | "additionalTextEdits", 97 | }, 98 | } 99 | capabilities.textDocument.colorProvider = { dynamicRegistration = false } 100 | return { 101 | capabilities = capabilities, 102 | on_attach = on_attach, 103 | flags = { allow_incremental_sync = true, debounce_text_changes = 300 }, 104 | } 105 | end 106 | 107 | local function setup() 108 | vim.diagnostic.config({ 109 | severity_sort = true, 110 | }) 111 | 112 | vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { border = "rounded" }) 113 | vim.lsp.handlers["textDocument/signatureHelp"] = 114 | vim.lsp.with(vim.lsp.handlers.signature_help, { border = "rounded" }) 115 | 116 | vim.api.nvim_create_autocmd("LspAttach", { 117 | callback = function(args) 118 | vim.bo[args.buf].formatexpr = nil 119 | end, 120 | }) 121 | 122 | local lspconfig = require("lspconfig") 123 | local overrides = require("lsp.config") 124 | 125 | local base_config = make_base_config() 126 | 127 | for server, override in pairs(overrides) do 128 | local config = vim.tbl_extend("force", base_config, override or {}) 129 | 130 | if server == "sumneko_lua" then 131 | require("neodev").setup() 132 | elseif server == "yamlls" then 133 | config = require("yaml-companion").setup({ lspconfig = config }) 134 | end 135 | 136 | lspconfig[server].setup(config) 137 | end 138 | 139 | require("lsp.null-ls").setup(base_config) 140 | end 141 | 142 | setup() 143 | -------------------------------------------------------------------------------- /scripts/.local/bin/update: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | 5 | function tool:apt { 6 | if command -v apt &> /dev/null; then 7 | echo "Updating apt packages ..." 8 | sudo apt update 9 | sudo apt -y upgrade 10 | sudo apt autoremove 11 | sudo apt clean 12 | fi 13 | } 14 | 15 | function tool:asdf { 16 | if command -v asdf &> /dev/null; then 17 | echo "Updating asdf & plugins ..." 18 | asdf update || true 19 | asdf plugin update --all 20 | 21 | if [ "$(uname -m)" == "arm64" ]; then 22 | xasdf update || true 23 | xasdf plugin update --all 24 | fi 25 | fi 26 | } 27 | 28 | function tool:brew { 29 | if command -v brew &> /dev/null; then 30 | echo "Updating homebrew packages ..." 31 | brew update 32 | brew upgrade 33 | 34 | if [ "$(uname -m)" == "arm64" ]; then 35 | xbrew update 36 | xbrew upgrade 37 | fi 38 | fi 39 | } 40 | 41 | function tool:dotfiles { 42 | if [ -d "$HOME/.dotfiles" ]; then 43 | echo "Updating dotfiles ..." 44 | ( 45 | cd "$HOME/.dotfiles" \ 46 | && (git stash || true) \ 47 | && git pull \ 48 | && stow --no-folding -t ~ */ \ 49 | && (git stash pop || true) 50 | ) 51 | find -L "$HOME/.config" -type l -exec rm -i {} \; 52 | find -L "$HOME/.local/bin" -type l -exec rm -i {} \; 53 | fi 54 | } 55 | 56 | function tool:fish { 57 | if command -v fish &> /dev/null && [ -f "$HOME/.config/fish/fish_plugins" ]; then 58 | echo "Updating fish plugins ..." 59 | fish -c "fisher update" 60 | fish -c "set_abbr" 61 | fish -c "set_theme" 62 | fish -c "set_nextcloud" 63 | fi 64 | } 65 | 66 | function tool:misc { 67 | echo "Installing language servers ..." 68 | install_language_servers 69 | 70 | echo "Installing formatters and linters ..." 71 | install_formatters_linters 72 | 73 | echo "Updating ltex language server ..." 74 | install_ltex_language_server 75 | 76 | echo "Updating vale styles ..." 77 | install_vale_style_microsoft 78 | } 79 | 80 | function tool:npm { 81 | echo "Updating npm global packages ..." 82 | npm update --global 83 | } 84 | 85 | function tool:nvim { 86 | if command -v nvim &> /dev/null; then 87 | if command -v brew &> /dev/null && [ -n "$(brew list | grep neovim)" ]; then 88 | echo "Updating neovim ..." 89 | brew upgrade neovim --fetch-head 90 | fi 91 | 92 | echo "Updating neovim plugins ..." 93 | nvim \ 94 | +TSUpdateSync \ 95 | +qall 96 | 97 | nvim \ 98 | +"autocmd User PackerComplete sleep 100m | write! /tmp/packer-sync-result.txt | quitall" \ 99 | +PackerSync 100 | 101 | cat /tmp/packer-sync-result.txt 102 | fi 103 | } 104 | 105 | function tool:pipx { 106 | if command -v pipx &> /dev/null; then 107 | echo "Updating pipx packages ..." 108 | pipx upgrade-all 109 | pipx install poetry==1.1.14 --force 110 | fi 111 | } 112 | 113 | function tool:rust { 114 | if command -v rustup &> /dev/null; then 115 | echo "Updating rust ..." 116 | rustup update 117 | fi 118 | 119 | if command -v cargo &> /dev/null; then 120 | echo "Updating cargo packages ..." 121 | if ! cargo install --list | grep -q cargo-update; then 122 | cargo install cargo-update 123 | fi 124 | 125 | PREV_CC=$CC 126 | 127 | if [ "$(uname)" == "Darwin" ]; then 128 | unset CC 129 | fi 130 | 131 | cargo install-update --all 132 | 133 | export CC=$PREV_CC 134 | fi 135 | } 136 | 137 | function tool:scoop { 138 | if command -v scoop &> /dev/null; then 139 | echo "Updating scoop packages ..." 140 | pwsh="powershell.exe -NoProfile -NoLogo -NonInteractive cd ~;" 141 | $pwsh "scoop update *" 142 | fi 143 | } 144 | 145 | function tool:tmux { 146 | tmux_dir="$HOME/.tmux" 147 | tpm_bin_dir="$tmux_dir/plugins/tpm/bin" 148 | 149 | if [ -d "$tpm_bin_dir" ]; then 150 | echo "Updating tmux plugins ..." 151 | "$tpm_bin_dir/clean_plugins" 152 | "$tpm_bin_dir/install_plugins" 153 | "$tpm_bin_dir/update_plugins" all 154 | fi 155 | 156 | if [ -d "$tmux_dir/plugins/tmux-thumbs" ]; then 157 | echo "Building tmux-thumbs ..." 158 | (cd "$tmux_dir/plugins/tmux-thumbs" \ 159 | && cargo build --release --target-dir=target) 160 | fi 161 | } 162 | 163 | function tool:win32yank { 164 | echo "Updating win32yank ..." 165 | install_win32yank 166 | } 167 | 168 | function tool:winget { 169 | if command -v winget.exe &> /dev/null; then 170 | echo "Updating winget packages ..." 171 | pwsh="powershell.exe -NoProfile -NoLogo -NonInteractive cd ~;" 172 | $pwsh "winget upgrade --all" 173 | fi 174 | } 175 | 176 | function tool:all { 177 | tool:dotfiles 178 | 179 | if [ "$(uname)" == "Linux" ]; then 180 | tool:apt 181 | 182 | if [ -e "/proc/version" ] && grep -q "microsoft" "/proc/version"; then 183 | tool:scoop 184 | tool:win32yank 185 | # tool:winget 186 | fi 187 | fi 188 | 189 | tool:brew 190 | tool:asdf 191 | tool:npm 192 | tool:pipx 193 | # tool:rust 194 | 195 | tool:misc 196 | 197 | tool:fish 198 | tool:nvim 199 | tool:tmux 200 | 201 | exec "$SHELL" 202 | } 203 | 204 | function tool:list { 205 | compgen -A function | sed -rn 's/tool:(.*)/\1/p' | cat 206 | } 207 | 208 | function tool:help { 209 | printf "Usage: %s [TOOL] [ARGS]\n\nTools:\n" "$0" 210 | 211 | compgen -A function | sed -rn 's/tool:(.*)/\1/p' | cat -n 212 | } 213 | 214 | "tool:${@:-all}" 215 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/options.lua: -------------------------------------------------------------------------------- 1 | -- disable plugins 2 | local g = vim.g 3 | 4 | g.loaded_gzip = 1 5 | g.loaded_tar = 1 6 | g.loaded_tarPlugin = 1 7 | g.loaded_zip = 1 8 | g.loaded_zipPlugin = 1 9 | g.loaded_getscript = 1 10 | g.loaded_getscriptPlugin = 1 11 | g.loaded_vimball = 1 12 | g.loaded_vimballPlugin = 1 13 | g.loaded_matchit = 1 14 | g.loaded_matchparen = 1 15 | g.loaded_2html_plugin = 1 16 | g.loaded_logiPat = 1 17 | g.loaded_rrhelper = 1 18 | g.loaded_netrw = 1 19 | g.loaded_netrwPlugin = 1 20 | g.loaded_netrwSettings = 1 21 | g.loaded_netrwFileHandlers = 1 22 | 23 | vim.filetype.add({ 24 | extension = { 25 | prisma = "prisma", 26 | sh = "sh", 27 | }, 28 | filename = { 29 | [".prettierrc"] = "jsonc", 30 | ["todo.txt"] = "todotxt", 31 | ["yarn.lock"] = "txt", 32 | }, 33 | pattern = { 34 | [".*%.env.*"] = "conf", 35 | }, 36 | }) 37 | 38 | -- options 39 | local o = vim.o 40 | local opt = vim.opt 41 | opt.clipboard = "unnamedplus" 42 | -- opt.cmdheight = 0 43 | opt.colorcolumn = "80" 44 | opt.cursorline = true 45 | -- opt.diffopt:append("algorithm:histogram,hiddenoff,linematch:60") 46 | opt.diffopt:append("algorithm:histogram,hiddenoff") 47 | opt.expandtab = true 48 | opt.fillchars = { 49 | diff = "╱", 50 | eob = " ", 51 | fold = " ", 52 | msgsep = "‾", 53 | vert = "│", 54 | } 55 | opt.ignorecase = true 56 | opt.lazyredraw = true 57 | opt.list = true 58 | opt.listchars = { 59 | eol = "¬", 60 | extends = "›", 61 | nbsp = "¤", 62 | precedes = "‹", 63 | space = "·", 64 | tab = "» ", 65 | trail = "·", 66 | } 67 | opt.mouse = "a" 68 | opt.number = true 69 | opt.path:append("**") 70 | opt.pumheight = 10 71 | -- opt.relativenumber = true 72 | opt.scrolloff = 5 73 | -- opt.shada = "!,'0,f0,<50,s10,h" 74 | opt.shell = "bash" 75 | opt.shiftwidth = 4 76 | opt.shortmess:append("c") 77 | opt.showmode = false 78 | opt.signcolumn = "yes" 79 | opt.smartcase = true 80 | opt.smartindent = true 81 | opt.softtabstop = 4 82 | opt.splitbelow = true 83 | opt.splitright = true 84 | opt.swapfile = false 85 | opt.tabstop = 4 86 | opt.termguicolors = true 87 | opt.timeoutlen = 300 88 | opt.title = true 89 | opt.titlestring = "nvim %t %M" 90 | opt.ttimeout = false 91 | opt.ttimeoutlen = 0 92 | opt.updatetime = 100 93 | opt.wrap = false 94 | opt.wildignore = { 95 | "*.o", 96 | "*.pyc", 97 | "*/.git/*", 98 | "*/.venv/*", 99 | "*/__pycache__/*", 100 | "*/cache/*", 101 | "*/node_modules/*", 102 | "*/tmp/*", 103 | } 104 | 105 | if vim.fn.executable("win32yank.exe") == 1 then 106 | vim.g.clipboard = { 107 | name = "win32yank", 108 | copy = { 109 | ["+"] = "win32yank.exe -i --crlf", 110 | ["*"] = "win32yank.exe -i --crlf", 111 | }, 112 | paste = { 113 | ["+"] = "win32yank.exe -o --lf", 114 | ["*"] = "win32yank.exe -o --lf", 115 | }, 116 | ["cache_enabled"] = 0, 117 | } 118 | end 119 | 120 | if vim.fn.executable("rg") == 1 then 121 | opt.grepprg = "rg --vimgrep --color=never --no-heading --smart-case --hidden" 122 | opt.grepformat = "%f:%l:%c:%m,%f:%l:%m" 123 | end 124 | 125 | local undodir = vim.fn.expand("~/.undodir") 126 | 127 | if vim.fn.isdirectory(undodir) ~= 1 then 128 | vim.fn.mkdir(undodir, "p", "0700") 129 | end 130 | 131 | opt.undodir = undodir 132 | opt.undofile = true 133 | 134 | local function mkdir() 135 | local dir = vim.fn.expand(":p:h") 136 | 137 | if vim.fn.isdirectory(dir) == 1 then 138 | vim.fn.mkdir(dir, "p") 139 | end 140 | end 141 | 142 | local function python3_host_prog_job(cmd) 143 | vim.fn.jobstart(cmd, { 144 | on_stdout = function(_, data, _) 145 | g.python3_host_prog = string.gsub(data[1], "\n", "") 146 | end, 147 | }) 148 | end 149 | 150 | local function set_python3_host_prog() 151 | if vim.fn.exists("$VIRTUAL_ENV") == 1 then 152 | python3_host_prog_job("which -a python3 | head -n2 | tail -n1") 153 | else 154 | python3_host_prog_job("which python3") 155 | end 156 | end 157 | 158 | local function set_augroups(groups) 159 | for name, commands in pairs(groups) do 160 | vim.api.nvim_create_augroup(name, {}) 161 | for _, command in pairs(commands) do 162 | command[2].group = name 163 | vim.api.nvim_create_autocmd(unpack(command)) 164 | end 165 | end 166 | end 167 | 168 | set_augroups({ 169 | _general = { 170 | -- { 171 | -- "TextYankPost", 172 | -- { 173 | -- pattern = "*", 174 | -- callback = function() 175 | -- vim.highlight.on_yank({ higroup = "Search", timeout = 200 }) 176 | -- end, 177 | -- desc = "Highlight on yank", 178 | -- }, 179 | -- }, 180 | { 181 | { "FocusLost", "InsertEnter", "WinLeave" }, 182 | { 183 | callback = function() 184 | if o.number then 185 | opt.relativenumber = false 186 | end 187 | end, 188 | desc = "Turn off relative number", 189 | }, 190 | }, 191 | { 192 | { "FocusGained", "InsertLeave", "WinEnter" }, 193 | { 194 | callback = function() 195 | if o.number then 196 | opt.relativenumber = true 197 | end 198 | end, 199 | desc = "Turn on relative number", 200 | }, 201 | }, 202 | { 203 | "BufWritePre", 204 | { pattern = "*", callback = mkdir, desc = "Make directory for file if it does not exist" }, 205 | }, 206 | { 207 | "User", 208 | { 209 | pattern = "PythonHostProg", 210 | callback = set_python3_host_prog, 211 | desc = "Load python host prog when required", 212 | }, 213 | }, 214 | }, 215 | _targets = { 216 | { 217 | "User", 218 | { 219 | pattern = "targets#mappings#user", 220 | command = "call targets#mappings#extend({'a': {'argument': [{'o': '[{([]', 'c': '[])}]', 's': ','}]}})", 221 | desc = "Additional ia/aa text objects", 222 | }, 223 | }, 224 | }, 225 | }) 226 | -------------------------------------------------------------------------------- /ignore/iterm/iterm_tokyonight_night.itermcolors: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Ansi 0 Color 6 | 7 | Alpha Component 8 | 1 9 | Blue Component 10 | 0.11764705926179886 11 | Color Space 12 | sRGB 13 | Green Component 14 | 0.086274512112140656 15 | Red Component 16 | 0.08235294371843338 17 | 18 | Ansi 1 Color 19 | 20 | Alpha Component 21 | 1 22 | Blue Component 23 | 0.55686277151107788 24 | Color Space 25 | sRGB 26 | Green Component 27 | 0.46274510025978088 28 | Red Component 29 | 0.9686274528503418 30 | 31 | Ansi 10 Color 32 | 33 | Alpha Component 34 | 1 35 | Blue Component 36 | 0.41568627953529358 37 | Color Space 38 | sRGB 39 | Green Component 40 | 0.80784314870834351 41 | Red Component 42 | 0.61960786581039429 43 | 44 | Ansi 11 Color 45 | 46 | Alpha Component 47 | 1 48 | Blue Component 49 | 0.40784314274787903 50 | Color Space 51 | sRGB 52 | Green Component 53 | 0.68627452850341797 54 | Red Component 55 | 0.87843137979507446 56 | 57 | Ansi 12 Color 58 | 59 | Alpha Component 60 | 1 61 | Blue Component 62 | 0.9686274528503418 63 | Color Space 64 | sRGB 65 | Green Component 66 | 0.63529413938522339 67 | Red Component 68 | 0.47843137383460999 69 | 70 | Ansi 13 Color 71 | 72 | Alpha Component 73 | 1 74 | Blue Component 75 | 0.9686274528503418 76 | Color Space 77 | sRGB 78 | Green Component 79 | 0.60392159223556519 80 | Red Component 81 | 0.73333334922790527 82 | 83 | Ansi 14 Color 84 | 85 | Alpha Component 86 | 1 87 | Blue Component 88 | 1 89 | Color Space 90 | sRGB 91 | Green Component 92 | 0.81176471710205078 93 | Red Component 94 | 0.49019607901573181 95 | 96 | Ansi 15 Color 97 | 98 | Alpha Component 99 | 1 100 | Blue Component 101 | 0.96078431606292725 102 | Color Space 103 | sRGB 104 | Green Component 105 | 0.7921568751335144 106 | Red Component 107 | 0.75294119119644165 108 | 109 | Ansi 2 Color 110 | 111 | Alpha Component 112 | 1 113 | Blue Component 114 | 0.41568627953529358 115 | Color Space 116 | sRGB 117 | Green Component 118 | 0.80784314870834351 119 | Red Component 120 | 0.61960786581039429 121 | 122 | Ansi 3 Color 123 | 124 | Alpha Component 125 | 1 126 | Blue Component 127 | 0.40784314274787903 128 | Color Space 129 | sRGB 130 | Green Component 131 | 0.68627452850341797 132 | Red Component 133 | 0.87843137979507446 134 | 135 | Ansi 4 Color 136 | 137 | Alpha Component 138 | 1 139 | Blue Component 140 | 0.9686274528503418 141 | Color Space 142 | sRGB 143 | Green Component 144 | 0.63529413938522339 145 | Red Component 146 | 0.47843137383460999 147 | 148 | Ansi 5 Color 149 | 150 | Alpha Component 151 | 1 152 | Blue Component 153 | 0.9686274528503418 154 | Color Space 155 | sRGB 156 | Green Component 157 | 0.60392159223556519 158 | Red Component 159 | 0.73333334922790527 160 | 161 | Ansi 6 Color 162 | 163 | Alpha Component 164 | 1 165 | Blue Component 166 | 1 167 | Color Space 168 | sRGB 169 | Green Component 170 | 0.81176471710205078 171 | Red Component 172 | 0.49019607901573181 173 | 174 | Ansi 7 Color 175 | 176 | Alpha Component 177 | 1 178 | Blue Component 179 | 0.83921569585800171 180 | Color Space 181 | sRGB 182 | Green Component 183 | 0.69411766529083252 184 | Red Component 185 | 0.66274511814117432 186 | 187 | Ansi 8 Color 188 | 189 | Alpha Component 190 | 1 191 | Blue Component 192 | 0.40784314274787903 193 | Color Space 194 | sRGB 195 | Green Component 196 | 0.28235295414924622 197 | Red Component 198 | 0.25490197539329529 199 | 200 | Ansi 9 Color 201 | 202 | Alpha Component 203 | 1 204 | Blue Component 205 | 0.55686277151107788 206 | Color Space 207 | sRGB 208 | Green Component 209 | 0.46274510025978088 210 | Red Component 211 | 0.9686274528503418 212 | 213 | Background Color 214 | 215 | Alpha Component 216 | 1 217 | Blue Component 218 | 0.14901961386203766 219 | Color Space 220 | sRGB 221 | Green Component 222 | 0.10588235408067703 223 | Red Component 224 | 0.10196078568696976 225 | 226 | Badge Color 227 | 228 | Alpha Component 229 | 0.5 230 | Blue Component 231 | 0.0 232 | Color Space 233 | sRGB 234 | Green Component 235 | 0.1491314172744751 236 | Red Component 237 | 1 238 | 239 | Bold Color 240 | 241 | Alpha Component 242 | 1 243 | Blue Component 244 | 0.93333333730697632 245 | Color Space 246 | sRGB 247 | Green Component 248 | 0.93333333730697632 249 | Red Component 250 | 0.93333333730697632 251 | 252 | Cursor Color 253 | 254 | Alpha Component 255 | 1 256 | Blue Component 257 | 0.96078431606292725 258 | Color Space 259 | sRGB 260 | Green Component 261 | 0.7921568751335144 262 | Red Component 263 | 0.75294119119644165 264 | 265 | Cursor Guide Color 266 | 267 | Alpha Component 268 | 0.25 269 | Blue Component 270 | 1 271 | Color Space 272 | sRGB 273 | Green Component 274 | 0.9268307089805603 275 | Red Component 276 | 0.70213186740875244 277 | 278 | Cursor Text Color 279 | 280 | Alpha Component 281 | 1 282 | Blue Component 283 | 0.11764705926179886 284 | Color Space 285 | sRGB 286 | Green Component 287 | 0.086274512112140656 288 | Red Component 289 | 0.08235294371843338 290 | 291 | Foreground Color 292 | 293 | Alpha Component 294 | 1 295 | Blue Component 296 | 0.96078431606292725 297 | Color Space 298 | sRGB 299 | Green Component 300 | 0.7921568751335144 301 | Red Component 302 | 0.75294119119644165 303 | 304 | Link Color 305 | 306 | Alpha Component 307 | 1 308 | Blue Component 309 | 0.7921568751335144 310 | Color Space 311 | sRGB 312 | Green Component 313 | 0.85490196943283081 314 | Red Component 315 | 0.45098039507865906 316 | 317 | Selected Text Color 318 | 319 | Alpha Component 320 | 1 321 | Blue Component 322 | 0.96078431606292725 323 | Color Space 324 | sRGB 325 | Green Component 326 | 0.7921568751335144 327 | Red Component 328 | 0.75294119119644165 329 | 330 | Selection Color 331 | 332 | Alpha Component 333 | 1 334 | Blue Component 335 | 0.48627451062202454 336 | Color Space 337 | sRGB 338 | Green Component 339 | 0.27450981736183167 340 | Red Component 341 | 0.20000000298023224 342 | 343 | 344 | 345 | -------------------------------------------------------------------------------- /ignore/iterm/iterm_tokyonight_storm.itermcolors: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Ansi 0 Color 6 | 7 | Alpha Component 8 | 1 9 | Blue Component 10 | 0.18431372940540314 11 | Color Space 12 | sRGB 13 | Green Component 14 | 0.12549020349979401 15 | Red Component 16 | 0.11372549086809158 17 | 18 | Ansi 1 Color 19 | 20 | Alpha Component 21 | 1 22 | Blue Component 23 | 0.55686277151107788 24 | Color Space 25 | sRGB 26 | Green Component 27 | 0.46274510025978088 28 | Red Component 29 | 0.9686274528503418 30 | 31 | Ansi 10 Color 32 | 33 | Alpha Component 34 | 1 35 | Blue Component 36 | 0.41568627953529358 37 | Color Space 38 | sRGB 39 | Green Component 40 | 0.80784314870834351 41 | Red Component 42 | 0.61960786581039429 43 | 44 | Ansi 11 Color 45 | 46 | Alpha Component 47 | 1 48 | Blue Component 49 | 0.40784314274787903 50 | Color Space 51 | sRGB 52 | Green Component 53 | 0.68627452850341797 54 | Red Component 55 | 0.87843137979507446 56 | 57 | Ansi 12 Color 58 | 59 | Alpha Component 60 | 1 61 | Blue Component 62 | 0.9686274528503418 63 | Color Space 64 | sRGB 65 | Green Component 66 | 0.63529413938522339 67 | Red Component 68 | 0.47843137383460999 69 | 70 | Ansi 13 Color 71 | 72 | Alpha Component 73 | 1 74 | Blue Component 75 | 0.9686274528503418 76 | Color Space 77 | sRGB 78 | Green Component 79 | 0.60392159223556519 80 | Red Component 81 | 0.73333334922790527 82 | 83 | Ansi 14 Color 84 | 85 | Alpha Component 86 | 1 87 | Blue Component 88 | 1 89 | Color Space 90 | sRGB 91 | Green Component 92 | 0.81176471710205078 93 | Red Component 94 | 0.49019607901573181 95 | 96 | Ansi 15 Color 97 | 98 | Alpha Component 99 | 1 100 | Blue Component 101 | 0.96078431606292725 102 | Color Space 103 | sRGB 104 | Green Component 105 | 0.7921568751335144 106 | Red Component 107 | 0.75294119119644165 108 | 109 | Ansi 2 Color 110 | 111 | Alpha Component 112 | 1 113 | Blue Component 114 | 0.41568627953529358 115 | Color Space 116 | sRGB 117 | Green Component 118 | 0.80784314870834351 119 | Red Component 120 | 0.61960786581039429 121 | 122 | Ansi 3 Color 123 | 124 | Alpha Component 125 | 1 126 | Blue Component 127 | 0.40784314274787903 128 | Color Space 129 | sRGB 130 | Green Component 131 | 0.68627452850341797 132 | Red Component 133 | 0.87843137979507446 134 | 135 | Ansi 4 Color 136 | 137 | Alpha Component 138 | 1 139 | Blue Component 140 | 0.9686274528503418 141 | Color Space 142 | sRGB 143 | Green Component 144 | 0.63529413938522339 145 | Red Component 146 | 0.47843137383460999 147 | 148 | Ansi 5 Color 149 | 150 | Alpha Component 151 | 1 152 | Blue Component 153 | 0.9686274528503418 154 | Color Space 155 | sRGB 156 | Green Component 157 | 0.60392159223556519 158 | Red Component 159 | 0.73333334922790527 160 | 161 | Ansi 6 Color 162 | 163 | Alpha Component 164 | 1 165 | Blue Component 166 | 1 167 | Color Space 168 | sRGB 169 | Green Component 170 | 0.81176471710205078 171 | Red Component 172 | 0.49019607901573181 173 | 174 | Ansi 7 Color 175 | 176 | Alpha Component 177 | 1 178 | Blue Component 179 | 0.83921569585800171 180 | Color Space 181 | sRGB 182 | Green Component 183 | 0.69411766529083252 184 | Red Component 185 | 0.66274511814117432 186 | 187 | Ansi 8 Color 188 | 189 | Alpha Component 190 | 1 191 | Blue Component 192 | 0.40784314274787903 193 | Color Space 194 | sRGB 195 | Green Component 196 | 0.28235295414924622 197 | Red Component 198 | 0.25490197539329529 199 | 200 | Ansi 9 Color 201 | 202 | Alpha Component 203 | 1 204 | Blue Component 205 | 0.55686277151107788 206 | Color Space 207 | sRGB 208 | Green Component 209 | 0.46274510025978088 210 | Red Component 211 | 0.9686274528503418 212 | 213 | Background Color 214 | 215 | Alpha Component 216 | 1 217 | Blue Component 218 | 0.23137255012989044 219 | Color Space 220 | sRGB 221 | Green Component 222 | 0.15686275064945221 223 | Red Component 224 | 0.14117647707462311 225 | 226 | Badge Color 227 | 228 | Alpha Component 229 | 0.5 230 | Blue Component 231 | 0.0 232 | Color Space 233 | sRGB 234 | Green Component 235 | 0.1491314172744751 236 | Red Component 237 | 1 238 | 239 | Bold Color 240 | 241 | Alpha Component 242 | 1 243 | Blue Component 244 | 0.93333333730697632 245 | Color Space 246 | sRGB 247 | Green Component 248 | 0.93333333730697632 249 | Red Component 250 | 0.93333333730697632 251 | 252 | Cursor Color 253 | 254 | Alpha Component 255 | 1 256 | Blue Component 257 | 0.96078431606292725 258 | Color Space 259 | sRGB 260 | Green Component 261 | 0.7921568751335144 262 | Red Component 263 | 0.75294119119644165 264 | 265 | Cursor Guide Color 266 | 267 | Alpha Component 268 | 0.25 269 | Blue Component 270 | 1 271 | Color Space 272 | sRGB 273 | Green Component 274 | 0.9268307089805603 275 | Red Component 276 | 0.70213186740875244 277 | 278 | Cursor Text Color 279 | 280 | Alpha Component 281 | 1 282 | Blue Component 283 | 0.18431372940540314 284 | Color Space 285 | sRGB 286 | Green Component 287 | 0.12549020349979401 288 | Red Component 289 | 0.11372549086809158 290 | 291 | Foreground Color 292 | 293 | Alpha Component 294 | 1 295 | Blue Component 296 | 0.96078431606292725 297 | Color Space 298 | sRGB 299 | Green Component 300 | 0.7921568751335144 301 | Red Component 302 | 0.75294119119644165 303 | 304 | Link Color 305 | 306 | Alpha Component 307 | 1 308 | Blue Component 309 | 0.7921568751335144 310 | Color Space 311 | sRGB 312 | Green Component 313 | 0.85490196943283081 314 | Red Component 315 | 0.45098039507865906 316 | 317 | Selected Text Color 318 | 319 | Alpha Component 320 | 1 321 | Blue Component 322 | 0.96078431606292725 323 | Color Space 324 | sRGB 325 | Green Component 326 | 0.7921568751335144 327 | Red Component 328 | 0.75294119119644165 329 | 330 | Selection Color 331 | 332 | Alpha Component 333 | 1 334 | Blue Component 335 | 0.50980395078659058 336 | Color Space 337 | sRGB 338 | Green Component 339 | 0.29019609093666077 340 | Red Component 341 | 0.21176470816135406 342 | 343 | 344 | 345 | --------------------------------------------------------------------------------