├── .github └── FUNDING.yml ├── .gitignore ├── .gitmodules ├── .luacheckrc ├── .luarc.json ├── .prettierrc ├── .secrets.gpg ├── HOME ├── .bash_profile └── .bashrc ├── README.md ├── applications ├── lock.desktop ├── reboot.desktop ├── shutdown.desktop └── sxiv.desktop ├── atuin └── config.toml ├── awesome ├── inspect.lua ├── rc.lua └── utils.lua ├── bash ├── aliases.sh ├── bashrc ├── dir_colors ├── env-vars.sh ├── functions.sh ├── input.sh └── inputrc ├── cspell └── cspell.config.yaml ├── dunst └── dunstrc ├── fzf-ignore ├── git ├── .git-prompt-colors.sh ├── .gitconfig ├── git.scmbrc ├── gitignore_global └── templates │ └── hooks │ ├── pre-commit │ └── prepare-commit-msg ├── hypr ├── hypridle.conf ├── hyprland.conf ├── hyprlock.conf ├── hyprpaper.conf └── next-workspace.py ├── i3 └── i3-config ├── kitty └── kitty.conf ├── lib ├── .iterm2_shell_integration.bash ├── 10k.txt ├── cd-history.bash ├── git-completion.bash ├── git-flow-completion.bash ├── kubectl-completion.bash ├── minikube-comletion.bash ├── npm-completion.bash └── pm2-completion.bash ├── pgcli └── config ├── picom └── picom.conf ├── python └── ipython │ └── default_profile.py ├── rofi ├── config.rasi ├── material.rasi ├── rofi-todoist.sh └── rofi-ykman.sh ├── scripts ├── bookmarks.sh ├── fzf-git-log.sh ├── git-ll-mac.sh ├── git-ll.sh ├── git-merge.sh ├── jira-branch.sh ├── lock.sh ├── npm-scripts.py ├── play.sh ├── product-board.sh └── trello-tickets.py ├── starship └── starship.toml ├── stylua.toml ├── terminfo ├── run.sh ├── tmux-256color.terminfo └── xterm-256color-italic.terminfo ├── tmux ├── theme.conf ├── tmux.conf ├── tmux.linux.conf ├── tmux.osx.conf └── tmuxinator │ ├── dotfiles.yml │ ├── mapbox-runtime.yml │ ├── mapbox.yml │ ├── qmk.yml │ └── vim.yml ├── vim ├── after │ ├── ftplugin │ │ ├── graphql.vim │ │ ├── lua.lua │ │ ├── markdown.lua │ │ └── vimwiki.vim │ └── syntax │ │ ├── markdown.vim │ │ ├── org.vim │ │ └── vimwiki.vim ├── ftdetect │ └── rego.vim ├── ftplugin │ ├── css.vim │ ├── defx.vim │ ├── diagnosticpopup.vim │ ├── gitcommit.vim │ ├── go.vim │ ├── help.vim │ ├── hyprlang.lua │ ├── javascript.vim │ ├── lua.lua │ ├── man.vim │ ├── neo-tree.lua │ ├── neotest-output.lua │ ├── org.lua │ ├── prisma.lua │ ├── python.vim │ ├── qf.vim │ ├── scss.vim │ ├── text.vim │ ├── tsplayground.lua │ ├── typescript.vim │ ├── typescriptreact.vim │ └── yaml.vim ├── init.lua ├── lazy-lock.json ├── lua │ ├── autocmds.lua │ ├── buffers.lua │ ├── commands.lua │ ├── efm │ │ ├── black.lua │ │ ├── cbfmt.lua │ │ ├── cspell.lua │ │ ├── eslint.lua │ │ ├── flake8.lua │ │ ├── go_vet.lua │ │ ├── goimports.lua │ │ ├── isort.lua │ │ ├── luacheck.lua │ │ ├── misspell.lua │ │ ├── mypy.lua │ │ ├── opa.lua │ │ ├── prettier.lua │ │ ├── shellcheck.lua │ │ ├── shfmt.lua │ │ ├── staticcheck.lua │ │ ├── stylua.lua │ │ ├── terraform.lua │ │ └── vint.lua │ ├── fold.lua │ ├── fuzzy.lua │ ├── git.lua │ ├── keymaps.lua │ ├── lists.lua │ ├── lsp │ │ ├── diagnostics.lua │ │ ├── handlers.lua │ │ └── init.lua │ ├── luasnippets │ │ ├── all.lua │ │ ├── gitcommit.lua │ │ ├── go.lua │ │ ├── lua.lua │ │ ├── org.lua │ │ ├── python.lua │ │ ├── rust.lua │ │ ├── typescript.lua │ │ └── utils.lua │ ├── plugins │ │ ├── auto-session.lua │ │ ├── autopair.lua │ │ ├── bqf.lua │ │ ├── caser.lua │ │ ├── clear-action.lua │ │ ├── cmp.lua │ │ ├── comment.lua │ │ ├── crates.lua │ │ ├── dap.lua │ │ ├── dev-container.lua │ │ ├── devicons.lua │ │ ├── diffview.lua │ │ ├── dressing.lua │ │ ├── flash.lua │ │ ├── fugitive.lua │ │ ├── fzf.lua │ │ ├── gitsigns.lua │ │ ├── headlines.lua │ │ ├── helpview.lua │ │ ├── ibl.lua │ │ ├── image.lua │ │ ├── is.lua │ │ ├── lazy-dev.lua │ │ ├── lsp-format.lua │ │ ├── lsp-signature.lua │ │ ├── lspconfig.lua │ │ ├── luaref.lua │ │ ├── luasnip.lua │ │ ├── luvit-meta.lua │ │ ├── navigator.lua │ │ ├── neo-tree.lua │ │ ├── neodev.lua │ │ ├── neotest.lua │ │ ├── obsidian.lua │ │ ├── octo.lua │ │ ├── onedark.lua │ │ ├── org.lua │ │ ├── pqf.lua │ │ ├── profile.lua │ │ ├── qf.lua │ │ ├── quicker.lua │ │ ├── quickscope.lua │ │ ├── render-markdown.lua │ │ ├── repeat.lua │ │ ├── sandwich.lua │ │ ├── sleuth.lua │ │ ├── spider.lua │ │ ├── substitute.lua │ │ ├── treesitter.lua │ │ ├── treesj.lua │ │ ├── unconditional-paste.lua │ │ ├── virt-column.lua │ │ └── workspace-diagnostics.lua │ ├── settings.lua │ └── utils.lua ├── queries │ ├── comment │ │ └── highlights.scm │ ├── markdown │ │ └── highlights.scm │ ├── org │ │ └── highlights.scm │ ├── prisma │ │ └── injections.scm │ ├── tsx │ │ └── injections.scm │ └── typescript │ │ └── injections.scm └── syntax │ ├── gitconfig.vim │ └── pgsql.vim └── yay └── config.json /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: [lukas-reineke] 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .secrets 2 | vim/backups 3 | vim/spell 4 | vim/.netrwhist 5 | vim/plugin/packer_compiled.vim 6 | vim/plugin/packer_compiled.lua 7 | tmux/plugins 8 | 9 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "lib/bash-git-prompt"] 2 | path = lib/bash-git-prompt 3 | url = https://github.com/magicmonty/bash-git-prompt.git 4 | [submodule "lib/scm_breeze"] 5 | path = lib/scm_breeze 6 | url = https://github.com/scmbreeze/scm_breeze.git 7 | [submodule "lib/fzf-marks"] 8 | path = lib/fzf-marks 9 | url = git@github.com:lukas-reineke/fzf-marks.git 10 | [submodule "lib/bfs"] 11 | path = lib/bfs 12 | url = https://github.com/tavianator/bfs.git 13 | [submodule "lib/vimv"] 14 | path = lib/vimv 15 | url = https://github.com/thameera/vimv.git 16 | [submodule "awesome/lain"] 17 | path = awesome/lain 18 | url = git@github.com:lcpz/lain.git 19 | -------------------------------------------------------------------------------- /.luacheckrc: -------------------------------------------------------------------------------- 1 | globals = { "vim", "_", "use", "s", "i", "fmt", "rep", "conds", "f", "c", "t","root", "awesome", "client" } 2 | max_line_length = false 3 | -------------------------------------------------------------------------------- /.luarc.json: -------------------------------------------------------------------------------- 1 | { 2 | "diagnostics": { 3 | "globals": [ 4 | "awesome", 5 | "client", 6 | "root", 7 | "vim", 8 | "_", 9 | "use", 10 | "s", 11 | "i", 12 | "fmt", 13 | "rep", 14 | "conds", 15 | "f", 16 | "c", 17 | "t" 18 | ], 19 | "max_line_length": false 20 | }, 21 | "workspace.library": [ 22 | "/home/lukas/.local/share/nvim/site/pack/packer/start/neodev.nvim/types/nightly", 23 | "/usr/local/share/nvim/runtime/lua", 24 | "/home/lukas/.local/share/nvim/site/pack/packer/opt/neo-tree.nvim/lua", 25 | "/home/lukas/.local/share/nvim/site/pack/packer/start/ChatGPT.nvim/lua", 26 | "/home/lukas/.local/share/nvim/site/pack/packer/start/Comment.nvim/lua", 27 | "/home/lukas/.local/share/nvim/site/pack/packer/start/LuaSnip/lua", 28 | "/home/lukas/.local/share/nvim/site/pack/packer/start/Navigator.nvim/lua", 29 | "/home/lukas/.local/share/nvim/site/pack/packer/start/auto-session/lua", 30 | "/home/lukas/.local/share/nvim/site/pack/packer/start/cmp-buffer/lua", 31 | "/home/lukas/.local/share/nvim/site/pack/packer/start/cmp-cmdline/lua", 32 | "/home/lukas/.local/share/nvim/site/pack/packer/start/cmp-cmdline-history/lua", 33 | "/home/lukas/.local/share/nvim/site/pack/packer/start/cmp-dap/lua", 34 | "/home/lukas/.local/share/nvim/site/pack/packer/start/cmp-git/lua", 35 | "/home/lukas/.local/share/nvim/site/pack/packer/start/cmp-jira/lua", 36 | "/home/lukas/.local/share/nvim/site/pack/packer/start/cmp-look/lua", 37 | "/home/lukas/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp/lua", 38 | "/home/lukas/.local/share/nvim/site/pack/packer/start/cmp-nvim-lua/lua", 39 | "/home/lukas/.local/share/nvim/site/pack/packer/start/cmp-path/lua", 40 | "/home/lukas/dev/cmp-rg/lua", 41 | "/home/lukas/.local/share/nvim/site/pack/packer/start/cmp-tmux/lua", 42 | "/home/lukas/dev/cmp-under-comparator/lua", 43 | "/home/lukas/.local/share/nvim/site/pack/packer/start/cmp_luasnip/lua", 44 | "/home/lukas/.local/share/nvim/site/pack/packer/start/crates.nvim/lua", 45 | "/home/lukas/.local/share/nvim/site/pack/packer/start/diffview.nvim/lua", 46 | "/home/lukas/.local/share/nvim/site/pack/packer/start/dressing.nvim/lua", 47 | "/home/lukas/.local/share/nvim/site/pack/packer/start/feline.nvim/lua", 48 | "/home/lukas/.local/share/nvim/site/pack/packer/start/follow-md-links.nvim/lua", 49 | "/home/lukas/dev/headlines.nvim/lua", 50 | "/home/lukas/.local/share/nvim/site/pack/packer/start/hlargs.nvim/lua", 51 | "/home/lukas/.local/share/nvim/site/pack/packer/start/inc-rename.nvim/lua", 52 | "/home/lukas/dev/indent-blankline.nvim/lua", 53 | "/home/lukas/dev/lsp-format.nvim/lua", 54 | "/home/lukas/.local/share/nvim/site/pack/packer/start/lsp-inlayhints.nvim/lua", 55 | "/home/lukas/.local/share/nvim/site/pack/packer/start/lsp_lines.nvim/lua", 56 | "/home/lukas/.local/share/nvim/site/pack/packer/start/lsp_signature.nvim/lua", 57 | "/home/lukas/.local/share/nvim/site/pack/packer/start/neo-tree-diagnostics.nvim/lua", 58 | "/home/lukas/.local/share/nvim/site/pack/packer/start/neodev.nvim/lua", 59 | "/home/lukas/.local/share/nvim/site/pack/packer/start/neotest/lua", 60 | "/home/lukas/.local/share/nvim/site/pack/packer/start/neotest-go/lua", 61 | "/home/lukas/.local/share/nvim/site/pack/packer/start/neotest-jest/lua", 62 | "/home/lukas/.local/share/nvim/site/pack/packer/start/neotest-plenary/lua", 63 | "/home/lukas/.local/share/nvim/site/pack/packer/start/neotest-python/lua", 64 | "/home/lukas/.local/share/nvim/site/pack/packer/start/neotest-rust/lua", 65 | "/home/lukas/.local/share/nvim/site/pack/packer/start/nui.nvim/lua", 66 | "/home/lukas/.local/share/nvim/site/pack/packer/start/nvim-bqf/lua", 67 | "/home/lukas/.local/share/nvim/site/pack/packer/start/nvim-cmp/lua", 68 | "/home/lukas/.local/share/nvim/site/pack/packer/start/nvim-coverage/lua", 69 | "/home/lukas/.local/share/nvim/site/pack/packer/start/nvim-custom-diagnostic-highlight/lua", 70 | "/home/lukas/.local/share/nvim/site/pack/packer/start/nvim-dap/lua", 71 | "/home/lukas/.local/share/nvim/site/pack/packer/start/nvim-dap-go/lua", 72 | "/home/lukas/.local/share/nvim/site/pack/packer/start/nvim-dap-python/lua", 73 | "/home/lukas/.local/share/nvim/site/pack/packer/start/nvim-dap-ui/lua", 74 | "/home/lukas/.local/share/nvim/site/pack/packer/start/nvim-dap-virtual-text/lua", 75 | "/home/lukas/.local/share/nvim/site/pack/packer/start/nvim-dap-vscode-js/lua", 76 | "/home/lukas/.local/share/nvim/site/pack/packer/start/nvim-fzf/lua", 77 | "/home/lukas/.local/share/nvim/site/pack/packer/start/nvim-lspconfig/lua", 78 | "/home/lukas/.local/share/nvim/site/pack/packer/start/nvim-navic/lua", 79 | "/home/lukas/.local/share/nvim/site/pack/packer/start/nvim-notify/lua", 80 | "/home/lukas/.local/share/nvim/site/pack/packer/start/nvim-pqf.git/lua", 81 | "/home/lukas/.local/share/nvim/site/pack/packer/start/nvim-spider/lua", 82 | "/home/lukas/.local/share/nvim/site/pack/packer/start/nvim-treesitter/lua", 83 | "/home/lukas/.local/share/nvim/site/pack/packer/start/nvim-treesitter-refactor/lua", 84 | "/home/lukas/.local/share/nvim/site/pack/packer/start/nvim-treesitter-textobjects/lua", 85 | "/home/lukas/.local/share/nvim/site/pack/packer/start/nvim-treesitter-textsubjects/lua", 86 | "/home/lukas/.local/share/nvim/site/pack/packer/start/nvim-ts-autotag/lua", 87 | "/home/lukas/.local/share/nvim/site/pack/packer/start/nvim-ts-context-commentstring/lua", 88 | "/home/lukas/.local/share/nvim/site/pack/packer/start/nvim-web-devicons/lua", 89 | "/home/lukas/.local/share/nvim/site/pack/packer/start/octo.nvim/lua", 90 | "/home/lukas/.local/share/nvim/site/pack/packer/start/one-small-step-for-vimkind/lua", 91 | "/home/lukas/dev/onedark.nvim/lua", 92 | "/home/lukas/.local/share/nvim/site/pack/packer/start/org-bullets.nvim/lua", 93 | "/home/lukas/dev/orgmode.nvim/lua", 94 | "/home/lukas/.local/share/nvim/site/pack/packer/start/package-info.nvim/lua", 95 | "/home/lukas/.local/share/nvim/site/pack/packer/start/packer.nvim/lua", 96 | "/home/lukas/.local/share/nvim/site/pack/packer/start/playground/lua", 97 | "/home/lukas/.local/share/nvim/site/pack/packer/start/plenary.nvim/lua", 98 | "/home/lukas/.local/share/nvim/site/pack/packer/start/popup.nvim/lua", 99 | "/home/lukas/.local/share/nvim/site/pack/packer/start/refactoring.nvim/lua", 100 | "/home/lukas/.local/share/nvim/site/pack/packer/start/telescope.nvim/lua", 101 | "/home/lukas/.local/share/nvim/site/pack/packer/start/treesitter-unit/lua", 102 | "/home/lukas/.local/share/nvim/site/pack/packer/start/treesj/lua", 103 | "/home/lukas/.local/share/nvim/site/pack/packer/start/vim-hexokinase/lua", 104 | "/home/lukas/dev/virt-column.nvim/lua", 105 | "/home/lukas/dotfiles/vim/lua", 106 | "${3rd}/luv/library" 107 | ] 108 | } 109 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | singleQuote: true 2 | trailingComma: 'all' 3 | 4 | # vim:filetype=yaml 5 | -------------------------------------------------------------------------------- /.secrets.gpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukas-reineke/dotfiles/41a411471ff5eaa4170740fe07a62678c1d4ff3c/.secrets.gpg -------------------------------------------------------------------------------- /HOME/.bash_profile: -------------------------------------------------------------------------------- 1 | [[ -f ~/dotfiles/bash/bashrc ]] && . ~/dotfiles/bash/bashrc 2 | -------------------------------------------------------------------------------- /HOME/.bashrc: -------------------------------------------------------------------------------- 1 | [[ -f ~/dotfiles/bash/bashrc ]] && . ~/dotfiles/bash/bashrc 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | My personal dotfiles. 3 | 4 | Don't clone and run this as is, but feel free to take a look and steal parts/ideas. 5 | 6 | Open an issue if you have any questions, happy to help. 7 | -------------------------------------------------------------------------------- /applications/lock.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Exec=/home/lukas/dotfiles/scripts/lock.sh 3 | Icon=lock 4 | Name=Lock 5 | Type=Application 6 | -------------------------------------------------------------------------------- /applications/reboot.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Exec=reboot 3 | Icon=reboot 4 | Name=Reboot 5 | Type=Application 6 | -------------------------------------------------------------------------------- /applications/shutdown.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Exec=shutdown -h 0 3 | Icon=shutdown 4 | Name=Shutdown 5 | Type=Application 6 | -------------------------------------------------------------------------------- /applications/sxiv.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Exec=sxiv -abq 3 | Name=sxiv 4 | Type=Application 5 | -------------------------------------------------------------------------------- /atuin/config.toml: -------------------------------------------------------------------------------- 1 | ## where to store your database, default is your system data directory 2 | ## linux/mac: ~/.local/share/atuin/history.db 3 | ## windows: %USERPROFILE%/.local/share/atuin/history.db 4 | # db_path = "~/.history.db" 5 | 6 | ## where to store your encryption key, default is your system data directory 7 | ## linux/mac: ~/.local/share/atuin/key 8 | ## windows: %USERPROFILE%/.local/share/atuin/key 9 | # key_path = "~/.key" 10 | 11 | ## where to store your auth session token, default is your system data directory 12 | ## linux/mac: ~/.local/share/atuin/session 13 | ## windows: %USERPROFILE%/.local/share/atuin/session 14 | # session_path = "~/.session" 15 | 16 | ## date format used, either "us" or "uk" 17 | # dialect = "us" 18 | 19 | ## default timezone to use when displaying time 20 | ## either "l", "local" to use the system's current local timezone, or an offset 21 | ## from UTC in the format of "<+|->H[H][:M[M][:S[S]]]" 22 | ## for example: "+9", "-05", "+03:30", "-01:23:45", etc. 23 | # timezone = "local" 24 | 25 | ## enable or disable automatic sync 26 | # auto_sync = true 27 | 28 | ## enable or disable automatic update checks 29 | # update_check = true 30 | 31 | ## address of the sync server 32 | # sync_address = "https://api.atuin.sh" 33 | 34 | ## how often to sync history. note that this is only triggered when a command 35 | ## is ran, so sync intervals may well be longer 36 | ## set it to 0 to sync after every command 37 | # sync_frequency = "10m" 38 | 39 | ## which search mode to use 40 | ## possible values: prefix, fulltext, fuzzy, skim 41 | # search_mode = "fuzzy" 42 | 43 | ## which filter mode to use 44 | ## possible values: global, host, session, directory 45 | # filter_mode = "global" 46 | 47 | ## With workspace filtering enabled, Atuin will filter for commands executed 48 | ## in any directory within a git repository tree (default: false) 49 | # workspaces = false 50 | 51 | ## which filter mode to use when atuin is invoked from a shell up-key binding 52 | ## the accepted values are identical to those of "filter_mode" 53 | ## leave unspecified to use same mode set in "filter_mode" 54 | # filter_mode_shell_up_key_binding = "global" 55 | 56 | ## which search mode to use when atuin is invoked from a shell up-key binding 57 | ## the accepted values are identical to those of "search_mode" 58 | ## leave unspecified to use same mode set in "search_mode" 59 | # search_mode_shell_up_key_binding = "fuzzy" 60 | 61 | ## which style to use 62 | ## possible values: auto, full, compact 63 | style = "compact" 64 | 65 | ## the maximum number of lines the interface should take up 66 | ## set it to 0 to always go full screen 67 | inline_height = 15 68 | 69 | ## Invert the UI - put the search bar at the top , Default to `false` 70 | invert = true 71 | 72 | ## enable or disable showing a preview of the selected command 73 | ## useful when the command is longer than the terminal width and is cut off 74 | show_preview = false 75 | 76 | ## what to do when the escape key is pressed when searching 77 | ## possible values: return-original, return-query 78 | # exit_mode = "return-original" 79 | 80 | ## possible values: emacs, subl 81 | # word_jump_mode = "emacs" 82 | 83 | ## characters that count as a part of a word 84 | # word_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" 85 | 86 | ## number of context lines to show when scrolling by pages 87 | # scroll_context_lines = 1 88 | 89 | ## use ctrl instead of alt as the shortcut modifier key for numerical UI shortcuts 90 | ## alt-0 .. alt-9 91 | # ctrl_n_shortcuts = false 92 | 93 | ## default history list format - can also be specified with the --format arg 94 | # history_format = "{time}\t{command}\t{duration}" 95 | history_format = "{command}" 96 | 97 | ## prevent commands matching any of these regexes from being written to history. 98 | ## Note that these regular expressions are unanchored, i.e. if they don't start 99 | ## with ^ or end with $, they'll match anywhere in the command. 100 | ## For details on the supported regular expression syntax, see 101 | ## https://docs.rs/regex/latest/regex/#syntax 102 | # history_filter = [ 103 | # "^secret-cmd", 104 | # "^innocuous-cmd .*--secret=.+", 105 | # ] 106 | 107 | ## prevent commands run with cwd matching any of these regexes from being written 108 | ## to history. Note that these regular expressions are unanchored, i.e. if they don't 109 | ## start with ^ or end with $, they'll match anywhere in CWD. 110 | ## For details on the supported regular expression syntax, see 111 | ## https://docs.rs/regex/latest/regex/#syntax 112 | # cwd_filter = [ 113 | # "^/very/secret/area", 114 | # ] 115 | 116 | ## Configure the maximum height of the preview to show. 117 | ## Useful when you have long scripts in your history that you want to distinguish 118 | ## by more than the first few lines. 119 | # max_preview_height = 4 120 | 121 | ## Configure whether or not to show the help row, which includes the current Atuin 122 | ## version (and whether an update is available), a keymap hint, and the total 123 | ## amount of commands in your history. 124 | show_help = false 125 | 126 | ## Configure whether or not to show tabs for search and inspect 127 | show_tabs = false 128 | 129 | ## Defaults to true. This matches history against a set of default regex, and will not save it if we get a match. Defaults include 130 | ## 1. AWS key id 131 | ## 2. Github pat (old and new) 132 | ## 3. Slack oauth tokens (bot, user) 133 | ## 4. Slack webhooks 134 | ## 5. Stripe live/test keys 135 | # secrets_filter = true 136 | 137 | ## Defaults to true. If enabled, upon hitting enter Atuin will immediately execute the command. Press tab to return to the shell and edit. 138 | # This applies for new installs. Old installs will keep the old behaviour unless configured otherwise. 139 | enter_accept = true 140 | 141 | ## Defaults to "emacs". This specifies the keymap on the startup of `atuin 142 | ## search`. If this is set to "auto", the startup keymap mode in the Atuin 143 | ## search is automatically selected based on the shell's keymap where the 144 | ## keybinding is defined. If this is set to "emacs", "vim-insert", or 145 | ## "vim-normal", the startup keymap mode in the Atuin search is forced to be 146 | ## the specified one. 147 | # keymap_mode = "vim-insert" 148 | 149 | ## Cursor style in each keymap mode. If specified, the cursor style is changed 150 | ## in entering the cursor shape. Available values are "default" and 151 | ## "{blink,steady}-{block,underline,bar}". 152 | # keymap_cursor = { emacs = "blink-block", vim_insert = "blink-block", vim_normal = "steady-block" } 153 | keymap_cursor = { emacs = "blink-block", vim_insert = "blink-block", vim_normal = "blink-block" } 154 | 155 | # network_connect_timeout = 5 156 | # network_timeout = 5 157 | 158 | ## Timeout (in seconds) for acquiring a local database connection (sqlite) 159 | # local_timeout = 5 160 | 161 | ## Set this to true and Atuin will minimize motion in the UI - timers will not update live, etc. 162 | ## Alternatively, set env NO_MOTION=true 163 | # prefers_reduced_motion = false 164 | 165 | [stats] 166 | ## Set commands where we should consider the subcommand for statistics. Eg, kubectl get vs just kubectl 167 | # common_subcommands = [ 168 | # "apt", 169 | # "cargo", 170 | # "composer", 171 | # "dnf", 172 | # "docker", 173 | # "git", 174 | # "go", 175 | # "ip", 176 | # "kubectl", 177 | # "nix", 178 | # "nmcli", 179 | # "npm", 180 | # "pecl", 181 | # "pnpm", 182 | # "podman", 183 | # "port", 184 | # "systemctl", 185 | # "tmux", 186 | # "yarn", 187 | # ] 188 | 189 | ## Set commands that should be totally stripped and ignored from stats 190 | # common_prefix = ["sudo"] 191 | 192 | ## Set commands that will be completely ignored from stats 193 | # ignored_commands = [ 194 | # "cd", 195 | # "ls", 196 | # "vi" 197 | # ] 198 | 199 | [keys] 200 | # Defaults to true. If disabled, using the up/down key won't exit the TUI when scrolled past the first/last entry. 201 | scroll_exits = false 202 | 203 | [sync] 204 | # Enable sync v2 by default 205 | # This ensures that sync v2 is enabled for new installs only 206 | # In a later release it will become the default across the board 207 | records = true 208 | 209 | [preview] 210 | ## which preview strategy to use to calculate the preview height (respects max_preview_height). 211 | ## possible values: auto, static 212 | ## auto: length of the selected command. 213 | ## static: length of the longest command stored in the history. 214 | # strategy = "auto" 215 | 216 | [daemon] 217 | ## Enables using the daemon to sync. Requires the daemon to be running in the background. Start it with `atuin daemon` 218 | # enabled = false 219 | 220 | ## How often the daemon should sync in seconds 221 | # sync_frequency = 300 222 | 223 | ## The path to the unix socket used by the daemon (on unix systems) 224 | ## linux/mac: ~/.local/share/atuin/atuin.sock 225 | ## windows: Not Supported 226 | # socket_path = "~/.local/share/atuin/atuin.sock" 227 | 228 | ## Use systemd socket activation rather than opening the given path (the path must still be correct for the client) 229 | ## linux: false 230 | ## mac/windows: Not Supported 231 | # systemd_socket = false 232 | 233 | ## The port that should be used for TCP on non unix systems 234 | # tcp_port = 8889 235 | 236 | -------------------------------------------------------------------------------- /awesome/utils.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | M.titlecase = function(str) 4 | return string.gsub(str, "(%a)(.*)", function(first, rest) 5 | return first:upper() .. rest:lower() 6 | end) 7 | end 8 | 9 | return M 10 | -------------------------------------------------------------------------------- /bash/aliases.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # list 4 | # alias la='~/dotfiles/scripts/git-ll-mac.sh' 5 | # alias cll='clear && ~/dotfiles/scripts/git-ll-mac.sh' 6 | # alias ls='ls -lshHFGX --color=always --group-directories-first' 7 | alias lg='eza -al --icons=always --color=always | grep' 8 | # alias ll='ls -AlshHFGX --color=always --group-directories-first' 9 | # alias lll='ls -AlshHFGX --color=always --group-directories-first | less -R' 10 | 11 | alias ls='eza --all' 12 | alias ll='eza -al --icons=always' 13 | alias tree='eza -alT --icons=always' 14 | 15 | # move 16 | alias cl='clear' 17 | alias lc='clear' 18 | alias mkdir='mkdir -p' 19 | alias gg='cd $(git rev-parse --show-toplevel)' 20 | 21 | # vim 22 | alias sv='sudoedit' 23 | alias v='ge nvim' 24 | alias gv='ge nvim -c "Gdiff"' 25 | 26 | # system 27 | alias rm="ge command rm -rf" 28 | alias grep='grep --color=always' 29 | alias reload='source ~/dotfiles/bash/bashrc' 30 | alias sudo='sudo env PATH=$PATH' 31 | alias cat='ge ccat' 32 | 33 | # git 34 | alias gl='~/dotfiles/scripts/fzf-git-log.sh' 35 | alias gtl='gt log' 36 | alias log='git log --graph --all --oneline --decorate' 37 | alias logs='git log --graph --all --decorate --relative-date' 38 | alias gsmu='git submodule update --remote --merge' 39 | alias gu='git reset HEAD~ --soft' 40 | alias gmt='git mergetool' 41 | alias grpo='git remote prune origin' 42 | alias gds='git diff --staged' 43 | alias gwap='git diff -w --no-color | git apply --cached --ignore-whitespace && git checkout -- . && git reset && git add -p' 44 | alias gca='git commit --amend --no-edit' 45 | alias gpsf='git push --force-with-lease' 46 | alias gcae='git commit --amend' 47 | alias gcn='git commit --no-verify' 48 | alias gpsn='git push --no-verify' 49 | alias gpsfn='git push --force-with-lease --no-verify' 50 | alias gj='~/dotfiles/scripts/jira-branch.sh' 51 | alias gab='git absorb' 52 | 53 | # python 54 | # alias da='. deactivate' 55 | # alias iyoga='ipython --profile=yoga' 56 | # alias pa='. $(poetry env info -p)/bin/activate' 57 | 58 | # stuff 59 | # alias lock='~/scripts/i3lock-fancy/lock' 60 | # alias installvm='sudo vmware-modconfig --console --install-all' 61 | # alias cal='gcalcli calm' 62 | # alias fakesmtp='sudo java -jar ~/dotfiles/fakeSMTP-1.13.jar' 63 | 64 | # docker 65 | 66 | # alias dmongo='docker run --rm --name mogno-docker -v mongodbdata:/data/db -p 27017:27017 mongo:3.2-jessie' 67 | # alias dpostgres='docker run --rm --name pg-docker -e POSTGRES_PASSWORD=$POSTGRES_PASSWORD -e POSTGRES_DB=$POSTGRES_DB -p 5432:5432 -v postgresdbdata:/var/lib/postgresql/data postgres:9.5.16-alpine' 68 | 69 | # taskwarrior 70 | # alias t='task' 71 | # alias tp='task private' 72 | # alias tl='task list' 73 | # alias ta='task add' 74 | # alias to='taskopen' 75 | # alias td='task done' 76 | 77 | # kubernetes 78 | alias kcg='kubectl get pods | grep' 79 | 80 | # vpn 81 | alias md='nmcli connection down mapbox' 82 | alias mu='nmcli connection up mapbox' 83 | -------------------------------------------------------------------------------- /bash/bashrc: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # If not running interactively, don't do anything 4 | [[ $- != *i* ]] && return 5 | 6 | # don't put duplicate lines or lines starting with space in the history. 7 | export HISTCONTROL=ignoreboth:erasedups 8 | 9 | # append to the history file, don't overwrite it 10 | shopt -s histappend 11 | 12 | # for setting history length 13 | export HISTSIZE=-1 14 | export HISTFILESIZE=-1 15 | export HISTFILE=~/.bash_eternal_history 16 | 17 | # check the window size after each command and, if necessary, 18 | # update the values of LINES and COLUMNS. 19 | shopt -s checkwinsize 20 | 21 | shopt -s globstar 22 | 23 | ## external 24 | # git completion 25 | if [ -f ~/dotfiles/lib/git-completion.bash ]; then 26 | source ~/dotfiles/lib/git-completion.bash 27 | fi 28 | 29 | # scm breeze 30 | if [ -f ~/dotfiles/lib/scm_breeze/scm_breeze.sh ]; then 31 | source ~/dotfiles/lib/scm_breeze/scm_breeze.sh 32 | fi 33 | 34 | # ssh 35 | if ! pgrep -u "$USER" ssh-agent >/dev/null; then 36 | ssh-agent >~/.ssh-agent-thing 37 | fi 38 | if [[ "$SSH_AGENT_PID" == "" ]]; then 39 | eval "$(<~/.ssh-agent-thing)" 40 | fi 41 | 42 | ### alias ### 43 | if [ -f ~/dotfiles/bash/aliases.sh ]; then 44 | source ~/dotfiles/bash/aliases.sh 45 | fi 46 | 47 | ### environment variables ### 48 | if [ -f ~/dotfiles/bash/env-vars.sh ]; then 49 | source ~/dotfiles/bash/env-vars.sh 50 | fi 51 | 52 | ### functions ### 53 | if [ -f ~/dotfiles/bash/functions.sh ]; then 54 | source ~/dotfiles/bash/functions.sh 55 | fi 56 | 57 | ### keyboard shortcuts ### 58 | if [ -f ~/dotfiles/bash/input.sh ]; then 59 | source ~/dotfiles/bash/input.sh 60 | fi 61 | 62 | if [ -f ~/dotfiles/lib/kubectl-completion.bash ]; then 63 | source ~/dotfiles/lib/kubectl-completion.bash 64 | fi 65 | 66 | # Setup fzf 67 | if [[ ! "$PATH" == *$HOME/dotfiles/lib/fzf/bin* ]]; then 68 | export PATH="$PATH:$HOME/dotfiles/lib/fzf/bin" 69 | fi 70 | 71 | # fzf mark 72 | if [ -f ~/dotfiles/lib/fzf-marks/fzf-marks.plugin.bash ]; then 73 | source ~/dotfiles/lib/fzf-marks/fzf-marks.plugin.bash 74 | fi 75 | 76 | if [ -f usr/share/bash-preexec/bash-preexec.sh ]; then 77 | source /usr/share/bash-preexec/bash-preexec.sh 78 | fi 79 | 80 | # eval "$(fnm env)" 81 | # eval "$(pyenv init -)" 82 | # eval "$(pyenv virtualenv-init -)" 83 | # eval "$(dircolors -b ~/dotfiles/bash/dir_colors)" 84 | # eval "$(gt completion)" 85 | eval "$(starship init bash)" 86 | eval "$(atuin init bash --disable-up-arrow)" 87 | source "$(npm root -g)/@mapbox/mbxcli/bin/mapbox.sh" 88 | -------------------------------------------------------------------------------- /bash/dir_colors: -------------------------------------------------------------------------------- 1 | 2 | FILE 98m \e[97 3 | DIR 98m \e[98 4 | LINK 36m \e[36 5 | EXEC 01;31m \e[31 6 | *rc 97m \e[97 7 | *.json 33m \e[33 8 | *.gql 33m \e[33 9 | *.vim 32m \e[32 10 | *.py 32m \e[32 11 | *Dockerfile 34m \e[34 12 | *LICENSE 33m \e[33 13 | *.js 34m \e[34 14 | *.ts 34m \e[34 15 | *.jsx 34m \e[34 16 | *.tsx 34m \e[34 17 | *.sh 36m \e[36 18 | *.scss 33m \e[33 19 | *.css 33m \e[33 20 | *.html 35m \e[35 21 | *.yaml 97m \e[97 22 | *.yml 97m \e[97 23 | *.md 33m \e[33 24 | *.sql 33m \e[33 25 | *.jpg 35m \e[35 26 | *.jpeg 35m \e[35 27 | *.bmp 35m \e[35 28 | *.png 35m \e[35 29 | *.webp 35m \e[35 30 | *.gif 35m \e[35 31 | *.ico 35m \e[35 32 | *.svg 35m \e[35 33 | *package.json 32m \e[32 34 | *package-lock.json 32m \e[32 35 | -------------------------------------------------------------------------------- /bash/env-vars.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | export RED='\e[0;31m' 4 | export GRN='\e[0;32m' 5 | export YEL='\e[33m' 6 | export CYN='\e[36m' 7 | export BLU='\e[34m' 8 | export LGR='\e[37m' 9 | export DGR='\e[90m' 10 | export WHT='\e[97m' 11 | export MGT='\e[35m' 12 | export UNDERLINE='\e[4m' 13 | export BOLD='\e[1m' 14 | export NC='\e[0m' # No Color 15 | 16 | # export FZF_COMPLETION_TRIGGER='++' 17 | # export LC_ALL=en_US.UTF-8 18 | # export LANG=en_US.UTF-8 19 | # export LANGUAGE=en_US.UTF-8 20 | export FZF_DEFAULT_COMMAND='rg --files --hidden --smart-case --follow --glob "!.git/*" --ignore-file ~/dotfiles/fzf-ignore --ignore-file .fzf-ignore' 21 | export FZF_DEFAULT_OPTS="--bind \"ctrl-n:preview-down,ctrl-p:preview-up,ctrl-h:select-all,ctrl-l:deselect-all\" --color=dark --color=fg:-1,bg:-1,hl:#98c379,fg+:#ffffff,bg+:#1a1a1a,hl+:#98c379 --color=info:#c678dd,prompt:#61afef,pointer:#be5046,marker:#e5c07b,spinner:#61afef,header:#61afef" 22 | export GIT_REPO_DIR="$HOME/dev" 23 | export VISUAL=nvim 24 | export EDITOR="$VISUAL" 25 | export PATH=${PATH}:$HOME/dotfiles/lib/vimv 26 | export PATH=${PATH}:$HOME/dev/golib/bin 27 | export PATH=${PATH}:$HOME/dev/go/bin 28 | export PATH=${PATH}:$HOME/.cargo/bin 29 | export PATH=${PATH}:$HOME/.local/bin 30 | export PATH=${PATH}:$HOME/.npm-global/bin 31 | export PATH=${PATH}:$HOME/.gem/ruby/2.7.0/bin 32 | # export GOOGLE_APPLICATION_CREDENTIALS=~/.config/gcloud/application_default_credentials.json 33 | 34 | # export NVM_DIR="$HOME/.nvm" 35 | export BAT_THEME="ansi" 36 | 37 | export PROMPT_COMMAND="history -a; history -c; history -r; $PROMPT_COMMAND" 38 | export PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'printf "\033_%s\033\\" "${PWD##*/}"' 39 | # export GIT_PROMPT_THEME=Custom 40 | # export GIT_PROMPT_ONLY_IN_REPO=0 41 | 42 | export GOPATH="$HOME/dev/golib:$HOME/dev/go" 43 | 44 | export npm_config_prefix="$HOME/.npm-global" 45 | export NODE_PATH=$(npm root -g) 46 | export NODE_OPTIONS=--no-deprecation 47 | export JSII_SILENCE_WARNING_UNTESTED_NODE_VERSION=true 48 | -------------------------------------------------------------------------------- /bash/input.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | bind '"\e[A": history-search-backward' 4 | bind '"\e[B": history-search-forward' 5 | bind '"\eOA": history-search-backward' 6 | bind '"\eOB": history-search-forward' 7 | 8 | -------------------------------------------------------------------------------- /bash/inputrc: -------------------------------------------------------------------------------- 1 | set completion-map-case on 2 | set editing-mode vi 3 | set show-mode-in-prompt on 4 | set vi-cmd-mode-string " \1\e[1;31m\2⣿\1\e[0m\2" 5 | set vi-ins-mode-string " \1\e[1;33m\2⟫\1\e[0m\2" 6 | 7 | set colored-stats on 8 | set visible-stats on 9 | set page-completions off 10 | set enable-bracketed-paste 11 | 12 | set keymap vi-command 13 | "H": beginning-of-line 14 | "L": end-of-line 15 | "k": history-search-backward 16 | "j": history-search-forward 17 | "cl": clear-screen 18 | "dL": kill-line 19 | "dH": backward-kill-line 20 | "gcc": insert-comment 21 | 22 | -------------------------------------------------------------------------------- /cspell/cspell.config.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | $schema: https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json 3 | version: '0.2' 4 | dictionaryDefinitions: 5 | - name: nvim-spell 6 | path: '~/.config/nvim/spell/en.utf-8.add' 7 | addWords: true 8 | - name: cspell 9 | path: '~/.config/nvim/spell/cspell.txt' 10 | addWords: true 11 | dictionaries: 12 | - nvim-spell 13 | - cspell 14 | -------------------------------------------------------------------------------- /dunst/dunstrc: -------------------------------------------------------------------------------- 1 | [global] 2 | font = Fira Code Regular 10 3 | 4 | # allow a small subset of html markup: 5 | # bold 6 | # italic 7 | # strikethrough 8 | # underline 9 | # 10 | # for a complete reference see http://developer.gnome.org/pango/stable/PangoMarkupFormat.html 11 | # If markup is not allowed, those tags will be stripped out of the message. 12 | allow_markup = yes 13 | 14 | # The format of the message. Possible variables are: 15 | # %a appname 16 | # %s summary 17 | # %b body 18 | # %i iconname (including its path) 19 | # %I iconname (without its path) 20 | # %p progress value if set ([ 0%] to [100%]) or nothing 21 | # Markup is allowed 22 | format = "%a\n\n%s\n%b" 23 | 24 | # When word_wrap is set to no, specify where to ellipsize long lines. 25 | # Possible values are "start", "middle" and "end". 26 | ellipsize = middle 27 | 28 | # Sort messages by urgency 29 | sort = yes 30 | 31 | # Show how many messages are currently hidden (because of geometry) 32 | indicate_hidden = yes 33 | 34 | # alignment of message text. 35 | # Possible values are "left", "center" and "right" 36 | alignment = left 37 | 38 | # The frequency with wich text that is longer than the notification 39 | # window allows bounces back and forth. 40 | # This option conflicts with 'word_wrap'. 41 | # Set to 0 to disable 42 | bounce_freq = 0 43 | 44 | # show age of message if message is older than show_age_threshold seconds. 45 | # set to -1 to disable 46 | show_age_threshold = 60 47 | 48 | # split notifications into multiple lines if they don't fit into geometry 49 | word_wrap = yes 50 | 51 | # ignore newlines '\n' in notifications 52 | ignore_newline = no 53 | 54 | 55 | # the geometry of the window 56 | # geometry [{width}]x{height}][+/-{x}+/-{y}] 57 | # The geometry of the message window. 58 | # The height is measured in number of notifications everything else in pixels. If the width 59 | # is omitted but the height is given ("-geometry x2"), the message window 60 | # expands over the whole screen (dmenu-like). If width is 0, 61 | # the window expands to the longest message displayed. 62 | # A positive x is measured from the left, a negative from the 63 | # right side of the screen. Y is measured from the top and down respectevly. 64 | # The width can be negative. In this case the actual width is the 65 | # screen width minus the width defined in within the geometry option. 66 | geometry = "500x5-30+20" 67 | 68 | # The transparency of the window. range: [0; 100] 69 | # This option will only work if a compositing windowmanager is present (e.g. xcompmgr, compiz, etc..) 70 | transparency = 0 71 | 72 | # Don't remove messages, if the user is idle (no mouse or keyboard input) 73 | # for longer than idle_threshold seconds. 74 | # Set to 0 to disable. 75 | idle_threshold = 120 76 | 77 | # Which monitor should the notifications be displayed on. 78 | monitor = 1 79 | 80 | # Define the title of the windows spawned by dunst 81 | title = Dunst 82 | 83 | # Define the class of the windows spawned by dunst 84 | class = Dunst 85 | 86 | # Display notification on focused monitor. Possible modes are: 87 | # mouse: follow mouse pointer 88 | # keyboard: follow window with keyboard focus 89 | # none: don't follow anything 90 | # 91 | # "keyboard" needs a windowmanager that exports the _NET_ACTIVE_WINDOW property. 92 | # This should be the case for almost all modern windowmanagers. 93 | # 94 | # If this option is set to mouse or keyboard, the monitor option will be 95 | # ignored. 96 | follow = keyboard 97 | 98 | # should a notification popped up from history be sticky or 99 | # timeout as if it would normally do. 100 | sticky_history = yes 101 | 102 | # Display indicators for URLs (U) and actions (A). 103 | show_indicators = no 104 | 105 | # The height of a single line. If the height is smaller than the font height, 106 | # it will get raised to the font height. 107 | # This adds empty space above and under the text. 108 | line_height = 0 109 | 110 | # Draw a line of 'separatpr_height' pixel height between two notifications. 111 | # Set to 0 to disable 112 | separator_height = 2 113 | 114 | # padding between text and separator 115 | padding = 8 116 | 117 | # horizontal padding 118 | horizontal_padding = 8 119 | 120 | # Define a color for the separator. 121 | # possible values are: 122 | # * auto: dunst tries to find a color fitting to the background 123 | # * foreground: use the same color as the foreground 124 | # * frame: use the same color as the frame. 125 | # * anything else will be interpreted as a X color 126 | separator_color = frame 127 | 128 | # print a notification on startup 129 | # This is mainly for error detection, since dbus (re-)starts dunst 130 | # automatically after a crash. 131 | startup_notification = false 132 | 133 | # dmenu path 134 | dmenu = rofi -dmenu 135 | 136 | # browser for opening urls in context menu 137 | browser = opera-beta -new-tab 138 | 139 | # Align icons left/right/off 140 | icon_position = left 141 | 142 | # Paths to default icons. 143 | # icon_path = /usr/share/icons/Papirus-Dark/24x24/panel/:/usr/share/icons/Papirus-Dark/24x24/devices/:/usr/share/icons/Papirus-Dark/24x24/apps:/usr/share/icons/Papirus-Dark/24x24/actions 144 | 145 | # Limit icons size 146 | max_icon_size=32 147 | 148 | [frame] 149 | width = 2 150 | color = "#000000" 151 | 152 | [shortcuts] 153 | # shortcuts are specified as [modifier+][modifier+]...key 154 | # available modifiers are 'ctrl', 'mod1' (the alt-key), 'mod2', 'mod3' 155 | # and 'mod4' (windows-key) 156 | # xev might be helpful to find names for keys 157 | 158 | # close notification 159 | close = ctrl+space 160 | 161 | # close all notifications 162 | close_all = ctrl+shift+space 163 | 164 | # redisplay last message(s) 165 | history = ctrl+grave 166 | 167 | context = ctrl+shift+period 168 | 169 | [urgency_low] 170 | # IMPORTANT: colors have to be defined in quotation marks. 171 | # Otherwise the '#' and following would be interpreted as a comment. 172 | background = "#1a1a1a" 173 | foreground = "#5c6370" 174 | timeout = 10 175 | 176 | [urgency_normal] 177 | background = "#1a1a1a" 178 | foreground = "#abb2bf" 179 | timeout = 10 180 | 181 | [urgency_critical] 182 | background = "#1a1a1a" 183 | foreground = "#abb2bf" 184 | frame_color = "#be5046" 185 | timeout = 0 186 | 187 | 188 | # Every section that isn't one of the above is interpreted as a rules 189 | # to override settings for certain messages. 190 | # Messages can be matched by 'appname', 'summary', 'body' or 'icon' 191 | # and you can override the 'timeout', 'urgency', 'foreground', 'background' 192 | # and 'format'. 193 | # Shell-like globbing will get expanded. 194 | # 195 | # SCRIPTING 196 | # you can specify a script that gets run when the rule matches by setting 197 | # the 'script' option. 198 | # The script will be called as follows: 199 | # script appname summary body icon urgency 200 | # where urgency can be "LOW", "NORMAL" or "CRITICAL". 201 | # 202 | # NOTE: if you don't want a notification to be displayed, set the format to "" 203 | # NOTE: It might be helpful to run dunst -print in a terminal in order to find 204 | # fitting options for rules. 205 | 206 | #[espeak] 207 | # summary = "*" 208 | # script = dunst_espeak.sh 209 | 210 | #[script-test] 211 | # summary = "*script*" 212 | # script = dunst_test.sh 213 | 214 | #[ignore] 215 | ## This notification will not be displayed 216 | # summary = "foobar" 217 | # format = "" 218 | 219 | -------------------------------------------------------------------------------- /fzf-ignore: -------------------------------------------------------------------------------- 1 | *.ttf 2 | *.woff 3 | *.woff2 4 | *.eot 5 | *.png 6 | *.jpg 7 | *.jepg 8 | *.gif 9 | *.zip 10 | *.rar 11 | *.lock 12 | *.svg 13 | package-lock.json 14 | -------------------------------------------------------------------------------- /git/.git-prompt-colors.sh: -------------------------------------------------------------------------------- 1 | # This theme for gitprompt.sh is optimized for the "Solarized Dark" and "Solarized Light" color schemes 2 | # tweaked for Ubuntu terminal fonts 3 | # some modifications on colors 4 | # added ruby prompt, and kernel version as well 5 | 6 | override_git_prompt_colors() { 7 | if [ -e ~/.rvm/bin/rvm-prompt ]; then 8 | RUBY_PROMPT='{$(~/.rvm/bin/rvm-prompt i v)}' 9 | else 10 | if command -v rbenv >/dev/null; then 11 | RUBY_PROMPT='{$(rbenv version | sed -e "s/ (set.*$//")}' 12 | fi 13 | fi 14 | Time12a="\$(date +%H:%M)" 15 | 16 | function getKubeCluster { 17 | context=$(kubectl config current-context) 18 | if [[ $context == *Dev* ]]; then 19 | printf " \033[0;34m●" 20 | elif [[ $context == *Stg* ]]; then 21 | printf " \033[0;33m●" 22 | elif [[ $context == *Prd* ]]; then 23 | printf " \033[0;31m●" 24 | fi 25 | } 26 | kubecluster='$(getKubeCluster)' 27 | 28 | GIT_PROMPT_THEME_NAME="Solarized Extravagant" 29 | GIT_PROMPT_STAGED="${Yellow}● " 30 | GIT_PROMPT_UNTRACKED="${Cyan}… " 31 | GIT_PROMPT_STASHED="${BoldMagenta}⚑ " 32 | GIT_PROMPT_CLEAN="${Green}✔ " 33 | GIT_PROMPT_COMMAND_OK="${Green}✔ " 34 | GIT_PROMPT_COMMAND_FAIL="${Red}✘ " 35 | 36 | KERNEL_PROMPT='' 37 | 38 | GIT_PROMPT_START_USER="_LAST_COMMAND_INDICATOR_${Yellow}${PathShort}${kubecluster}" 39 | GIT_PROMPT_START_ROOT="${GIT_PROMPT_START_USER}" 40 | if [ -n "$SSH_CLIENT" ]; then 41 | GIT_PROMPT_END_USER="\n${BoldRed} ➤ ${ResetColor}" 42 | GIT_PROMPT_END_ROOT="\n${BoldRed} » ${ResetColor}" 43 | else 44 | GIT_PROMPT_END_USER="\n${BoldBlue}${ResetColor}" 45 | GIT_PROMPT_END_ROOT="\n${BoldRed} # ${ResetColor}" 46 | fi 47 | GIT_PROMPT_LEADING_SPACE=1 48 | GIT_PROMPT_PREFIX="${Cyan}[" 49 | GIT_PROMPT_SUFFIX="${Cyan}]" 50 | GIT_PROMPT_SYMBOLS_NO_REMOTE_TRACKING="✭" 51 | } 52 | 53 | reload_git_prompt_colors "Solarized Extravagant" 54 | -------------------------------------------------------------------------------- /git/.gitconfig: -------------------------------------------------------------------------------- 1 | [user] 2 | name = Lukas Reineke 3 | email = lukas@reineke.jp 4 | signingkey = C03A5FC76BD42CC0F1CFE39BA1C64B976A2BE9E5 5 | 6 | [advice] 7 | pushNonFastForward = false 8 | statusHints = false 9 | commitBeforeMerge = false 10 | resolveConflict = false 11 | implicitIdentity = false 12 | detachedHead = false 13 | 14 | [core] 15 | excludesfile = ~/dotfiles/git/gitignore_global 16 | autocrlf = false 17 | editor = nvim 18 | pager = delta 19 | 20 | [clean] 21 | requireForce = false 22 | 23 | [diff] 24 | tool = nvim 25 | 26 | [interactive] 27 | diffFilter = delta --color-only 28 | 29 | [merge] 30 | tool = nvim 31 | conflictstyle = diff3 32 | 33 | [mergetool] 34 | keepBackup = false 35 | 36 | [mergetool "nvim"] 37 | cmd = ~/dotfiles/scripts/git-merge.sh $MERGED 38 | trustExitCode = true 39 | 40 | [commit] 41 | verbose = true 42 | gpgsign = true 43 | 44 | [pull] 45 | rebase = true 46 | 47 | [branch] 48 | autosetupmerge = always 49 | autosetuprebase = always 50 | sort = -committerdate 51 | 52 | [rebase] 53 | autosquash = true 54 | autostash = true 55 | 56 | [fetch] 57 | prune = true 58 | 59 | [init] 60 | templatedir = ~/dotfiles/git/templates 61 | defaultBranch = main 62 | 63 | [rerere] 64 | enabled = true 65 | 66 | [color] 67 | ui = true 68 | 69 | [push] 70 | default = current 71 | 72 | [url "git@github.com:"] 73 | insteadOf = https://github.com/ 74 | -------------------------------------------------------------------------------- /git/git.scmbrc: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # 4 | # Git File Shortcuts Config 5 | # ---------------------------------------------- 6 | # - Set your preferred prefix for env variable file shortcuts. 7 | # (I chose 'e' because it is easy to slide your finger to it from '$'.) 8 | export git_env_char="e" 9 | # - Max changed files before reverting to 'git status'. git_status_shortcuts() will be slower for lots of changed files. 10 | export gs_max_changes="150" 11 | # - When using the git_add_shorcuts() command, automatically invoke 'git rm' to remove deleted files? 12 | export ga_auto_remove="yes" 13 | 14 | # - Set the following option to 'no' if you want to use your existing git aliases 15 | # instead of overwriting them. 16 | # Note: Bash tab completion will not be automatically set up for your aliases if you disable this option. 17 | export git_setup_aliases="yes" 18 | 19 | 20 | # Git Index Config 21 | # ---------------------------------------------- 22 | # Repos will be automatically added from this directory. 23 | export GIT_REPO_DIR="$HOME/dev" 24 | # Add the full paths of any extra repos to GIT_REPOS, separated with ':' 25 | # e.g. "/opt/rails/project:/opt/rails/another project:$HOME/other/repo" 26 | export GIT_REPOS="" 27 | export git_status_command="git_status_shortcuts" 28 | # Alias 29 | git_index_alias="cww" # Switch to a repo in the (c)ode directory 30 | 31 | 32 | # Git Aliases 33 | # ---------------------------------------------- 34 | git_alias="g" 35 | 36 | # 1. 'SCM Breeze' functions 37 | git_status_shortcuts_alias="gs" 38 | git_add_shortcuts_alias="ga" 39 | git_add_patch_alias="gap" 40 | git_add_updated_alias="gau" 41 | git_show_files_alias="gsf" 42 | exec_scmb_expand_args_alias="ge" 43 | # 2. Commands that handle paths (with shortcut args expanded) 44 | git_checkout_alias="gco" 45 | git_checkout_branch_alias="gcb" 46 | git_commit_alias="gc" 47 | git_commit_verbose_alias="gcv" 48 | git_reset_alias="grs" 49 | git_reset_hard_alias="grsh" 50 | git_rm_alias="grm" 51 | git_blame_alias="gbl" 52 | # git_diff_alias="gd" 53 | git_diff_no_whitespace_alias="gd" 54 | git_diff_file_alias="gdf" 55 | git_diff_word_alias="gdw" 56 | git_diff_cached_alias="gdc" 57 | git_difftool_alias="gdt" 58 | # 3. Standard commands 59 | git_clone_alias="gcl" 60 | git_fetch_alias="gf" 61 | git_fetch_all_alias="gfa" 62 | git_fetch_and_rebase_alias="gfr" 63 | git_pull_alias="gpl" 64 | git_pull_rebase_alias="gplr" 65 | git_push_alias="gps" 66 | git_push_force_alias="gpsf" 67 | git_pull_then_push_alias="gpls" 68 | git_status_original_alias="gst" 69 | git_status_short_alias="gss" 70 | git_clean_alias="gce" 71 | git_clean_force_alias="gcef" 72 | git_add_all_alias="gaa" 73 | # git_commit_all_alias="gca" 74 | git_commit_amend_alias="gca" 75 | git_commit_amend_no_msg_alias="gcah" 76 | git_commit_no_msg_alias="gch" 77 | git_remote_alias="gr" 78 | git_branch_alias="gb" 79 | git_branch_all_alias="gba" 80 | git_branch_move_alias="gbm" 81 | git_branch_delete_alias="gbd" 82 | git_branch_delete_force_alias="gbD" 83 | git_rebase_alias="grb" 84 | git_rebase_interactive_alias="grbi" 85 | git_rebase_alias_continue="grbc" 86 | git_rebase_alias_abort="grba" 87 | git_reset_last_commit="grsl" 88 | git_merge_alias="gm" 89 | git_merge_no_fast_forward_alias="gmnff" 90 | git_merge_only_fast_forward_alias="gmff" 91 | git_cherry_pick_alias="gcp" 92 | git_log_alias="gl" 93 | git_log_all_alias="gla" 94 | git_log_stat_alias="gls" 95 | git_log_graph_alias="glg" 96 | git_show_alias="gsh" 97 | git_show_summary="gsm" # (gss taken by git status short) 98 | git_stash_alias="gash" 99 | git_stash_apply_alias="gasha" 100 | git_stash_pop_alias="gashp" 101 | git_stash_list_alias="gashl" 102 | git_tag_alias="gtt" 103 | git_top_level_alias="gtop" 104 | git_whatchanged_alias="gwc" 105 | # Hub aliases (https://github.com/github/hub) 106 | git_pull_request_alias="gpr" 107 | 108 | 109 | # Git Keyboard Shortcuts 110 | # ---------------------------------------------- 111 | # Keyboard shortcuts are on by default. Set this to 'false' to disable them. 112 | git_keyboard_shortcuts_enabled="true" 113 | git_commit_all_keys="\C-x " # CTRL+x, SPACE 114 | git_add_and_commit_keys="\C-xc" # CTRL+x, c 115 | git_commit_all_with_ci_skip_keys="\C-xv" # CTRL+x, v (Appends [ci skip] to commit message) 116 | 117 | 118 | # Shell Command Wrapping 119 | # ---------------------------------------------- 120 | # Expand numbered args for common shell commands 121 | shell_command_wrapping_enabled="true" 122 | # Here you can tweak the list of wrapped commands. 123 | scmb_wrapped_shell_commands="vim emacs gedit cat rm cp mv ln cd v" 124 | # Add numbered shortcuts to output of ls -l, just like 'git status' 125 | shell_ls_aliases_enabled="true" 126 | -------------------------------------------------------------------------------- /git/gitignore_global: -------------------------------------------------------------------------------- 1 | *~ 2 | *.DS_Store 3 | .env.sh 4 | .env.gpg 5 | .tern-project 6 | venv-* 7 | tags 8 | Session.vim 9 | .AppleDouble 10 | .LSOverride 11 | ._* 12 | .DocumentRevisions-V100 13 | .fseventsd 14 | .Spotlight-V100 15 | .TemporaryItems 16 | .Trashes 17 | .VolumeIcon.icns 18 | .com.apple.timemachine.donotpresent 19 | .AppleDB 20 | .AppleDesktop 21 | .apdisk 22 | .htmlhintrc 23 | .projections.json 24 | .git 25 | .luarc.json 26 | .fzf-ignore 27 | .nvim.lua 28 | -------------------------------------------------------------------------------- /git/templates/hooks/pre-commit: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | NO_COMMIT=$(git diff --cached | grep '^+.*NO_COMMIT') 3 | 4 | if [ -n "$NO_COMMIT" ]; then 5 | printf "no cake for you\n" 6 | echo "$NO_COMMIT" 7 | exit 1 8 | fi 9 | -------------------------------------------------------------------------------- /git/templates/hooks/prepare-commit-msg: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | BRANCH=$(git branch | grep '^\*' | cut -b3- | cut -f1,2 -d'-') 3 | BRANCHTYPE=${BRANCH%/*} 4 | FILE=$(cat "$1") 5 | 6 | FIRSTLINE=$(sed -n "1p" "$1") 7 | if [[ -z $FIRSTLINE ]]; then 8 | echo -e "$BRANCHTYPE: $FILE" >"$1" 9 | fi 10 | -------------------------------------------------------------------------------- /hypr/hypridle.conf: -------------------------------------------------------------------------------- 1 | general { 2 | lock_cmd = pidof hyprlock || hyprlock 3 | before_sleep_cmd = hyprlock 4 | after_sleep_cmd = hyprctl dispatch dpms off DP-8 && hyprctl dispatch dpms on DP-8 5 | } 6 | 7 | # 8 | # listener { 9 | # timeout = 1790 10 | # on-timeout = loginctl lock-session 11 | # } 12 | # 13 | # listener { 14 | # timeout = 1800 15 | # on-timeout = systemctl suspend -i 16 | # } 17 | -------------------------------------------------------------------------------- /hypr/hyprlock.conf: -------------------------------------------------------------------------------- 1 | general { 2 | disable_loading_bar = true 3 | hide_cursor = true 4 | # no_fade_in = true 5 | } 6 | 7 | background { 8 | monitor = 9 | path = /home/lukas/Pictures/wallpaper/wallhaven-6d7xyq.jpg 10 | blur_passes = 2 11 | contrast = 0.8916 12 | brightness = 1.1 13 | # vibrancy = 0.1696 14 | vibrancy_darkness = 0.0 15 | } 16 | 17 | # label { 18 | # monitor = DP-3 19 | # text = $TIME 20 | # text = cmd[update:1000] echo "$(date "+%I:%M %p")" 21 | # color = rgb(000000) 22 | # font_size = 20 23 | # font_family = Fira Code Semibold 24 | # 25 | # position = 0, 0 26 | # halign = right 27 | # valign = top 28 | # } 29 | 30 | input-field { 31 | monitor = DP-1 32 | size = 200, 40 33 | outline_thickness = 3 34 | outer_color = rgb(1f1f1f) 35 | inner_color = rgb(1a1a1a) 36 | font_color = rgb(3B4048) 37 | fade_on_empty = true 38 | placeholder-text = Password... 39 | 40 | position = 0, -20 41 | halign = center 42 | valign = center 43 | } 44 | 45 | label { 46 | monitor = DP-1 47 | text = Lukas 48 | color = rgb(000000) 49 | font_size = 25 50 | font_family = Fira Code Semibold 51 | 52 | position = 0, 80 53 | halign = center 54 | valign = center 55 | } 56 | 57 | image { 58 | monitor = DP-1 59 | path = $HOME/Pictures/profile.jpg 60 | size = 200 61 | rounding = -1 62 | border_size = 4 63 | border_color = rgb(000000) 64 | reload_time = -1 65 | position = 0, 230 66 | halign = center 67 | valign = center 68 | } 69 | -------------------------------------------------------------------------------- /hypr/hyprpaper.conf: -------------------------------------------------------------------------------- 1 | preload = ~/Pictures/wallpaper/wallhaven-6d7xyq.jpg 2 | wallpaper = , ~/Pictures/wallpaper/wallhaven-6d7xyq.jpg 3 | -------------------------------------------------------------------------------- /hypr/next-workspace.py: -------------------------------------------------------------------------------- 1 | # Moves to the next workspace on the current monitor 2 | 3 | import json 4 | import subprocess 5 | 6 | 7 | def run(cmd): 8 | return subprocess.run(cmd, shell=True, check=True, stdout=subprocess.PIPE, text=True).stdout 9 | 10 | 11 | def find_next_id_in_group(id, id_list): 12 | # Determine the group's start and end IDs based on the given ID 13 | group_start = ((id - 1) // 10) * 10 + 1 14 | group_end = group_start + 9 15 | 16 | # Filter IDs to only those in the same group 17 | group_ids = sorted([x for x in id_list if group_start <= x <= group_end]) 18 | 19 | # Find the next ID in the group, or loop around if necessary 20 | for next_id in group_ids: 21 | if next_id > id: 22 | return next_id 23 | return group_ids[0] if group_ids else None 24 | 25 | 26 | active_worspace = json.loads(run("hyprctl activeworkspace -j")) 27 | workspaces = json.loads(run("hyprctl workspaces -j")) 28 | 29 | ids = [workspace["id"] for workspace in workspaces] 30 | next_id = find_next_id_in_group(active_worspace["id"], ids) 31 | 32 | if next_id: 33 | run(f"hyprctl dispatch workspace {next_id}") 34 | -------------------------------------------------------------------------------- /kitty/kitty.conf: -------------------------------------------------------------------------------- 1 | 2 | font_family Fira Code 3 | bold_font Fira Code Bold 4 | italic_font Hasklig Medium Italic 5 | bold_italic_font InputMonoCondensed BoldIta 6 | modify_font underline_thickness 0.5 7 | modify_font underline_position 18 8 | modify_font strikethrough_position -3px 9 | 10 | font_size 11 11 | 12 | enable_audio_bell no 13 | confirm_os_window_close 0 14 | 15 | url_color #98C379 16 | url_style single 17 | cursor #98C379 18 | foreground #8C919A 19 | background #1F1F1F 20 | 21 | color0 #282C34 22 | color1 #E06C75 23 | color2 #98C379 24 | color3 #E5C07B 25 | color4 #61AFEF 26 | color5 #C678DD 27 | color6 #56B6C2 28 | color7 #ABB2BF 29 | color8 #3E4452 30 | color9 #BE5046 31 | color10 #98C379 32 | color11 #D19A66 33 | color12 #61AFEF 34 | color13 #C678DD 35 | color14 #56B6C2 36 | color15 #5C6370 37 | -------------------------------------------------------------------------------- /lib/cd-history.bash: -------------------------------------------------------------------------------- 1 | if [[ -z $CD_HISTORY_FILE ]] ; then 2 | export CD_HISTORY_FILE="$HOME/.cd-history" 3 | fi 4 | 5 | if [[ ! -f $CD_HISTORY_FILE ]]; then 6 | touch $CD_HISTORY_FILE 7 | fi 8 | 9 | function cd-history-save() { 10 | local PWD="$(pwd)" 11 | perl -p -i -e "s#${PWD}\n##g" $CD_HISTORY_FILE 12 | echo "$(pwd)" >> $CD_HISTORY_FILE 13 | } 14 | 15 | fzfcmd() { 16 | echo "fzf --height 20% --reverse" 17 | } 18 | 19 | function cdh() { 20 | local jumpline=$(cat ${CD_HISTORY_FILE} | $(fzfcmd) --bind=ctrl-y:accept --tac) 21 | if [[ -n ${jumpline} ]]; then 22 | local jumpdir=$(echo "${jumpline}" | sed "s#~#$HOME#") 23 | perl -p -i -e "s#${jumpline}\n##g" $CD_HISTORY_FILE 24 | cd "${jumpdir}" && echo "${jumpline}" >> $CD_HISTORY_FILE 25 | fi 26 | } 27 | 28 | -------------------------------------------------------------------------------- /lib/git-flow-completion.bash: -------------------------------------------------------------------------------- 1 | #!bash 2 | # 3 | # git-flow-completion 4 | # =================== 5 | # 6 | # Bash completion support for 7 | #[git-flow](http://github.com/nvie/gitflow) 8 | # 9 | # The contained completion routines provide support for completing: 10 | # 11 | # * git-flow init and version 12 | # * feature, hotfix and release branches 13 | # * remote feature, hotfix and release branch names 14 | # 15 | # 16 | # Installation 17 | # ------------ 18 | # 19 | # To achieve git-flow completion nirvana: 20 | # 21 | # 0. Install git-completion. 22 | # 23 | # 1. Install this file. Either: 24 | # 25 | # a. Place it in a `bash-completion.d` folder: 26 | # 27 | # * /etc/bash-completion.d 28 | # * /usr/local/etc/bash-completion.d 29 | # * ~/bash-completion.d 30 | # 31 | # b. Or, copy it somewhere (e.g. ~/.git-flow-completion.sh) and 32 | #put the following line in 33 | # your .bashrc: 34 | # 35 | # source ~/.git-flow-completion.sh 36 | # 37 | # 2. If you are using Git < 1.7.1: Edit git-completion.sh and add 38 | #the following line to the giant 39 | # $command case in _git: 40 | # 41 | # flow) _git_flow ;; 42 | # 43 | # 44 | # The Fine Print 45 | # -------------- 46 | # 47 | # Copyright (c) 2010-2015 [Justin Hileman](http://justinhileman.com) 48 | # 49 | # Distributed under the [MIT 50 | #License](http://creativecommons.org/licenses/MIT/) 51 | 52 | _git_flow () 53 | { 54 | local subcommands="init feature release hotfix support help 55 | version" 56 | local subcommand="$(__git_find_on_cmdline "$subcommands")" 57 | if [ -z "$subcommand" ]; then 58 | __gitcomp "$subcommands" 59 | return 60 | fi 61 | 62 | case "$subcommand" in 63 | init) 64 | __git_flow_init 65 | return 66 | ;; 67 | feature) 68 | __git_flow_feature 69 | return 70 | ;; 71 | release) 72 | __git_flow_release 73 | return 74 | ;; 75 | hotfix) 76 | __git_flow_hotfix 77 | return 78 | ;; 79 | support) 80 | __git_flow_support 81 | return 82 | ;; 83 | *) 84 | COMPREPLY=() 85 | ;; 86 | esac 87 | } 88 | 89 | __git_flow_init () 90 | { 91 | local subcommands="help" 92 | local subcommand="$(__git_find_on_cmdline "$subcommands")" 93 | if [ -z "$subcommand" ]; then 94 | __gitcomp "$subcommands" 95 | return 96 | fi 97 | } 98 | 99 | __git_flow_feature () 100 | { 101 | local subcommands="list start finish publish track diff 102 | rebase checkout pull help" 103 | local subcommand="$(__git_find_on_cmdline "$subcommands")" 104 | if [ -z "$subcommand" ]; then 105 | __gitcomp "$subcommands" 106 | return 107 | fi 108 | 109 | case "$subcommand" in 110 | pull) 111 | __gitcomp "$(__git_remotes)" 112 | return 113 | ;; 114 | checkout|finish|diff|rebase) 115 | __gitcomp "$(__git_flow_list_branches 'feature')" 116 | return 117 | ;; 118 | publish) 119 | __gitcomp "$(comm -23 <(__git_flow_list_branches 120 | 'feature') <(__git_flow_list_remote_branches 'feature'))" 121 | return 122 | ;; 123 | track) 124 | __gitcomp "$(comm -23 125 | <(__git_flow_list_remote_branches 'feature') 126 | <(__git_flow_list_branches 'feature'))" 127 | return 128 | ;; 129 | *) 130 | COMPREPLY=() 131 | ;; 132 | esac 133 | } 134 | 135 | __git_flow_release () 136 | { 137 | local subcommands="list start finish track publish help" 138 | local subcommand="$(__git_find_on_cmdline "$subcommands")" 139 | if [ -z "$subcommand" ]; then 140 | __gitcomp "$subcommands" 141 | return 142 | fi 143 | 144 | case "$subcommand" in 145 | finish) 146 | __gitcomp "$(__git_flow_list_branches 'release')" 147 | return 148 | ;; 149 | publish) 150 | __gitcomp "$(comm -23 <(__git_flow_list_branches 151 | 'release') <(__git_flow_list_remote_branches 'release'))" 152 | return 153 | ;; 154 | track) 155 | __gitcomp "$(comm -23 156 | <(__git_flow_list_remote_branches 'release') 157 | <(__git_flow_list_branches 'release'))" 158 | return 159 | ;; 160 | *) 161 | COMPREPLY=() 162 | ;; 163 | esac 164 | 165 | } 166 | 167 | __git_flow_hotfix () 168 | { 169 | local subcommands="list start finish track publish help" 170 | local subcommand="$(__git_find_on_cmdline "$subcommands")" 171 | if [ -z "$subcommand" ]; then 172 | __gitcomp "$subcommands" 173 | return 174 | fi 175 | 176 | case "$subcommand" in 177 | finish) 178 | __gitcomp "$(__git_flow_list_branches 'hotfix')" 179 | return 180 | ;; 181 | publish) 182 | __gitcomp "$(comm -23 <(__git_flow_list_branches 183 | 'hotfix') <(__git_flow_list_remote_branches 'hotfix'))" 184 | return 185 | ;; 186 | track) 187 | __gitcomp "$(comm -23 188 | <(__git_flow_list_remote_branches 'hotfix') 189 | <(__git_flow_list_branches 'hotfix'))" 190 | return 191 | ;; 192 | *) 193 | COMPREPLY=() 194 | ;; 195 | esac 196 | } 197 | 198 | __git_flow_support () 199 | { 200 | local subcommands="list start help" 201 | local subcommand="$(__git_find_on_cmdline "$subcommands")" 202 | if [ -z "$subcommand" ]; then 203 | __gitcomp "$subcommands" 204 | return 205 | fi 206 | 207 | case "$subcommand" in 208 | *) 209 | COMPREPLY=() 210 | ;; 211 | esac 212 | } 213 | 214 | __git_flow_prefix () 215 | { 216 | case "$1" in 217 | feature|release|hotfix) 218 | git config "gitflow.prefix.$1" 2> /dev/null || echo 219 | "$1/" 220 | return 221 | ;; 222 | esac 223 | } 224 | 225 | __git_flow_list_branches () 226 | { 227 | local prefix="$(__git_flow_prefix $1)" 228 | git branch --no-color 2> /dev/null | tr -d ' |*' | grep 229 | --color=never "^$prefix" | sed s,^$prefix,, | sort 230 | } 231 | 232 | __git_flow_list_remote_branches () 233 | { 234 | local prefix="$(__git_flow_prefix $1)" 235 | local origin="$(git config gitflow.origin 2> /dev/null || 236 | echo "origin")" 237 | git branch --no-color -r 2> /dev/null | sed "s/^ *//g" | grep 238 | --color=never "^$origin/$prefix" | sed s,^$origin/$prefix,, | sort 239 | } 240 | 241 | # alias __git_find_on_cmdline for backwards compatibility 242 | if [ -z "`type -t __git_find_on_cmdline`" ]; then 243 | alias __git_find_on_cmdline=__git_find_subcommand 244 | fi 245 | -------------------------------------------------------------------------------- /lib/npm-completion.bash: -------------------------------------------------------------------------------- 1 | ###-begin-npm-completion-### 2 | # 3 | # npm command completion script 4 | # 5 | # Installation: npm completion >> ~/.bashrc (or ~/.zshrc) 6 | # Or, maybe: npm completion > /usr/local/etc/bash_completion.d/npm 7 | # 8 | 9 | if type complete &>/dev/null; then 10 | _npm_completion () { 11 | local words cword 12 | if type _get_comp_words_by_ref &>/dev/null; then 13 | _get_comp_words_by_ref -n = -n @ -w words -i cword 14 | else 15 | cword="$COMP_CWORD" 16 | words=("${COMP_WORDS[@]}") 17 | fi 18 | 19 | local si="$IFS" 20 | IFS=$'\n' COMPREPLY=($(COMP_CWORD="$cword" \ 21 | COMP_LINE="$COMP_LINE" \ 22 | COMP_POINT="$COMP_POINT" \ 23 | npm completion -- "${words[@]}" \ 24 | 2>/dev/null)) || return $? 25 | IFS="$si" 26 | } 27 | complete -o default -F _npm_completion npm 28 | elif type compdef &>/dev/null; then 29 | _npm_completion() { 30 | local si=$IFS 31 | compadd -- $(COMP_CWORD=$((CURRENT-1)) \ 32 | COMP_LINE=$BUFFER \ 33 | COMP_POINT=0 \ 34 | npm completion -- "${words[@]}" \ 35 | 2>/dev/null) 36 | IFS=$si 37 | } 38 | compdef _npm_completion npm 39 | elif type compctl &>/dev/null; then 40 | _npm_completion () { 41 | local cword line point words si 42 | read -Ac words 43 | read -cn cword 44 | let cword-=1 45 | read -l line 46 | read -ln point 47 | si="$IFS" 48 | IFS=$'\n' reply=($(COMP_CWORD="$cword" \ 49 | COMP_LINE="$line" \ 50 | COMP_POINT="$point" \ 51 | npm completion -- "${words[@]}" \ 52 | 2>/dev/null)) || return $? 53 | IFS="$si" 54 | } 55 | compctl -K _npm_completion npm 56 | fi 57 | ###-end-npm-completion-### 58 | -------------------------------------------------------------------------------- /lib/pm2-completion.bash: -------------------------------------------------------------------------------- 1 | # pm2 completion 2 | COMP_WORDBREAKS=${COMP_WORDBREAKS/=/} 3 | COMP_WORDBREAKS=${COMP_WORDBREAKS/@/} 4 | export COMP_WORDBREAKS 5 | 6 | if type complete &>/dev/null; then 7 | _pm2_completion () { 8 | local si="$IFS" 9 | IFS=$'\n' COMPREPLY=($(COMP_CWORD="$COMP_CWORD" \ 10 | COMP_LINE="$COMP_LINE" \ 11 | COMP_POINT="$COMP_POINT" \ 12 | pm2 completion -- "${COMP_WORDS[@]}" \ 13 | 2>/dev/null)) || return $? 14 | IFS="$si" 15 | } 16 | complete -o default -F _pm2_completion pm2 17 | elif type compctl &>/dev/null; then 18 | _pm2_completion () { 19 | local cword line point words si 20 | read -Ac words 21 | read -cn cword 22 | let cword-=1 23 | read -l line 24 | read -ln point 25 | si="$IFS" 26 | IFS=$'\n' reply=($(COMP_CWORD="$cword" \ 27 | COMP_LINE="$line" \ 28 | COMP_POINT="$point" \ 29 | pm2 completion -- "${words[@]}" \ 30 | 2>/dev/null)) || return $? 31 | IFS="$si" 32 | } 33 | compctl -K _pm2_completion + -f + pm2 34 | fi 35 | -------------------------------------------------------------------------------- /pgcli/config: -------------------------------------------------------------------------------- 1 | # vi: ft=dosini 2 | [main] 3 | 4 | # Enables context sensitive auto-completion. If this is disabled the all 5 | # possible completions will be listed. 6 | smart_completion = True 7 | 8 | # Display the completions in several columns. (More completions will be 9 | # visible.) 10 | wider_completion_menu = False 11 | 12 | # Multi-line mode allows breaking up the sql statements into multiple lines. If 13 | # this is set to True, then the end of the statements must have a semi-colon. 14 | # If this is set to False then sql statements can't be split into multiple 15 | # lines. End of line (return) is considered as the end of the statement. 16 | multi_line = False 17 | 18 | # If multi_line_mode is set to "psql", in multi-line mode, [Enter] will execute 19 | # the current input if the input ends in a semicolon. 20 | # If multi_line_mode is set to "safe", in multi-line mode, [Enter] will always 21 | # insert a newline, and [Esc] [Enter] or [Alt]-[Enter] must be used to execute 22 | # a command. 23 | multi_line_mode = psql 24 | 25 | # Destructive warning mode will alert you before executing a sql statement 26 | # that may cause harm to the database such as "drop table", "drop database" 27 | # or "shutdown". 28 | destructive_warning = True 29 | 30 | # Enables expand mode, which is similar to `\x` in psql. 31 | expand = False 32 | 33 | # Enables auto expand mode, which is similar to `\x auto` in psql. 34 | auto_expand = False 35 | 36 | # If set to True, table suggestions will include a table alias 37 | generate_aliases = False 38 | 39 | # log_file location. 40 | # In Unix/Linux: ~/.config/pgcli/log 41 | # In Windows: %USERPROFILE%\AppData\Local\dbcli\pgcli\log 42 | # %USERPROFILE% is typically C:\Users\{username} 43 | log_file = default 44 | 45 | # keyword casing preference. Possible values "lower", "upper", "auto" 46 | keyword_casing = auto 47 | 48 | # casing_file location. 49 | # In Unix/Linux: ~/.config/pgcli/casing 50 | # In Windows: %USERPROFILE%\AppData\Local\dbcli\pgcli\casing 51 | # %USERPROFILE% is typically C:\Users\{username} 52 | casing_file = default 53 | 54 | # If generate_casing_file is set to True and there is no file in the above 55 | # location, one will be generated based on usage in SQL/PLPGSQL functions. 56 | generate_casing_file = False 57 | 58 | # Casing of column headers based on the casing_file described above 59 | case_column_headers = True 60 | 61 | # history_file location. 62 | # In Unix/Linux: ~/.config/pgcli/history 63 | # In Windows: %USERPROFILE%\AppData\Local\dbcli\pgcli\history 64 | # %USERPROFILE% is typically C:\Users\{username} 65 | history_file = default 66 | 67 | # Default log level. Possible values: "CRITICAL", "ERROR", "WARNING", "INFO" 68 | # and "DEBUG". "NONE" disables logging. 69 | log_level = INFO 70 | 71 | # Order of columns when expanding * to column list 72 | # Possible values: "table_order" and "alphabetic" 73 | asterisk_column_order = table_order 74 | 75 | # Whether to qualify with table alias/name when suggesting columns 76 | # Possible values: "always", never" and "if_more_than_one_table" 77 | qualify_columns = if_more_than_one_table 78 | 79 | # When no schema is entered, only suggest objects in search_path 80 | search_path_filter = False 81 | 82 | # Default pager. 83 | # By default 'PAGER' environment variable is used 84 | # pager = less -SRXF 85 | 86 | # Timing of sql statments and table rendering. 87 | timing = True 88 | 89 | # Table format. Possible values: psql, plain, simple, grid, fancy_grid, pipe, 90 | # ascii, double, github, orgtbl, rst, mediawiki, html, latex, latex_booktabs, 91 | # textile, moinmoin, jira, vertical, tsv, csv. 92 | # Recommended: psql, fancy_grid and grid. 93 | table_format = psql 94 | 95 | # Syntax Style. Possible values: manni, igor, xcode, vim, autumn, vs, rrt, 96 | # native, perldoc, borland, tango, emacs, friendly, monokai, paraiso-dark, 97 | # colorful, murphy, bw, pastie, paraiso-light, trac, default, fruity 98 | syntax_style = default 99 | 100 | # Keybindings: 101 | # When Vi mode is enabled you can use modal editing features offered by Vi in the REPL. 102 | # When Vi mode is disabled emacs keybindings such as Ctrl-A for home and Ctrl-E 103 | # for end are available in the REPL. 104 | vi = True 105 | 106 | # Error handling 107 | # When one of multiple SQL statements causes an error, choose to either 108 | # continue executing the remaining statements, or stopping 109 | # Possible values "STOP" or "RESUME" 110 | on_error = STOP 111 | 112 | # Set threshold for row limit. Use 0 to disable limiting. 113 | row_limit = 1000 114 | 115 | # Skip intro on startup and goodbye on exit 116 | less_chatty = False 117 | 118 | # Postgres prompt 119 | # \t - Current date and time 120 | # \u - Username 121 | # \h - Short hostname of the server (up to first '.') 122 | # \H - Hostname of the server 123 | # \d - Database name 124 | # \p - Database port 125 | # \i - Postgres PID 126 | # \# - "@" sign if logged in as superuser, '>' in other case 127 | # \n - Newline 128 | # \dsn_alias - name of dsn alias if -D option is used (empty otherwise) 129 | # \x1b[...m - insert ANSI escape sequence 130 | prompt = '\u@\h:\d> ' 131 | 132 | # Number of lines to reserve for the suggestion menu 133 | min_num_menu_lines = 4 134 | 135 | # Character used to left pad multi-line queries to match the prompt size. 136 | multiline_continuation_char = '' 137 | 138 | # The string used in place of a null value. 139 | null_string = '' 140 | 141 | # manage pager on startup 142 | enable_pager = True 143 | 144 | # Use keyring to automatically save and load password in a secure manner 145 | keyring = False 146 | 147 | # Custom colors for the completion menu, toolbar, etc. 148 | [colors] 149 | completion-menu.completion.current = 'bg:#ffffff #000000' 150 | completion-menu.completion = 'bg:#008888 #ffffff' 151 | completion-menu.meta.completion.current = 'bg:#44aaaa #000000' 152 | completion-menu.meta.completion = 'bg:#448888 #ffffff' 153 | completion-menu.multi-column-meta = 'bg:#aaffff #000000' 154 | scrollbar.arrow = 'bg:#003333' 155 | scrollbar = 'bg:#00aaaa' 156 | selected = '#ffffff bg:#6666aa' 157 | search = '#ffffff bg:#4444aa' 158 | search.current = '#ffffff bg:#44aa44' 159 | bottom-toolbar = 'bg:#222222 #aaaaaa' 160 | bottom-toolbar.off = 'bg:#222222 #888888' 161 | bottom-toolbar.on = 'bg:#222222 #ffffff' 162 | search-toolbar = 'noinherit bold' 163 | search-toolbar.text = 'nobold' 164 | system-toolbar = 'noinherit bold' 165 | arg-toolbar = 'noinherit bold' 166 | arg-toolbar.text = 'nobold' 167 | bottom-toolbar.transaction.valid = 'bg:#222222 #00ff5f bold' 168 | bottom-toolbar.transaction.failed = 'bg:#222222 #ff005f bold' 169 | 170 | # style classes for colored table output 171 | output.header = "#00ff5f bold" 172 | output.odd-row = "" 173 | output.even-row = "" 174 | 175 | # Named queries are queries you can execute by name. 176 | [named queries] 177 | 178 | # DSN to call by -D option 179 | [alias_dsn] 180 | # example_dsn = postgresql://[user[:password]@][netloc][:port][/dbname] 181 | 182 | # Format for number representation 183 | # for decimal "d" - 12345678, ",d" - 12,345,678 184 | # for float "g" - 123456.78, ",g" - 123,456.78 185 | [data_formats] 186 | decimal = "" 187 | float = "" 188 | -------------------------------------------------------------------------------- /picom/picom.conf: -------------------------------------------------------------------------------- 1 | detect-client-opacity = true; 2 | vsync = true; 3 | use-damage = true; 4 | glx-no-stencil = true; 5 | backend = "xrender"; 6 | unredir-if-possible = false; 7 | 8 | animations = true 9 | animation-delta = 10 10 | animation-dampening = 20 11 | animation-window-mass = 1.1 12 | animation-for-workspace-switch-out = "zoom"; 13 | animation-for-workspace-switch-in = "zoom"; 14 | 15 | shadow = true; 16 | shadow-radius = 12; 17 | shadow-opacity = .6; 18 | shadow-offset-x = 1; 19 | shadow-offset-y = 1; 20 | xinerama-shadow-crop = true; 21 | -------------------------------------------------------------------------------- /python/ipython/default_profile.py: -------------------------------------------------------------------------------- 1 | c = get_config() 2 | # load_subconfig("base_config.py") 3 | c.InteractiveShellApp.exec_lines = ["%autoreload 2", "%rehashx"] 4 | c.InteractiveShellApp.extensions = ["autoreload"] 5 | c.AliasManager.user_aliases = [("cl", "clear"), ("gs", "git status")] 6 | c.TerminalIPythonApp.display_banner = False 7 | c.TerminalInteractiveShell.confirm_exit = False 8 | c.TerminalInteractiveShell.editing_mode = "vi" 9 | c.TerminalInteractiveShell.editor = "nvim" 10 | c.TerminalInteractiveShell.extra_open_editor_shortcuts = True 11 | -------------------------------------------------------------------------------- /rofi/config.rasi: -------------------------------------------------------------------------------- 1 | configuration { 2 | /* modi: "window,run,ssh";*/ 3 | /* font: "mono 12";*/ 4 | /* location: 0;*/ 5 | /* yoffset: 0;*/ 6 | /* xoffset: 0;*/ 7 | /* fixed-num-lines: true;*/ 8 | /* show-icons: false;*/ 9 | /* terminal: "rofi-sensible-terminal";*/ 10 | /* ssh-client: "ssh";*/ 11 | /* ssh-command: "{terminal} -e {ssh-client} {host} [-p {port}]";*/ 12 | /* run-command: "{cmd}";*/ 13 | /* run-list-command: "";*/ 14 | /* run-shell-command: "{terminal} -e {cmd}";*/ 15 | /* window-command: "wmctrl -i -R {window}";*/ 16 | /* window-match-fields: "all";*/ 17 | /* icon-theme: ;*/ 18 | /* drun-match-fields: "name,generic,exec,categories,keywords";*/ 19 | /* drun-categories: ;*/ 20 | /* drun-show-actions: false;*/ 21 | /* drun-display-format: "{name} [({generic})]";*/ 22 | /* drun-url-launcher: "xdg-open";*/ 23 | /* disable-history: false;*/ 24 | /* ignored-prefixes: "";*/ 25 | /* sort: false;*/ 26 | /* sorting-method: "normal";*/ 27 | /* case-sensitive: false;*/ 28 | /* cycle: true;*/ 29 | /* sidebar-mode: false;*/ 30 | /* hover-select: false;*/ 31 | /* eh: 1;*/ 32 | /* auto-select: false;*/ 33 | /* parse-hosts: false;*/ 34 | /* parse-known-hosts: true;*/ 35 | /* combi-modi: "window,run";*/ 36 | /* matching: "normal";*/ 37 | /* tokenize: true;*/ 38 | /* m: "-5";*/ 39 | /* filter: ;*/ 40 | /* dpi: -1;*/ 41 | /* threads: 0;*/ 42 | /* scroll-method: 0;*/ 43 | /* window-format: "{w} {c} {t}";*/ 44 | /* click-to-exit: true;*/ 45 | /* max-history-size: 25;*/ 46 | /* combi-hide-mode-prefix: false;*/ 47 | /* combi-display-format: "{mode} {text}";*/ 48 | /* matching-negate-char: '-' /* unsupported */;*/ 49 | /* cache-dir: ;*/ 50 | /* window-thumbnail: false;*/ 51 | /* drun-use-desktop-cache: false;*/ 52 | /* drun-reload-desktop-cache: false;*/ 53 | /* normalize-match: false;*/ 54 | /* steal-focus: false;*/ 55 | /* application-fallback-icon: ;*/ 56 | /* pid: "/run/user/1000/rofi.pid";*/ 57 | /* display-window: ;*/ 58 | /* display-windowcd: ;*/ 59 | /* display-run: ;*/ 60 | /* display-ssh: ;*/ 61 | /* display-drun: ;*/ 62 | /* display-combi: ;*/ 63 | /* display-keys: ;*/ 64 | /* display-filebrowser: ;*/ 65 | /* kb-primary-paste: "Control+V,Shift+Insert";*/ 66 | /* kb-secondary-paste: "Control+v,Insert";*/ 67 | /* kb-clear-line: "Control+w";*/ 68 | /* kb-move-front: "Control+a";*/ 69 | /* kb-move-end: "Control+e";*/ 70 | /* kb-move-word-back: "Alt+b,Control+Left";*/ 71 | /* kb-move-word-forward: "Alt+f,Control+Right";*/ 72 | /* kb-move-char-back: "Left,Control+b";*/ 73 | /* kb-move-char-forward: "Right,Control+f";*/ 74 | /* kb-remove-word-back: "Control+Alt+h,Control+BackSpace";*/ 75 | /* kb-remove-word-forward: "Control+Alt+d";*/ 76 | /* kb-remove-char-forward: "Delete,Control+d";*/ 77 | /* kb-remove-char-back: "BackSpace,Shift+BackSpace,Control+h";*/ 78 | /* kb-remove-to-eol: "Control+k";*/ 79 | /* kb-remove-to-sol: "Control+u";*/ 80 | /* kb-accept-entry: "Control+j,Control+m,Return,KP_Enter";*/ 81 | /* kb-accept-custom: "Control+Return";*/ 82 | /* kb-accept-custom-alt: "Control+Shift+Return";*/ 83 | /* kb-accept-alt: "Shift+Return";*/ 84 | /* kb-delete-entry: "Shift+Delete";*/ 85 | /* kb-mode-next: "Shift+Right,Control+Tab";*/ 86 | /* kb-mode-previous: "Shift+Left,Control+ISO_Left_Tab";*/ 87 | /* kb-mode-complete: "Control+l";*/ 88 | /* kb-row-left: "Control+Page_Up";*/ 89 | /* kb-row-right: "Control+Page_Down";*/ 90 | /* kb-row-up: "Up,Control+p,ISO_Left_Tab";*/ 91 | /* kb-row-down: "Down,Control+n";*/ 92 | /* kb-row-tab: "Tab";*/ 93 | /* kb-page-prev: "Page_Up";*/ 94 | /* kb-page-next: "Page_Down";*/ 95 | /* kb-row-first: "Home,KP_Home";*/ 96 | /* kb-row-last: "End,KP_End";*/ 97 | /* kb-row-select: "Control+space";*/ 98 | /* kb-screenshot: "Alt+S";*/ 99 | /* kb-ellipsize: "Alt+period";*/ 100 | /* kb-toggle-case-sensitivity: "grave,dead_grave";*/ 101 | /* kb-toggle-sort: "Alt+grave";*/ 102 | /* kb-cancel: "Escape,Control+g,Control+bracketleft";*/ 103 | /* kb-custom-1: "Alt+1";*/ 104 | /* kb-custom-2: "Alt+2";*/ 105 | /* kb-custom-3: "Alt+3";*/ 106 | /* kb-custom-4: "Alt+4";*/ 107 | /* kb-custom-5: "Alt+5";*/ 108 | /* kb-custom-6: "Alt+6";*/ 109 | /* kb-custom-7: "Alt+7";*/ 110 | /* kb-custom-8: "Alt+8";*/ 111 | /* kb-custom-9: "Alt+9";*/ 112 | /* kb-custom-10: "Alt+0";*/ 113 | /* kb-custom-11: "Alt+exclam";*/ 114 | /* kb-custom-12: "Alt+at";*/ 115 | /* kb-custom-13: "Alt+numbersign";*/ 116 | /* kb-custom-14: "Alt+dollar";*/ 117 | /* kb-custom-15: "Alt+percent";*/ 118 | /* kb-custom-16: "Alt+dead_circumflex";*/ 119 | /* kb-custom-17: "Alt+ampersand";*/ 120 | /* kb-custom-18: "Alt+asterisk";*/ 121 | /* kb-custom-19: "Alt+parenleft";*/ 122 | /* kb-select-1: "Super+1";*/ 123 | /* kb-select-2: "Super+2";*/ 124 | /* kb-select-3: "Super+3";*/ 125 | /* kb-select-4: "Super+4";*/ 126 | /* kb-select-5: "Super+5";*/ 127 | /* kb-select-6: "Super+6";*/ 128 | /* kb-select-7: "Super+7";*/ 129 | /* kb-select-8: "Super+8";*/ 130 | /* kb-select-9: "Super+9";*/ 131 | /* kb-select-10: "Super+0";*/ 132 | /* ml-row-left: "ScrollLeft";*/ 133 | /* ml-row-right: "ScrollRight";*/ 134 | /* ml-row-up: "ScrollUp";*/ 135 | /* ml-row-down: "ScrollDown";*/ 136 | /* me-select-entry: "MousePrimary";*/ 137 | /* me-accept-entry: "MouseDPrimary";*/ 138 | /* me-accept-custom: "Control+MouseDPrimary";*/ 139 | timeout { 140 | action: "kb-cancel"; 141 | delay: 60; 142 | } 143 | filebrowser { 144 | directories-first: true; 145 | sorting-method: "name"; 146 | } 147 | } 148 | 149 | @theme "material" 150 | -------------------------------------------------------------------------------- /rofi/material.rasi: -------------------------------------------------------------------------------- 1 | /* 2 | * ROFI color theme 3 | * 4 | * Based on Something Found in the Internet 5 | * 6 | * User: Contributors 7 | * Copyright: *! 8 | */ 9 | 10 | configuration { 11 | font: "Fira Code Nerd Font Medium 15"; 12 | 13 | drun { 14 | display-name: ""; 15 | } 16 | 17 | run { 18 | display-name: ""; 19 | } 20 | 21 | window { 22 | display-name: ""; 23 | } 24 | 25 | } 26 | 27 | * { 28 | border: 0; 29 | margin: 0; 30 | padding: 0; 31 | spacing: 0; 32 | 33 | bg: #1F1F1F; 34 | bg-alt: #232323; 35 | fg: #FFFFFF; 36 | fg-alt: #5C6370; 37 | fg-dark: #1a1a1a; 38 | 39 | background-color: @bg; 40 | text-color: @fg; 41 | } 42 | 43 | window { 44 | transparency: "real"; 45 | border: 3px; 46 | border-color: @fg-dark; 47 | } 48 | 49 | mainbox { 50 | children: [inputbar, listview]; 51 | } 52 | 53 | inputbar { 54 | background-color: @bg-alt; 55 | children: [prompt, entry]; 56 | } 57 | 58 | entry { 59 | background-color: inherit; 60 | padding: 12px 3px; 61 | } 62 | 63 | prompt { 64 | background-color: inherit; 65 | padding: 12px; 66 | } 67 | 68 | listview { 69 | lines: 8; 70 | } 71 | 72 | element { 73 | children: [element-icon, element-text]; 74 | } 75 | 76 | element-icon { 77 | padding: 14px 14px; 78 | } 79 | 80 | element-text { 81 | padding: 10px 0; 82 | text-color: @fg-alt; 83 | } 84 | 85 | element-text selected { 86 | text-color: @fg; 87 | } 88 | -------------------------------------------------------------------------------- /rofi/rofi-todoist.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | PROJECTS="Home\nHome /routines\nHome /shopping\nHome /vehicle\nHome /contact\nOS\nOS /ibl\nOS /headlines\nOS /reddit\nOS /virt-column\nOS /lsp-format\nOS /cbfmt\nWork\nWork /ev-data-stream\nStudy\nStudy /japanese\nStudy /software\nStudy /personal-development" 5 | TODO=$(rofi -dmenu -l 0 -yoffset -300 -p "") 6 | 7 | if [[ -n $TODO ]]; then 8 | if [[ $TODO == *# ]]; then 9 | PROJECT=$(echo -e "$PROJECTS" | rofi -dmenu -i -yoffset -300 -p "") 10 | TODO="${TODO}${PROJECT}" 11 | fi 12 | 13 | 14 | tod t q -c "$TODO" 15 | notify-send -a Todoist "Saved Todo: $TODO" 16 | fi 17 | -------------------------------------------------------------------------------- /rofi/rofi-ykman.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | # update accounts with `ykman oath accounts list > ~/.ykman-oath-accounts` 5 | ACCOUNT=$(rofi -dmenu -i -p "TOTP" <~/.ykman-oath-accounts) 6 | 7 | TOTP=$(ykman oath accounts code "$ACCOUNT" | awk -F' ' '{print $2}') 8 | 9 | if [ -n "$WAYLAND_DISPLAY" ]; then 10 | wtype "$TOTP" 11 | else 12 | xdotool type "$TOTP" 13 | fi 14 | -------------------------------------------------------------------------------- /scripts/bookmarks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cat ~/.bookmarks | sed -n "s/.* : \(.*\)$/\1/p" | sed "s#~#$HOME#" 4 | 5 | -------------------------------------------------------------------------------- /scripts/fzf-git-log.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | git log --graph --color=always --abbrev-commit \ 4 | --format='%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' | 5 | fzf --ansi --no-sort --reverse --tiebreak=index --bind=ctrl-s:toggle-sort \ 6 | --header $(basename `git rev-parse --show-toplevel`) \ 7 | --bind "ctrl-n:preview-down,ctrl-p:preview-up" \ 8 | --bind "ctrl-m:execute: 9 | (grep -o '[a-f0-9]\{7\}' | head -1 | 10 | xargs -I % bash -c 'git show --color=always % | diff-so-fancy | less -R') << 'FZF-EOF' 11 | {} 12 | FZF-EOF" \ 13 | --expect=ctrl-o \ 14 | --preview " 15 | (grep -o '[a-f0-9]\{7\}' | head -1 | 16 | xargs -I % bash -c 'git show --color=always % | diff-so-fancy') << 'FZF-EOF' 17 | {} 18 | FZF-EOF" 19 | 20 | -------------------------------------------------------------------------------- /scripts/git-ll-mac.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | FINAL=$(ls -1AlhF | while read line; do 4 | i=$(echo $line | awk '{print $9}') 5 | if [ -d "$i"/.git ]; then 6 | 7 | if [ $@ ]; then 8 | if [ $@ == "-f" ] || [ $@ == "--fetch" ]; then 9 | git --git-dir="$i"/.git --work-tree="$i" fetch 10 | fi 11 | if [ $@ == "-p" ] || [ $@ == "--pull" ]; then 12 | git --git-dir="$i"/.git --work-tree="$i" pull 13 | fi 14 | fi 15 | LIST=$(git --git-dir="$i"/.git --work-tree="$i" status --porcelain -b) 16 | 17 | COUNTER=0 18 | for l in $(echo $LIST | tr "..." "\n") 19 | do 20 | let "COUNTER++" 21 | if [ $COUNTER == 2 ]; then 22 | BRANCH=$l 23 | fi 24 | 25 | if [ $l == '[ahead' ]; then 26 | AHEADCOUNTER=$(($COUNTER + 1)) 27 | fi 28 | 29 | if [ $l == '[behind' ] || [ $l == 'behind' ]; then 30 | BEHINDCOUNTER=$(($COUNTER + 1)) 31 | fi 32 | 33 | if [ "$COUNTER" == "$BEHINDCOUNTER" ]; then 34 | BEHIND="↓·$l" 35 | fi 36 | 37 | if [ "$COUNTER" == "$AHEADCOUNTER" ]; then 38 | AHEAD="↑·$l" 39 | fi 40 | 41 | if [ $l == 'D' ]; then 42 | let "DELETED++ || 1" 43 | fi 44 | 45 | if [ $l == 'M' ]; then 46 | let "MODIFIED++ || 1" 47 | fi 48 | 49 | if [ $l == 'A' ]; then 50 | let "ADDED++ || 1" 51 | fi 52 | 53 | if [ $l == 'R' ]; then 54 | let "RENAMED++ || 1" 55 | fi 56 | 57 | if [ $l == '??' ]; then 58 | let "UNTRACKED++ || 1" 59 | fi 60 | 61 | if [ $l == 'UU' ]; then 62 | let "CONFLICT++ || 1" 63 | fi 64 | 65 | done 66 | 67 | OUTPUT="\x1B[35m$BRANCH\x1B[39m|" 68 | 69 | if [ "$BEHIND" ]; then 70 | OUTPUT="$OUTPUT${BEHIND%?}" 71 | fi 72 | 73 | if [ "$AHEAD" ]; then 74 | OUTPUT="$OUTPUT${AHEAD%?}" 75 | fi 76 | 77 | if [ "$CONFLICT" ]; then 78 | OUTPUT="$OUTPUT\x1B[31m❌ $CONFLICT\x1B[39m" 79 | fi 80 | 81 | if [ "$DELETED" ]; then 82 | OUTPUT="$OUTPUT\x1B[31m❌ $DELETED\x1B[39m" 83 | fi 84 | 85 | if [ "$MODIFIED" ]; then 86 | OUTPUT="$OUTPUT\x1B[34m✚ $MODIFIED\x1B[39m" 87 | fi 88 | 89 | if [ "$ADDED" ]; then 90 | OUTPUT="$OUTPUT\x1B[33m●$ADDED\x1B[39m" 91 | fi 92 | 93 | if [ "$RENAMED" ]; then 94 | OUTPUT="$OUTPUT\x1B[32m⇄ $RENAMED\x1B[39m" 95 | fi 96 | 97 | if [ "$UNTRACKED" ]; then 98 | OUTPUT="$OUTPUT\x1B[36m…$UNTRACKED\x1B[39m" 99 | fi 100 | 101 | if [ ! "$BEHIND" ] && [ ! "$AHEAD" ] && [ ! "$DELETED" ] && [ ! "$MODIFIED" ] && [ ! "$ADDED" ] && [ ! "$RENAMED" ] && [ ! "$UNTRACKED" ] && [ ! "$CONFLICT" ]; then 102 | OUTPUT="$OUTPUT\x1B[92m✔\x1B[39m" 103 | fi 104 | 105 | echo -e "\x1B[33m$(echo $line | awk '{print $1,$3,$9}')\x1B[39m§[$OUTPUT]" 106 | 107 | COUNTER=0 108 | BRANCH='' 109 | AHEADCOUNTER='' 110 | BEHINDCOUNTER='' 111 | AHEAD='' 112 | BEHIND='' 113 | DELETED='' 114 | MODIFIED='' 115 | ADDED='' 116 | RENAMED='' 117 | UNTRACKED='' 118 | CONFLICT='' 119 | OUTPUT='' 120 | 121 | else 122 | echo -e $(echo $line | awk '{print $1,$3,$9}'); 123 | fi; 124 | done) 125 | 126 | # printf "%s \n" "$FINAL" 127 | printf "%s \n" "$FINAL" | column -t -s "§" | sed -n '1!p' 128 | -------------------------------------------------------------------------------- /scripts/git-ll.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | FINAL=$(ls -1AlhF | while read line; do 4 | i=$(echo $line | awk '{print $9}') 5 | if [ -d "$i"/.git ]; then 6 | 7 | if [ $@ ]; then 8 | if [ $@ == "-f" ] || [ $@ == "--fetch" ]; then 9 | git --git-dir="$i"/.git --work-tree="$i" fetch 10 | fi 11 | fi 12 | LIST=$(git --git-dir="$i"/.git --work-tree="$i" status --porcelain -b) 13 | 14 | COUNTER=0 15 | for l in $(echo $LIST | tr "..." "\n") 16 | do 17 | let "COUNTER++" 18 | if [ $COUNTER == 2 ]; then 19 | BRANCH=$l 20 | fi 21 | 22 | if [ $l == '[ahead' ]; then 23 | AHEADCOUNTER=$(($COUNTER + 1)) 24 | fi 25 | 26 | if [ $l == '[behind' ] || [ $l == 'behind' ]; then 27 | BEHINDCOUNTER=$(($COUNTER + 1)) 28 | fi 29 | 30 | if [ "$COUNTER" == "$BEHINDCOUNTER" ]; then 31 | BEHIND="↓·$l" 32 | fi 33 | 34 | if [ "$COUNTER" == "$AHEADCOUNTER" ]; then 35 | AHEAD="↑·$l" 36 | fi 37 | 38 | if [ $l == 'D' ]; then 39 | let "DELETED++ || 1" 40 | fi 41 | 42 | if [ $l == 'M' ]; then 43 | let "MODIFIED++ || 1" 44 | fi 45 | 46 | if [ $l == 'A' ]; then 47 | let "ADDED++ || 1" 48 | fi 49 | 50 | if [ $l == 'R' ]; then 51 | let "RENAMED++ || 1" 52 | fi 53 | 54 | if [ $l == '??' ]; then 55 | let "UNTRACKED++ || 1" 56 | fi 57 | 58 | if [ $l == 'UU' ]; then 59 | let "CONFLICT++ || 1" 60 | fi 61 | 62 | done 63 | 64 | OUTPUT="\e[36m$BRANCH\e[39m" 65 | 66 | if [ "$BEHIND" ]; then 67 | OUTPUT="$OUTPUT ${BEHIND::-1}" 68 | fi 69 | 70 | if [ "$AHEAD" ]; then 71 | OUTPUT="$OUTPUT ${AHEAD::-1}" 72 | fi 73 | 74 | if [ "$DELETED" ]; then 75 | OUTPUT="$OUTPUT \e[31m❌ $DELETED\e[39m" 76 | fi 77 | 78 | if [ "$MODIFIED" ]; then 79 | OUTPUT="$OUTPUT \e[34m✚ $MODIFIED\e[39m" 80 | fi 81 | 82 | if [ "$ADDED" ]; then 83 | OUTPUT="$OUTPUT \e[33m● $ADDED\e[39m" 84 | fi 85 | 86 | if [ "$RENAMED" ]; then 87 | OUTPUT="$OUTPUT \e[32m⇄ $RENAMED\e[39m" 88 | fi 89 | 90 | if [ "$UNTRACKED" ]; then 91 | OUTPUT="$OUTPUT \e[31m… $UNTRACKED\e[39m" 92 | fi 93 | 94 | if [ "$CONFLICT" ]; then 95 | OUTPUT="$OUTPUT \e[36m❌ $CONFLICT\e[39m" 96 | fi 97 | 98 | echo -e "\e[1m\e[32m$(echo $line | awk '{print $1,$3,$9}')\e[39m\e[0m§❲$OUTPUT❳" 99 | 100 | COUNTER=0 101 | BRANCH='' 102 | AHEADCOUNTER='' 103 | BEHINDCOUNTER='' 104 | AHEAD='' 105 | BEHIND='' 106 | DELETED='' 107 | MODIFIED='' 108 | ADDED='' 109 | RENAMED='' 110 | UNTRACKED='' 111 | CONFLICT='' 112 | OUTPUT='' 113 | 114 | else 115 | echo -e $(echo $line | awk '{print $1,$3,$9}'); 116 | fi; 117 | done) 118 | 119 | printf "%s \n" "$FINAL" | column -t -s "§" -o " " | sed -n '1!p' 120 | -------------------------------------------------------------------------------- /scripts/git-merge.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | nvim -c 'Gdiff' $1 4 | -------------------------------------------------------------------------------- /scripts/jira-branch.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function jira_call() { 4 | JQ_QUERY='.issues[]|"\(.fields.issuetype.name)\t\(.key)\t\(.fields.summary)"' 5 | CURL=$(curl --location --silent --request POST -u "$JIRA_USER_EMAIL:$JIRA_USER_API_KEY" --header "Content-Type: application/json" "$JIRA_WORKSPACE_URL"/rest/api/2/search -d '{"jql": "assignee=currentuser() AND status NOT IN (Done, Rejected, Closed) AND type != Epic", "maxResults":50}') 6 | 7 | if [[ ! "$?" -eq 0 ]]; then 8 | echo "curl has failed" 9 | exit 1 10 | fi 11 | 12 | JQ=$(jq -r "$JQ_QUERY" <<<"$CURL") 13 | 14 | if [[ ! "$?" -eq 0 ]]; then 15 | echo "parsing the result has failed" 16 | exit 1 17 | fi 18 | 19 | echo -e "$JQ" 20 | } 21 | 22 | TICKET=$(jira_call | column -t -s $'\t' | fzf --height 20% --reverse) 23 | 24 | if [[ -n $TICKET ]]; then 25 | TICKET_NUMBER=$(echo "$TICKET" | awk '{print$2}') 26 | DESC=$(echo "${TICKET,,}" | awk '{$1=""; $2=""; print}' | sed -e 's/^[[:space:]]*//' | sed -e 's/]$//g' | sed -e 's/[\[| |\|:]/-/g') 27 | 28 | if [[ -n "$TICKET_NUMBER" ]] && [[ -n "$DESC" ]]; then 29 | git checkout -b "$TICKET_NUMBER/$DESC" 30 | fi 31 | fi 32 | -------------------------------------------------------------------------------- /scripts/lock.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | loginctl lock-session & 4 | sleep 1 && systemctl suspend -i 5 | -------------------------------------------------------------------------------- /scripts/npm-scripts.py: -------------------------------------------------------------------------------- 1 | import json 2 | import os.path 3 | 4 | if not os.path.isfile("package.json"): 5 | exit(1) 6 | 7 | with open("package.json") as package: 8 | data = json.load(package)["scripts"] 9 | for key in data.keys(): 10 | print(key) 11 | -------------------------------------------------------------------------------- /scripts/play.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ $(uname) == 'Darwin' ]; then 4 | spotify pause 5 | else 6 | SPOTIFY=`ps aux | grep 'spotify\|Spotify' | grep -v grep` 7 | 8 | if [ "$SPOTIFY" ]; then 9 | playerctl play-pause 10 | else 11 | spotify 12 | fi 13 | fi 14 | -------------------------------------------------------------------------------- /scripts/product-board.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function productboard_features() { 4 | for STATUS in "Planned" "In%20Progress"; do 5 | NEXT="https://api.productboard.com/features?status.name=$STATUS" 6 | 7 | while [[ "$NEXT" != "" ]]; do 8 | CURL=$(curl --silent --header "Authorization: Bearer ${PRODUCTBOARD_TOKEN}" --header "x-version: 1" "$NEXT") 9 | 10 | JQ=$(jq -r '.data[]|"\(.name)\t\(.id)" | gsub("\n"; " ")' <<<"$CURL") 11 | 12 | echo -e "$JQ" | column -t -s $'\t' 13 | NEXT=$(jq -r '.links.next' <<<"$CURL") 14 | done 15 | done 16 | } 17 | 18 | FEATURES=$(productboard_features | fzf --height 20% --reverse --multi) 19 | 20 | if [[ -n $FEATURES ]]; then 21 | for ID in $(echo -e "$FEATURES" | awk '{print $NF}'); do 22 | echo resolve "$ID" 23 | done 24 | fi 25 | -------------------------------------------------------------------------------- /scripts/trello-tickets.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import json 4 | import os 5 | import re 6 | import requests 7 | 8 | board_id = os.environ.get("TRELLO_BOARD_ID") 9 | url = f"https://api.trello.com/1/boards/{board_id}/cards/visible" 10 | 11 | querystring = { 12 | "token": os.environ.get("TRELLO_TOKEN"), 13 | "key": os.environ.get("TRELLO_KEY"), 14 | } 15 | 16 | response = requests.request("GET", url, params=querystring) 17 | 18 | for ticket in json.loads(response.text): 19 | if ticket["subscribed"]: 20 | id = ticket["idShort"] 21 | name = re.sub(r"[\"|'|,|:]", "", ticket["name"].replace(" ", "-")).lower() 22 | print(f"T-{id} {name}") 23 | -------------------------------------------------------------------------------- /starship/starship.toml: -------------------------------------------------------------------------------- 1 | add_newline = false 2 | 3 | format = """ 4 | $directory\ 5 | $git_branch\ 6 | $git_commit\ 7 | $git_state\ 8 | $git_status\ 9 | $git_metrics\ 10 | $python\ 11 | $line_break\ 12 | $character""" 13 | 14 | [character] 15 | success_symbol = '' 16 | error_symbol = '' 17 | format = '$symbol ' 18 | 19 | [git_branch] 20 | format = '[$branch(:$remote_branch)]($style) ' 21 | 22 | [git_status] 23 | format = '$ahead_behind(| $conflicted$deleted$renamed$modified$staged$untracked$stashed)' 24 | ahead = '[${count}↑](bold) ' 25 | diverged = '[${behind_count}↓ ${ahead_count}↑](bold) ' 26 | behind = '[${count}↓](bold) ' 27 | conflicted = '[${count}](red) ' 28 | modified = '[${count}✚](green) ' 29 | staged = '[${count}●](yellow) ' 30 | renamed = '[${count}](yellow) ' 31 | deleted = '[${count}✖](red) ' 32 | stashed = '[${count}⚑](purple) ' 33 | untracked = '[${count}?](cyan) ' 34 | 35 | [git_metrics] 36 | format = '(| ([+$added]($added_style) )([-$deleted]($deleted_style)) )' 37 | disabled = false 38 | 39 | [directory] 40 | truncation_length = 10 41 | style = 'yellow' 42 | 43 | [python] 44 | format = '[(\( $virtualenv\))](green bold)' 45 | -------------------------------------------------------------------------------- /stylua.toml: -------------------------------------------------------------------------------- 1 | line_endings = "Unix" 2 | indent_type = "Spaces" 3 | indent_width = 4 4 | no_call_parentheses = true 5 | -------------------------------------------------------------------------------- /terminfo/run.sh: -------------------------------------------------------------------------------- 1 | tic -x xterm-256color-italic.terminfo 2 | tic -x tmux-256color.terminfo 3 | -------------------------------------------------------------------------------- /terminfo/tmux-256color.terminfo: -------------------------------------------------------------------------------- 1 | tmux-256color|tmux with 256 colors, 2 | ritm=\E[23m, rmso=\E[27m, sitm=\E[3m, smso=\E[7m, Ms@, 3 | khome=\E[1~, kend=\E[4~, 4 | use=xterm-256color, use=screen-256color, 5 | -------------------------------------------------------------------------------- /terminfo/xterm-256color-italic.terminfo: -------------------------------------------------------------------------------- 1 | xterm-256color-italic|xterm with 256 colors and italic, 2 | sitm=\E[3m, ritm=\E[23m, 3 | use=xterm-256color, 4 | -------------------------------------------------------------------------------- /tmux/theme.conf: -------------------------------------------------------------------------------- 1 | set -g status-justify "left" 2 | set -g status "on" 3 | set -g status-style "fg=colour249" 4 | set -g message-command "bg=colour237,fg=colour249" 5 | set -g message-style "fg=colour249,bg=#1a1a1a" 6 | set -g status-left-length "100" 7 | set -g pane-active-border "fg=#1a1a1a,bg=#1a1a1a" 8 | set -g status-bg "#1a1a1a" 9 | set -g pane-border-style "fg=#1a1a1a,bg=#1a1a1a" 10 | set -g status-right-length "100" 11 | set -g window-status-activity-style "fg=colour150,bg=#1a1a1a" 12 | set -g window-status-style "bg=#1a1a1a" 13 | set -g window-status-separator "" 14 | set -g status-left "#[fg=colour236,bg=colour150] #{window_panes} #[fg=colour150,bg=colour235,nobold,nounderscore,noitalics]" 15 | set -g status-right "#[fg=colour235,bg=colour235,nobold,nounderscore,noitalics]#[fg=colour5,bg=#1a1a1a] #(cd #{pane_current_path} && git rev-parse --abbrev-ref HEAD) " 16 | set -g window-status-format "#[fg=colour235,bg=colour235,nobold,nounderscore,noitalics]#[default] │ #I #(basename #{pane_current_path}) #[fg=colour235,bg=colour235,nobold,nounderscore,noitalics]" 17 | set -g window-status-current-format "#[fg=colour235,bg=colour237,nobold,nounderscore,noitalics]#[fg=colour150,bg=#1a1a1a] │ #I #(basename #{pane_current_path}) #[fg=colour237,bg=colour235,nobold,nounderscore,noitalics]" 18 | set -g window-style 'bg=#1a1a1a' 19 | set -g window-active-style 'fg=#b3b9c5,bg=#1f1f1f' 20 | -------------------------------------------------------------------------------- /tmux/tmux.conf: -------------------------------------------------------------------------------- 1 | 2 | set -g @plugin 'nhdaly/tmux-better-mouse-mode' 3 | set -g @plugin 'tmux-plugins/tmux-yank' 4 | set -g @plugin 'tmux-plugins/tmux-copycat' 5 | set -g @plugin 'tmux-plugins/tmux-sidebar' 6 | set -g @plugin 'tmux-plugins/tmux-resurrect' 7 | set -g @plugin 'tmux-plugins/tmux-continuum' 8 | set -g @plugin 'tmux-plugins/tmux-open' 9 | set -g @plugin 'sainnhe/tmux-fzf' 10 | set -g @resurrect-strategy-nvim 'session' 11 | set -g @scroll-speed-num-lines-per-scroll 5 12 | set -g @sidebar-tree-command 'tree -C' 13 | # set -g @sidebar-tree-position 'right' 14 | 15 | set -g detach-on-destroy off 16 | 17 | set -g history-limit 90000 18 | # Add truecolor support 19 | # set-option -ga terminal-overrides ",xterm-256color:Tc" 20 | # Default terminal is 256 colors 21 | # set -g default-terminal "screen-256color" 22 | set -g default-terminal "xterm-kitty" 23 | # set -g default-terminal "tmux-256color" 24 | set -as terminal-overrides ',xterm*:Tc:sitm=\E[3m' 25 | set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm' # undercurl support 26 | set -as terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m' # underscore colors - needs tmux-3.0 27 | setw -g main-pane-height 40 28 | setw -g other-pane-height 40 29 | 30 | set -gq allow-passthrough on 31 | set -g visual-activity off 32 | 33 | # copy to Mac OSX pasteboard 34 | # if -b 'command -v reattach-to-user-namespace > /dev/null 2>&1' 'bind y run "tmux save-buffer - | reattach-to-user-namespace pbcopy"' 35 | set -g default-shell $SHELL 36 | run '[ "$(uname)" = "Darwin" ] && tmux source ~/dotfiles/tmux/tmux.osx.conf' 37 | run '[ "$(uname)" = "Linux" ] && tmux source ~/dotfiles/tmux/tmux.linux.conf' 38 | 39 | set-window-option -g mode-keys vi 40 | set -g @shell_mode 'vi' 41 | set -g status-keys vi 42 | setw -g xterm-keys on 43 | set-option -g base-index 1 44 | setw -g pane-base-index 1 45 | set -s escape-time 0 46 | set -g focus-events on 47 | set-option -g renumber-windows on 48 | 49 | unbind [ 50 | bind Escape copy-mode 51 | unbind p 52 | bind p paste-buffer 53 | bind-key -T copy-mode-vi 'v' send -X begin-selection 54 | bind-key -T copy-mode-vi 'H' send -X start-of-line 55 | bind-key -T copy-mode-vi 'L' send -X end-of-line 56 | bind-key -T copy-mode-vi 'J' send -X cursor-down\; send -X cursor-down\; send -X cursor-down\; send -X cursor-down\; send -X cursor-down 57 | bind-key -T copy-mode-vi 'K' send -X cursor-up\; send -X cursor-up\; send -X cursor-up\; send -X cursor-up\; send -X cursor-up 58 | bind-key -T copy-mode-vi Escape send -X cancel 59 | 60 | # Smart pane switching with awareness of Vim splits. 61 | # See: https://github.com/christoomey/vim-tmux-navigator 62 | is_vim="ps -o state= -o comm= -t '#{pane_tty}' \ 63 | | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?|fzf)(diff)?$'" 64 | bind-key -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L" 65 | bind-key -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D" 66 | bind-key -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U \; resize-pane -Z" 67 | bind-key -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R" 68 | bind-key -n C-\\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l" 69 | 70 | # resize panes using PREFIX H, J, K, L 71 | bind h resize-pane -L 5 72 | bind j resize-pane -D 5 73 | bind k resize-pane -U 5 74 | bind l resize-pane -R 5 75 | bind o resize-pane -Z 76 | bind C-o resize-pane -Z 77 | 78 | set -g @tmux-fzf-launch-key 'C-f' 79 | bind-key "f" run-shell -b "~/.tmux/plugins/tmux-fzf/scripts/session.sh attach" 80 | bind-key "P" run-shell -b "~/.tmux/plugins/tmux-fzf/scripts/window.sh switch" 81 | 82 | set -g @open-S 'https://www.google.com/search?q=' 83 | 84 | # remap prefix from 'C-b' to 'C-Space' 85 | unbind C-b 86 | set-option -g prefix C-Space 87 | bind-key C-Space send-prefix 88 | 89 | bind h split-window -h 90 | bind v split-window -v 91 | unbind '"' 92 | unbind % 93 | 94 | # rzload config file 95 | bind r source-file ~/.config/tmux/tmux.conf 96 | 97 | # Enable mouse mode (tmux 2.1 and above) 98 | set -g mouse on 99 | 100 | # don't rename windows automatically 101 | set-option -g allow-rename off 102 | 103 | source-file ~/dotfiles/tmux/theme.conf 104 | 105 | run '~/.tmux/plugins/tpm/tpm' 106 | -------------------------------------------------------------------------------- /tmux/tmux.linux.conf: -------------------------------------------------------------------------------- 1 | set -g default-command "${SHELL}" 2 | # bind-key -T copy-mode-vi y send-keys -X copy-pipe "xclip -se c -i" 3 | bind-key -T copy-mode-vi y send-keys -X copy-pipe "wl-copy" 4 | # bind-key p run "xsel -o | tmux load-buffer - ; tmux paste-buffer" 5 | 6 | -------------------------------------------------------------------------------- /tmux/tmux.osx.conf: -------------------------------------------------------------------------------- 1 | set -g default-command "reattach-to-user-namespace -l ${SHELL}" 2 | # bind-key -t vi-copy 'v' begin-selection 3 | # bind-key -t vi-copy 'y' copy-selection 4 | bind-key -T copy-mode-vi 'y' send -X copy-selection 5 | 6 | -------------------------------------------------------------------------------- /tmux/tmuxinator/dotfiles.yml: -------------------------------------------------------------------------------- 1 | session_name: dotfiles 2 | start_directory: '~' 3 | windows: 4 | - window_name: dotfiles 5 | focus: True 6 | layout: main-horizontal 7 | start_directory: ~/dotfiles/ 8 | panes: 9 | - focus: True 10 | shell_command: 11 | - tmux resize-pane -Z 12 | - v 13 | - cl 14 | - window_name: onedark 15 | layout: main-horizontal 16 | start_directory: ~/dev/onedark.nvim/ 17 | panes: 18 | - focus: True 19 | shell_command: 20 | - tmux resize-pane -Z 21 | - v 22 | - cl 23 | -------------------------------------------------------------------------------- /tmux/tmuxinator/mapbox-runtime.yml: -------------------------------------------------------------------------------- 1 | session_name: mapbox-runtime 2 | start_directory: '~' 3 | windows: 4 | - window_name: ev-route-planner 5 | focus: True 6 | layout: main-horizontal 7 | start_directory: ~/dev/ev-route-planner 8 | shell_command_before: 9 | - envsource 10 | panes: 11 | - focus: True 12 | -------------------------------------------------------------------------------- /tmux/tmuxinator/mapbox.yml: -------------------------------------------------------------------------------- 1 | session_name: mapbox 2 | start_directory: '~' 3 | windows: 4 | - window_name: ev-route-planner 5 | focus: True 6 | layout: main-horizontal 7 | start_directory: ~/dev/ev-route-planner 8 | shell_command_before: 9 | - envsource 10 | panes: 11 | - focus: True 12 | shell_command: 13 | - tmux resize-pane -Z 14 | - v 15 | - shell_command: 16 | - cl 17 | - window_name: ev-data-api 18 | focus: False 19 | layout: main-horizontal 20 | start_directory: ~/dev/ev-data-api 21 | shell_command_before: 22 | - envsource 23 | panes: 24 | - focus: False 25 | shell_command: 26 | - tmux resize-pane -Z 27 | - v 28 | - shell_command: 29 | - cl 30 | -------------------------------------------------------------------------------- /tmux/tmuxinator/qmk.yml: -------------------------------------------------------------------------------- 1 | session_name: qmk 2 | start_directory: '~' 3 | windows: 4 | - window_name: qmk 5 | focus: True 6 | layout: main-horizontal 7 | start_directory: ~/dev/qmk_firmware 8 | panes: 9 | - focus: True 10 | shell_command: 11 | - tmux resize-pane -Z 12 | - v 13 | - cl 14 | -------------------------------------------------------------------------------- /tmux/tmuxinator/vim.yml: -------------------------------------------------------------------------------- 1 | session_name: vim 2 | start_directory: '~' 3 | windows: 4 | - window_name: indent_blankline 5 | focus: True 6 | layout: main-horizontal 7 | start_directory: ~/dev/indent-blankline.nvim 8 | panes: 9 | - focus: True 10 | shell_command: 11 | - tmux resize-pane -Z 12 | - v 13 | - cl 14 | - window_name: neovim 15 | focus: True 16 | layout: main-horizontal 17 | start_directory: ~/dev/neovim 18 | panes: 19 | - focus: True 20 | shell_command: 21 | - tmux resize-pane -Z 22 | - v 23 | - cl 24 | - window_name: cmp-rg 25 | focus: True 26 | layout: main-horizontal 27 | start_directory: ~/dev/cmp-rg 28 | panes: 29 | - focus: True 30 | shell_command: 31 | - tmux resize-pane -Z 32 | - v 33 | - cl 34 | - window_name: cmp-under-comparator 35 | focus: True 36 | layout: main-horizontal 37 | start_directory: ~/dev/cmp-under-comparator 38 | panes: 39 | - focus: True 40 | shell_command: 41 | - tmux resize-pane -Z 42 | - v 43 | - cl 44 | - window_name: headlines.nvim 45 | focus: True 46 | layout: main-horizontal 47 | start_directory: ~/dev/headlines.nvim 48 | panes: 49 | - focus: True 50 | shell_command: 51 | - tmux resize-pane -Z 52 | - v 53 | - cl 54 | - window_name: lsp-format.nvim 55 | focus: True 56 | layout: main-horizontal 57 | start_directory: ~/dev/lsp-format.nvim 58 | panes: 59 | - focus: True 60 | shell_command: 61 | - tmux resize-pane -Z 62 | - v 63 | - cl 64 | - window_name: virt-column.nvim 65 | focus: True 66 | layout: main-horizontal 67 | start_directory: ~/dev/virt-column.nvim 68 | panes: 69 | - focus: True 70 | shell_command: 71 | - tmux resize-pane -Z 72 | - v 73 | - cl 74 | -------------------------------------------------------------------------------- /vim/after/ftplugin/graphql.vim: -------------------------------------------------------------------------------- 1 | 2 | set shiftwidth=4 3 | -------------------------------------------------------------------------------- /vim/after/ftplugin/lua.lua: -------------------------------------------------------------------------------- 1 | vim.opt_local.commentstring = "--%s" 2 | -------------------------------------------------------------------------------- /vim/after/ftplugin/markdown.lua: -------------------------------------------------------------------------------- 1 | local ok, virt_column = pcall(require, "virt-column") 2 | if ok then 3 | virt_column.setup_buffer(0, { virtcolumn = "" }) 4 | end 5 | 6 | vim.opt_local.spell = true 7 | vim.opt_local.list = false 8 | vim.opt_local.wrap = false 9 | vim.opt_local.formatoptions:append "t" 10 | 11 | vim.keymap.set("n", "f", function() 12 | require("fuzzy").headlines("^#+", "#") 13 | end, { buffer = true }) 14 | -------------------------------------------------------------------------------- /vim/after/ftplugin/vimwiki.vim: -------------------------------------------------------------------------------- 1 | setlocal nowrap 2 | setlocal spell 3 | setlocal nolist 4 | setlocal colorcolumn= 5 | 6 | setlocal foldnestmax=20 7 | setlocal foldexpr=markdown#FoldExpression(v:lnum) 8 | setlocal foldmethod=expr 9 | 10 | nmap = VimwikiAddHeaderLevel 11 | nmap + VimwikiRemoveHeaderLevel 12 | nmap _ VimwikiNormalizeLink 13 | nmap 14 | 15 | 16 | nmap w VimwikiRenumberAllLists:w 17 | -------------------------------------------------------------------------------- /vim/after/syntax/markdown.vim: -------------------------------------------------------------------------------- 1 | 2 | syntax match MarkdownDot /\\\./ conceal cchar=. 3 | syntax match MarkdownSlash /\\\-/ conceal cchar=- 4 | syntax match MarkdownSemicolon /\\\;/ conceal cchar=; 5 | syntax match MarkdownColon /\\\:/ conceal cchar=: 6 | syntax match MarkdownSQuote /\\\'/ conceal cchar=' 7 | syntax match MarkdownDQuote /\\\"/ conceal cchar=" 8 | syntax match MarkdownBackslash /\\\// conceal cchar=/ 9 | 10 | 11 | let b:markdown_in_jekyll=0 12 | 13 | if getline(1) =~ '^---\s*$' 14 | let b:markdown_in_jekyll=1 15 | 16 | syn region markdownJekyllFrontMatter matchgroup=markdownJekyllDelimiter contains=@NoSpell 17 | \ start="\%^---" end="^---$" concealends 18 | 19 | syn region markdownJekyllLiquidTag matchgroup=markdownJekyllDelimiter contains=@NoSpell oneline 20 | \ start="{%" end="%}" 21 | 22 | syn region markdownJekyllClass matchgroup=markdownJekyllDelimiter contains=@NoSpell oneline 23 | \ start="{:" end="}" 24 | 25 | syn region markdownJekyllLiquidOutputTag matchgroup=markdownJekyllDelimiter contains=@NoSpell oneline 26 | \ start="{{" skip=/"}}"/ end="}}" 27 | 28 | syn region markdownJekyllLiquidBlockTag matchgroup=markdownJekyllDelimiter contains=@NoSpell 29 | \ start="{%\s*\z(comment\|raw\|highlight\)[^%]*%}" end="{%\s*\%(no\|end\)\z1\s*%}" 30 | 31 | silent spell! nocomment 32 | silent spell! endcomment 33 | silent spell! nohighlight 34 | silent spell! endhighlight 35 | silent spell! noraw 36 | silent spell! endraw 37 | 38 | hi def link markdownJekyllFrontMatter Comment 39 | hi def link markdownJekyllLiquidTag markdownCodeBlock 40 | hi def link markdownJekyllClass htmlString 41 | hi def link markdownJekyllLiquidOutputTag NonText 42 | hi def link markdownJekyllLiquidBlockTag NonText 43 | hi def link markdownJekyllDelimiter Delimiter 44 | endif 45 | -------------------------------------------------------------------------------- /vim/after/syntax/org.vim: -------------------------------------------------------------------------------- 1 | 2 | syntax region OrgColorTagRed matchgroup=OrgColorTag start='r`' end='`' contains=@Spell concealends 3 | syntax region OrgColorTagGreen matchgroup=OrgColorTag start='g`' end='`' contains=@Spell concealends 4 | syntax region OrgColorTagBlue matchgroup=OrgColorTag start='b`' end='`' contains=@Spell concealends 5 | syntax region OrgColorTagCyan matchgroup=OrgColorTag start='c`' end='`' contains=@Spell concealends 6 | syntax region OrgColorTagPurple matchgroup=OrgColorTag start='p`' end='`' contains=@Spell concealends 7 | syntax region OrgColorTagYellow matchgroup=OrgColorTag start='y`' end='`' contains=@Spell concealends 8 | syntax region OrgColorTagOrange matchgroup=OrgColorTag start='o`' end='`' contains=@Spell concealends 9 | 10 | 11 | syntax region OrgQuote start='^\s*>' end='$' contains=@Spell concealends 12 | 13 | 14 | " syntax match OrgBar /|/ conceal cchar=│ 15 | " " syntax match OrgBar /|\(-\)\@=/ conceal cchar=├ 16 | " " syntax match OrgBar /\(-\)\@=|/ conceal cchar=┤ 17 | " " syntax match OrgBar /-\zs-/ conceal cchar=─ 18 | " " syntax match OrgBar /-\(-\)\@=/ conceal cchar=─ 19 | " syntax match OrgBar /-\&-/ conceal cchar=─ 20 | " syntax match OrgTablePlus /-\@<=+/ conceal cchar=┼ 21 | -------------------------------------------------------------------------------- /vim/after/syntax/vimwiki.vim: -------------------------------------------------------------------------------- 1 | syntax match VimwikiColorTagRed /r`[^`]\{-}`/ contains=VimwikiColorTagStart,VimwikiColorTagEnd,@Spell 2 | syntax match VimwikiColorTagGreen /g`[^`]\{-}`/ contains=VimwikiColorTagStart,VimwikiColorTagEnd,@Spell 3 | syntax match VimwikiColorTagCyan /c`[^`]\{-}`/ contains=VimwikiColorTagStart,VimwikiColorTagEnd,@Spell 4 | syntax match VimwikiColorTagBlue /b`[^`]\{-}`/ contains=VimwikiColorTagStart,VimwikiColorTagEnd,@Spell 5 | syntax match VimwikiColorTagPurple /p`[^`]\{-}`/ contains=VimwikiColorTagStart,VimwikiColorTagEnd,@Spell 6 | syntax match VimwikiColorTagStart contained /[r|g|c|b|p]`/ conceal 7 | syntax match VimwikiColorTagEnd contained /`/ conceal 8 | 9 | syntax match VimwikiColorTagRed /[^<]\+<\/span>/ contains=VimwikiColorTagStart,VimwikiColorTagEnd,@Spell 10 | syntax match VimwikiColorTagStart contained // conceal 11 | syntax match VimwikiColorTagStart contained /<\/span>/ conceal 12 | 13 | 14 | syntax region OrgColorTagRed matchgroup=OrgColorTag start='' end='<\/span>' contains=@Spell concealends 15 | syntax region OrgColorTagGreen matchgroup=OrgColorTag start='' end='<\/span>' contains=@Spell concealends 16 | syntax region OrgColorTagBlue matchgroup=OrgColorTag start='' end='<\/span>' contains=@Spell concealends 17 | syntax region OrgColorTagCyan matchgroup=OrgColorTag start='' end='<\/span>' contains=@Spell concealends 18 | syntax region OrgColorTagPurple matchgroup=OrgColorTag start='' end='<\/span>' contains=@Spell concealends 19 | 20 | syntax match VimwikiSuperScriptT /(\?[12]\d\{3}-\(0[1-9]\|1[0-2]\)-\(0[1-9]\|[12]\d\|3[01]\)\( \d\{2}:\d\{2}:\d\{2}\)\?)\?/ 21 | 22 | " execute 'syntax match VimwikiListTodo /'.vimwiki#vars#get_wikilocal('rxListItem').'/ contains=todoCheckbox' 23 | " syntax match TaskWikiTaskCompleted containedin=TaskWikiTask contained /\s*\*\s\[X\]\s[^#]*/ contains=todoCheckbox 24 | " syntax match TaskWikiTaskDeleted containedin=TaskWikiTask contained /\s*\*\s*\[D\]\s[^#]*/ contains=todoCheckbox 25 | 26 | " syntax match todoCheckbox "\[\ \]" conceal cchar= 27 | " syntax match todoCheckbox "\[X\]" conceal cchar= 28 | " syntax match todoCheckbox "\[D\]" conceal cchar=☒ 29 | 30 | let g:indentLine_color_gui = 'None' 31 | 32 | let g:language_map = {'SQL': 'pgsql', 'bash': 'sh', 'txt': 'gitcommit'} 33 | for language in [ 'typescript', 'javascript', 'json', 'python', 'go', 'bash', 'SQL', 'vim', 'txt'] 34 | call SyntaxRange#Include('{{{' . language, '}}}', get(g:language_map, language, language), 'markdownCodeDelimiter') 35 | endfor 36 | -------------------------------------------------------------------------------- /vim/ftdetect/rego.vim: -------------------------------------------------------------------------------- 1 | autocmd BufRead,BufNewFile *.rego set filetype=rego 2 | 3 | " Use # as a comment prefix 4 | autocmd FileType rego setlocal comments=b:#,fb:- 5 | autocmd FileType rego setlocal commentstring=#\ %s 6 | -------------------------------------------------------------------------------- /vim/ftplugin/css.vim: -------------------------------------------------------------------------------- 1 | setlocal iskeyword=@,48-57,_,-,?,!,192-255 2 | 3 | -------------------------------------------------------------------------------- /vim/ftplugin/defx.vim: -------------------------------------------------------------------------------- 1 | setlocal nobuflisted 2 | setlocal bufhidden=delete 3 | 4 | nnoremap - defx#do_action('cd', ['..']) 5 | nnoremap defx#do_action('quit') 6 | nnoremap q defx#do_action('quit') 7 | 8 | nnoremap defx#is_directory() ? 9 | \ defx#do_action('open_or_close_tree') . 'j' : 10 | \ defx#do_action('open') 11 | nnoremap o defx#is_directory() ? 12 | \ defx#do_action('open_or_close_tree') . 'j' : 13 | \ defx#do_action('open') 14 | 15 | 16 | nnoremap s defx#do_action('multi', [['open', 'split'], 'quit']) 17 | nnoremap N defx#do_action('new_multiple_files') 18 | nnoremap D defx#do_action('remove') 19 | nnoremap r defx#do_action('rename') 20 | nnoremap M defx#do_action('toggle_select') . 'j' 21 | xnoremap M defx#do_action('toggle_select_visual') 22 | 23 | nnoremap m defx#do_action('move') 24 | nnoremap y defx#do_action('copy') 25 | nnoremap p defx#do_action('paste') 26 | 27 | nmap gk (defx-git-prev) 28 | nmap gj (defx-git-next) 29 | nmap ga (defx-git-stage) 30 | nmap gr (defx-git-reset) 31 | nmap gu (defx-git-discard) 32 | 33 | call defx#custom#column('filename', { 34 | \ 'min_width': 60, 35 | \ 'max_width': winwidth(0), 36 | \}) 37 | -------------------------------------------------------------------------------- /vim/ftplugin/diagnosticpopup.vim: -------------------------------------------------------------------------------- 1 | 2 | setlocal showbreak=\ \ 3 | -------------------------------------------------------------------------------- /vim/ftplugin/gitcommit.vim: -------------------------------------------------------------------------------- 1 | setlocal spell 2 | setlocal textwidth=72 3 | setlocal formatoptions+=t 4 | 5 | -------------------------------------------------------------------------------- /vim/ftplugin/go.vim: -------------------------------------------------------------------------------- 1 | setlocal noexpandtab 2 | -------------------------------------------------------------------------------- /vim/ftplugin/help.vim: -------------------------------------------------------------------------------- 1 | nnoremap 2 | setlocal nolist 3 | -------------------------------------------------------------------------------- /vim/ftplugin/hyprlang.lua: -------------------------------------------------------------------------------- 1 | vim.o.commentstring = "# %s" 2 | -------------------------------------------------------------------------------- /vim/ftplugin/javascript.vim: -------------------------------------------------------------------------------- 1 | setlocal iskeyword+=$ 2 | setlocal define=\\(const\\\|let\\) 3 | setlocal suffixesadd+=.js,.jsx 4 | setlocal path+=$PWD/node_modules 5 | setlocal cinoptions+=j1,J1 6 | -------------------------------------------------------------------------------- /vim/ftplugin/lua.lua: -------------------------------------------------------------------------------- 1 | vim.opt.textwidth = 120 2 | -------------------------------------------------------------------------------- /vim/ftplugin/man.vim: -------------------------------------------------------------------------------- 1 | nnoremap :Man 2 | setlocal nolist 3 | setlocal nospell 4 | -------------------------------------------------------------------------------- /vim/ftplugin/neo-tree.lua: -------------------------------------------------------------------------------- 1 | require("virt-column").setup_buffer(0, { virtcolumn = "" }) 2 | -------------------------------------------------------------------------------- /vim/ftplugin/neotest-output.lua: -------------------------------------------------------------------------------- 1 | vim.api.nvim_buf_set_keymap(0, "n", "q", ":q!", {}) 2 | -------------------------------------------------------------------------------- /vim/ftplugin/org.lua: -------------------------------------------------------------------------------- 1 | -- local map = require("utils").map 2 | -- local leader = "" 3 | 4 | -- local orgmode = require "orgmode" 5 | -- M.insert_return = function() 6 | -- orgmode.action "org_mappings.handle_return" 7 | -- vim.schedule(function() 8 | -- if vim.fn.mode() ~= "i" then 9 | -- vim.api.nvim_feedkeys("o", "n", true) 10 | -- end 11 | -- end) 12 | -- end 13 | -- 14 | -- map("n", "", ":lua require 'orgmode'.action('org_mappings.handle_return')", { buffer = true }) 15 | -- map("i", "", ":lua require 'org'.insert_return()", { buffer = true }) 16 | vim.keymap.set("n", "t", function() 17 | require("orgmode").action "org_mappings.set_tags" 18 | end, { buffer = true }) 19 | vim.keymap.set("n", "c", function() 20 | require("orgmode").action "org_mappings.toggle_checkbox" 21 | end, { buffer = true }) 22 | 23 | -- map("n", "cit", ":lua require 'orgmode'.action('org_mappings.todo_next_state')", { buffer = true }) 24 | -- map("n", leader .. "oo", ":lua require 'orgmode'.action('org_mappings.open_at_point')", { buffer = true }) 25 | -- map( 26 | -- "n", 27 | -- leader .. "", 28 | -- ":lua require 'orgmode'.action('org_mappings.toggle_checkbox')", 29 | -- { buffer = true, silent = true } 30 | -- ) 31 | -- map("n", leader .. "f", ":lua require('fuzzy').headlines('^%*+', '*')", { buffer = true }) 32 | 33 | vim.g.table_mode_verbose = false 34 | vim.fn["tablemode#Enable"]() 35 | 36 | require("virt-column").setup_buffer(0, { virtcolumn = "" }) 37 | 38 | vim.opt_local.spell = true 39 | vim.opt_local.list = false 40 | vim.opt_local.wrap = false 41 | vim.opt_local.number = false 42 | vim.opt_local.relativenumber = false 43 | vim.opt_local.signcolumn = "no" 44 | -------------------------------------------------------------------------------- /vim/ftplugin/prisma.lua: -------------------------------------------------------------------------------- 1 | vim.opt.spell = false 2 | -------------------------------------------------------------------------------- /vim/ftplugin/python.vim: -------------------------------------------------------------------------------- 1 | setlocal textwidth=120 2 | 3 | -------------------------------------------------------------------------------- /vim/ftplugin/qf.vim: -------------------------------------------------------------------------------- 1 | nnoremap o 2 | nnoremap O :ccl 3 | nnoremap j j 4 | nnoremap gj gj 5 | nnoremap k k 6 | nnoremap gk gk 7 | setlocal wrap 8 | setlocal colorcolumn= 9 | setlocal nolist 10 | setlocal nospell 11 | -------------------------------------------------------------------------------- /vim/ftplugin/scss.vim: -------------------------------------------------------------------------------- 1 | setlocal iskeyword=@,48-57,_,-,?,!,192-255,$ 2 | 3 | -------------------------------------------------------------------------------- /vim/ftplugin/text.vim: -------------------------------------------------------------------------------- 1 | setlocal textwidth=120 2 | setlocal nolist 3 | 4 | -------------------------------------------------------------------------------- /vim/ftplugin/tsplayground.lua: -------------------------------------------------------------------------------- 1 | 2 | vim.opt_local.shiftwidth = 2 3 | -------------------------------------------------------------------------------- /vim/ftplugin/typescript.vim: -------------------------------------------------------------------------------- 1 | setlocal iskeyword+=$ 2 | setlocal define=\\(const\\\|let\\\|private\\\|public\\\|class\\) 3 | setlocal suffixesadd+=.js,.tsx,.jsx 4 | setlocal path+=$PWD/node_modules 5 | setlocal cinoptions+=j1,J1 6 | -------------------------------------------------------------------------------- /vim/ftplugin/typescriptreact.vim: -------------------------------------------------------------------------------- 1 | setlocal iskeyword+=$ 2 | setlocal define=\\(const\\\|let\\\|private\\\|public\\\|class\\) 3 | setlocal suffixesadd+=.js,.tsx,.jsx 4 | setlocal path+=$PWD/node_modules 5 | setlocal cinoptions+=j1,J1 6 | -------------------------------------------------------------------------------- /vim/ftplugin/yaml.vim: -------------------------------------------------------------------------------- 1 | setlocal iskeyword=@,48-57,_,-,?,!,192-255 2 | setlocal shiftwidth=2 3 | -------------------------------------------------------------------------------- /vim/init.lua: -------------------------------------------------------------------------------- 1 | vim.g.python_host_prog = "~/.pyenv/versions/neovim2/bin/python" 2 | vim.g.python3_host_prog = "~/.pyenv/versions/neovim3.8.5/bin/python" 3 | vim.opt.rtp:prepend(vim.fn.stdpath "data" .. "/lazy/lazy.nvim") 4 | package.path = package.path .. ";" .. vim.fn.expand "$HOME" .. "/.luarocks/share/lua/5.1/?/init.lua;" 5 | package.path = package.path .. ";" .. vim.fn.expand "$HOME" .. "/.luarocks/share/lua/5.1/?.lua;" 6 | vim.g.loaded_netrwPlugin = true 7 | vim.g.loaded_matchparen = true 8 | vim.cmd [[packadd cfilter]] 9 | 10 | vim.validate = function() end 11 | vim.deprecate = function() end 12 | 13 | require "utils" 14 | require "fold" 15 | require "settings" 16 | 17 | require("lazy").setup("plugins", { 18 | dev = { 19 | path = "~/dev", 20 | patterns = { "lukas-reineke" }, 21 | }, 22 | change_detection = { 23 | notify = false, 24 | }, 25 | ui = { 26 | border = vim.g.floating_window_border, 27 | }, 28 | performance = { 29 | rtp = { 30 | disabled_plugins = { 31 | "2html_plugin", 32 | "tohtml", 33 | "getscript", 34 | "getscriptPlugin", 35 | "gzip", 36 | "logipat", 37 | "netrw", 38 | "netrwPlugin", 39 | "netrwSettings", 40 | "netrwFileHandlers", 41 | "matchit", 42 | "tar", 43 | "tarPlugin", 44 | "rrhelper", 45 | "spellfile_plugin", 46 | "vimball", 47 | "vimballPlugin", 48 | "zip", 49 | "zipPlugin", 50 | "tutor", 51 | "rplugin", 52 | "syntax", 53 | "synmenu", 54 | "optwin", 55 | "compiler", 56 | "bugreport", 57 | }, 58 | }, 59 | }, 60 | install = { colorscheme = { "onedark" } }, 61 | }) 62 | require "keymaps" 63 | 64 | require "lsp" 65 | require("git").setup() 66 | require("lists").setup() 67 | require "commands" 68 | require "autocmds" 69 | -------------------------------------------------------------------------------- /vim/lazy-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" }, 3 | "LuaSnip": { "branch": "master", "commit": "c9b9a22904c97d0eb69ccb9bab76037838326817" }, 4 | "Navigator.nvim": { "branch": "master", "commit": "91d86506ac2a039504d5205d32a1d4bc7aa57072" }, 5 | "UnconditionalPaste": { "branch": "master", "commit": "1ace5e3aae521499679f254950d4a06d176d7ba2" }, 6 | "auto-session": { "branch": "main", "commit": "9c3f977aafb56bd73ba0d082c4dcbdba5666faf3" }, 7 | "clear-action.nvim": { "branch": "master", "commit": "2854c3fda5720c7e53b5a9537774fae212224484" }, 8 | "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, 9 | "cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" }, 10 | "cmp-cmdline-history": { "branch": "master", "commit": "003573b72d4635ce636234a826fa8c4ba2895ffe" }, 11 | "cmp-dap": { "branch": "master", "commit": "ea92773e84c0ad3288c3bc5e452ac91559669087" }, 12 | "cmp-git": { "branch": "main", "commit": "483ffb9a7471409a841df099d7c13556234365a4" }, 13 | "cmp-jira": { "branch": "main", "commit": "e7f7e341588a93c2763b7900e98f1478ebb85bf8" }, 14 | "cmp-look": { "branch": "master", "commit": "971e65a6be0e75c3438fe7b176d4fc020cb89d7b" }, 15 | "cmp-nvim-lsp": { "branch": "main", "commit": "99290b3ec1322070bcfb9e846450a46f6efa50f0" }, 16 | "cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" }, 17 | "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, 18 | "cmp-tmux": { "branch": "main", "commit": "95b1b921802e6f60627b3e76afb9380fddd87f9a" }, 19 | "cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" }, 20 | "codecompanion.nvim": { "branch": "main", "commit": "b466d72d1e1846cf471278af339c4c8b6b05f527" }, 21 | "crates.nvim": { "branch": "main", "commit": "6bf1b4ceb62f205c903590ccc62061aafc17024a" }, 22 | "diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" }, 23 | "dressing.nvim": { "branch": "master", "commit": "2d7c2db2507fa3c4956142ee607431ddb2828639" }, 24 | "flash.nvim": { "branch": "main", "commit": "3c942666f115e2811e959eabbdd361a025db8b63" }, 25 | "fzf": { "branch": "master", "commit": "10cbac20f96de35acf272ddc4a998868c5694bd9" }, 26 | "fzf.vim": { "branch": "master", "commit": "279e1ec068f526e985ee7e3f62a71f083bbe0196" }, 27 | "gitsigns.nvim": { "branch": "main", "commit": "4c40357994f386e72be92a46f41fc1664c84c87d" }, 28 | "helpview.nvim": { "branch": "main", "commit": "857aec1dab331252910da158ab6cbfbc65239c71" }, 29 | "image.nvim": { "branch": "master", "commit": "6ffafab2e98b5bda46bf227055aa84b90add8cdc" }, 30 | "is.vim": { "branch": "master", "commit": "d393cb346dcdf733fecd7bbfc45b70b8c05e9eb4" }, 31 | "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, 32 | "lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" }, 33 | "lsp_signature.nvim": { "branch": "master", "commit": "fc38521ea4d9ec8dbd4c2819ba8126cea743943b" }, 34 | "luvit-meta": { "branch": "main", "commit": "1df30b60b1b4aecfebc785aa98943db6c6989716" }, 35 | "neo-tree-diagnostics.nvim": { "branch": "main", "commit": "e00434c3cf8637bcaf70f65c2b9d82b0cc9bd7dc" }, 36 | "neo-tree.nvim": { "branch": "main", "commit": "2a5c86bd61e6c60ab7c2cb029c5cf619e4ee0b3a" }, 37 | "neodev.nvim": { "branch": "main", "commit": "46aa467dca16cf3dfe27098042402066d2ae242d" }, 38 | "neotest": { "branch": "master", "commit": "dddbe8fe358b05b2b7e54fe4faab50563171a76d" }, 39 | "neotest-go": { "branch": "main", "commit": "92950ad7be2ca02a41abca5c6600ff6ffaf5b5d6" }, 40 | "neotest-jest": { "branch": "main", "commit": "514fd4eae7da15fd409133086bb8e029b65ac43f" }, 41 | "neotest-plenary": { "branch": "master", "commit": "3523adcf9ffaad1911960c5813b0136c1b63a2ec" }, 42 | "neotest-python": { "branch": "master", "commit": "a2861ab3c9a0bf75a56b11835c2bfc8270f5be7e" }, 43 | "neotest-rust": { "branch": "main", "commit": "e1cb22ecf0341fb894ef2ebde344389fe6e6fc8e" }, 44 | "nui.nvim": { "branch": "main", "commit": "8d3bce9764e627b62b07424e0df77f680d47ffdb" }, 45 | "nvim-bqf": { "branch": "main", "commit": "ebb6d2689e4427452180f17c53f29f7e460236f1" }, 46 | "nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" }, 47 | "nvim-dap": { "branch": "master", "commit": "8228cb00ab0850e483f8d58cc39cc580c05738d6" }, 48 | "nvim-dap-go": { "branch": "main", "commit": "8763ced35b19c8dc526e04a70ab07c34e11ad064" }, 49 | "nvim-dap-python": { "branch": "master", "commit": "34282820bb713b9a5fdb120ae8dd85c2b3f49b51" }, 50 | "nvim-dap-repl-highlights": { "branch": "master", "commit": "a7512fc0a0de0c0be8d58983939856dda6f72451" }, 51 | "nvim-dap-ui": { "branch": "master", "commit": "bc81f8d3440aede116f821114547a476b082b319" }, 52 | "nvim-dap-virtual-text": { "branch": "master", "commit": "df66808cd78b5a97576bbaeee95ed5ca385a9750" }, 53 | "nvim-dap-vscode-js": { "branch": "main", "commit": "03bd29672d7fab5e515fc8469b7d07cc5994bbf6" }, 54 | "nvim-dev-container": { "branch": "main", "commit": "86e4f88d2a22226043348d921cef7495883392b9" }, 55 | "nvim-fzf": { "branch": "master", "commit": "305aa90aeb8409b4bd2af1812a4b6e157ee93953" }, 56 | "nvim-lspconfig": { "branch": "master", "commit": "fd26f8626c03b424f7140d454031d1dcb8d23513" }, 57 | "nvim-luaref": { "branch": "main", "commit": "9cd3ed50d5752ffd56d88dd9e395ddd3dc2c7127" }, 58 | "nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" }, 59 | "nvim-pqf": { "branch": "main", "commit": "148ee2ca8b06d83fd9bf6f9b9497724ad39a07d6" }, 60 | "nvim-spider": { "branch": "main", "commit": "9b9a1cf88a10790de69d3b0562d7d612f23561d5" }, 61 | "nvim-treesitter": { "branch": "master", "commit": "ffd284c4706d91c0d94916995f584b22ce89afcb" }, 62 | "nvim-treesitter-textobjects": { "branch": "master", "commit": "143856b1cee509a190cc8c17ddb0638002171235" }, 63 | "nvim-various-textobjs": { "branch": "main", "commit": "ea78fbdac4a2ca10e2922721233a769770afb45b" }, 64 | "nvim-web-devicons": { "branch": "master", "commit": "ab4cfee554e501f497bce0856788d43cf2eb93d7" }, 65 | "obsidian.nvim": { "branch": "main", "commit": "14e0427bef6c55da0d63f9a313fd9941be3a2479" }, 66 | "octo.nvim": { "branch": "master", "commit": "aa5dfa573220a0a511a25ee14ce1570b6c23e56a" }, 67 | "one-small-step-for-vimkind": { "branch": "main", "commit": "b9def31568d20b16f7da9479a4174d165046fe8a" }, 68 | "org-bullets.nvim": { "branch": "main", "commit": "21437cfa99c70f2c18977bffd423f912a7b832ea" }, 69 | "orgmode": { "branch": "master", "commit": "dafb6aa6e2e09362e304a933974c563bab0b464f" }, 70 | "plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" }, 71 | "profile.nvim": { "branch": "master", "commit": "30433d7513f0d14665c1cfcea501c90f8a63e003" }, 72 | "quick-scope": { "branch": "master", "commit": "e8227e3e9bc799245b7df9045ab246266b287725" }, 73 | "quicker.nvim": { "branch": "master", "commit": "1798be71cdcb15fb84fa8054148a56e17fd391dc" }, 74 | "render-markdown.nvim": { "branch": "main", "commit": "81374ffd26f9a9d5f44274a9e7e60547b5fd106f" }, 75 | "substitute.nvim": { "branch": "main", "commit": "97f49d16f8eea7967d41db4f657dd63af53eeba1" }, 76 | "treesj": { "branch": "main", "commit": "48c1a7539f376fd40ceb9cf12d697040fcf90649" }, 77 | "ultimate-autopair.nvim": { "branch": "v0.6", "commit": "b24b97c538b71b6de0ce9d84e47df27b6ecafd76" }, 78 | "vim-caser": { "branch": "master", "commit": "6bc9f41d170711c58e0157d882a5fe8c30f34bf6" }, 79 | "vim-fugitive": { "branch": "master", "commit": "4a745ea72fa93bb15dd077109afbb3d1809383f2" }, 80 | "vim-qf": { "branch": "master", "commit": "1dcedfc42c017fd99477bcf36fb1f41e95809800" }, 81 | "vim-repeat": { "branch": "master", "commit": "65846025c15494983dafe5e3b46c8f88ab2e9635" }, 82 | "vim-rhubarb": { "branch": "master", "commit": "386daa2e9d98e23e27ad089afcbe5c5a903e488d" }, 83 | "vim-sandwich": { "branch": "master", "commit": "74cf93d58ccc567d8e2310a69860f1b93af19403" }, 84 | "vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" }, 85 | "vim-table-mode": { "branch": "master", "commit": "e4365bde024f73e205eefa2fb78e3029ddb92ea9" }, 86 | "workspace-diagnostics.nvim": { "branch": "main", "commit": "573ff93c47898967efdfbc6587a1a39e3c2d365e" } 87 | } 88 | -------------------------------------------------------------------------------- /vim/lua/autocmds.lua: -------------------------------------------------------------------------------- 1 | local group = vim.api.nvim_create_augroup("MyAutogroup", {}) 2 | vim.g.rust_changedtick = 0 3 | 4 | -- vim.api.nvim_create_autocmd("CursorMoved", { 5 | -- group = group, 6 | -- pattern = "*", 7 | -- callback = require("fold").close_all, 8 | -- }) 9 | vim.api.nvim_create_autocmd("TextYankPost", { 10 | group = group, 11 | pattern = "*", 12 | callback = function() 13 | vim.highlight.on_yank { higroup = "HighlightedyankRegion", timeout = 150 } 14 | end, 15 | }) 16 | vim.api.nvim_create_autocmd("FileType", { 17 | group = group, 18 | pattern = "*", 19 | callback = function() 20 | vim.opt_local.formatoptions:remove "o" 21 | end, 22 | }) 23 | vim.api.nvim_create_autocmd("FileType", { 24 | group = group, 25 | pattern = "dapui_*", 26 | callback = function() 27 | vim.opt_local.spell = false 28 | end, 29 | }) 30 | vim.api.nvim_create_autocmd("FileType", { 31 | pattern = "dap-repl", 32 | callback = function(args) 33 | vim.api.nvim_buf_set_option(args.buf, "buflisted", false) 34 | end, 35 | }) 36 | vim.api.nvim_create_autocmd("VimResized", { 37 | group = group, 38 | pattern = "*", 39 | command = "wincmd =", 40 | }) 41 | -- vim.api.nvim_create_autocmd("BufWritePre", { 42 | -- group = group, 43 | -- pattern = "*", 44 | -- callback = require("buffers").write_pre, 45 | -- }) 46 | -- vim.api.nvim_create_autocmd("BufWritePost", { 47 | -- group = group, 48 | -- pattern = "*", 49 | -- command = "GitGutter", 50 | -- }) 51 | vim.api.nvim_create_autocmd("User", { 52 | group = group, 53 | pattern = "FugitiveBlob", 54 | callback = function() 55 | vim.opt_local.winhighlight = "DiffAdd:FuDiffDeleteOld,DiffDelete:FuDiffDelete" 56 | end, 57 | }) 58 | -- vim.api.nvim_create_autocmd("BufEnter", { 59 | -- group = group, 60 | -- pattern = "Cargo.toml", 61 | -- callback = function() 62 | -- vim.keymap.set("n", "", require("crates").show_popup, { 63 | -- noremap = true, 64 | -- silent = true, 65 | -- buffer = true, 66 | -- }) 67 | -- end, 68 | -- }) 69 | 70 | vim.api.nvim_create_autocmd({ "TextChanged", "TextChangedI", "TextChangedP", "TextChangedT" }, { 71 | group = group, 72 | pattern = "*.rs", 73 | callback = function() 74 | vim.g.rust_changedtick = vim.g.rust_changedtick + 1 75 | end, 76 | }) 77 | -------------------------------------------------------------------------------- /vim/lua/buffers.lua: -------------------------------------------------------------------------------- 1 | local utils = require "utils" 2 | local M = {} 3 | 4 | M.close_others = function() 5 | local bufnr = vim.api.nvim_get_current_buf() 6 | local last_buffer = vim.fn.bufnr "$" 7 | local deleted = 0 8 | local n = 1 9 | while n <= last_buffer do 10 | if n ~= bufnr and vim.fn.buflisted(n) ~= 0 then 11 | if vim.api.nvim_buf_get_option(n, "modified") then 12 | print(string.format("Buffer %d is modified", n)) 13 | vim.cmd(string.format("buffer %d", n)) 14 | return 15 | else 16 | vim.cmd(string.format("silent bdel %d", n)) 17 | if vim.fn.buflisted(n) == 0 then 18 | deleted = deleted + 1 19 | end 20 | end 21 | end 22 | 23 | n = n + 1 24 | end 25 | 26 | vim.cmd [[silent only]] 27 | 28 | print(utils._if(deleted == 1, "1 buffer deleted", string.format("%d buffers deleted", deleted))) 29 | end 30 | 31 | M.count = function() 32 | local count = 0 33 | local last_buffer = vim.fn.bufnr "$" 34 | local n = 1 35 | while n <= last_buffer do 36 | if vim.fn.buflisted(n) ~= 0 then 37 | count = count + 1 38 | end 39 | n = n + 1 40 | end 41 | 42 | return count 43 | end 44 | 45 | M.close = function() 46 | if M.count() <= 1 then 47 | vim.cmd [[q]] 48 | else 49 | vim.cmd [[bd]] 50 | end 51 | end 52 | 53 | M.write_pre = function() 54 | local dir = vim.fn.expand "%:p:h" 55 | if vim.fn.isdirectory(dir) == 0 then 56 | vim.fn.mkdir(dir, "p") 57 | end 58 | end 59 | 60 | return M 61 | -------------------------------------------------------------------------------- /vim/lua/commands.lua: -------------------------------------------------------------------------------- 1 | vim.api.nvim_create_user_command("GitBase", function(opts) 2 | require("git").set_base(opts.args) 3 | end, { 4 | nargs = "*", 5 | complete = "customlist,fugitive#CompleteObject", 6 | }) 7 | -------------------------------------------------------------------------------- /vim/lua/efm/black.lua: -------------------------------------------------------------------------------- 1 | return { 2 | formatCommand = "black --fast ${-l:lineLength} -", 3 | formatStdin = true, 4 | } 5 | -------------------------------------------------------------------------------- /vim/lua/efm/cbfmt.lua: -------------------------------------------------------------------------------- 1 | return { 2 | formatCommand = "cbfmt --best-effort --stdin-filepath ${INPUT}", 3 | formatStdin = true, 4 | } 5 | -------------------------------------------------------------------------------- /vim/lua/efm/cspell.lua: -------------------------------------------------------------------------------- 1 | return { 2 | lintCommand = "cspell --quiet --config ~/dotfiles/cspell/cspell.config.yaml stdin", 3 | lintIgnoreExitCode = true, 4 | lintStdin = true, 5 | lintFormats = { "./:%l:%c - %m" }, 6 | lintSource = "cspell", 7 | lintSeverity = 4, 8 | } 9 | -------------------------------------------------------------------------------- /vim/lua/efm/eslint.lua: -------------------------------------------------------------------------------- 1 | return { 2 | lintCommand = "eslint_d -f visualstudio --stdin --stdin-filename ${INPUT}", 3 | lintIgnoreExitCode = true, 4 | lintStdin = true, 5 | lintFormats = { 6 | "%f(%l,%c): %tarning %m", 7 | "%f(%l,%c): %rror %m", 8 | }, 9 | lintSource = "eslint", 10 | } 11 | -------------------------------------------------------------------------------- /vim/lua/efm/flake8.lua: -------------------------------------------------------------------------------- 1 | return { 2 | lintCommand = "flake8 --max-line-length 160 --format '%(path)s:%(row)d:%(col)d: %(code)s %(code)s %(text)s' --stdin-display-name ${INPUT} -", 3 | lintStdin = true, 4 | lintIgnoreExitCode = true, 5 | lintFormats = { "%f:%l:%c: %t%n%n%n %m" }, 6 | lintSource = "flake8", 7 | } 8 | -------------------------------------------------------------------------------- /vim/lua/efm/go_vet.lua: -------------------------------------------------------------------------------- 1 | return { 2 | lintCommand = "go vet", 3 | lintIgnoreExitCode = true, 4 | lintFormats = { "%f:%l:%c: %m" }, 5 | lintSource = "go vet", 6 | } 7 | -------------------------------------------------------------------------------- /vim/lua/efm/goimports.lua: -------------------------------------------------------------------------------- 1 | return { 2 | formatCommand = "goimports", 3 | formatStdin = true, 4 | } 5 | -------------------------------------------------------------------------------- /vim/lua/efm/isort.lua: -------------------------------------------------------------------------------- 1 | return { 2 | formatCommand = "isort --stdout ${-l:lineLength} --profile black -", 3 | formatStdin = true, 4 | } 5 | -------------------------------------------------------------------------------- /vim/lua/efm/luacheck.lua: -------------------------------------------------------------------------------- 1 | return { 2 | lintCommand = "luacheck --codes --formatter plain --std luajit --filename ${INPUT} -", 3 | lintIgnoreExitCode = true, 4 | lintStdin = true, 5 | lintFormats = { "%f:%l:%c: %m" }, 6 | lintSource = "luacheck", 7 | } 8 | -------------------------------------------------------------------------------- /vim/lua/efm/misspell.lua: -------------------------------------------------------------------------------- 1 | return { 2 | lintCommand = "misspell", 3 | lintIgnoreExitCode = true, 4 | lintStdin = true, 5 | lintFormats = { "%f:%l:%c: %m" }, 6 | lintSource = "misspell", 7 | } 8 | -------------------------------------------------------------------------------- /vim/lua/efm/mypy.lua: -------------------------------------------------------------------------------- 1 | return { 2 | lintCommand = "mypy --show-column-numbers --ignore-missing-imports --show-error-codes", 3 | lintFormats = { 4 | "%f:%l:%c: %trror: %m", 5 | "%f:%l:%c: %tarning: %m", 6 | "%f:%l:%c: %tote: %m", 7 | }, 8 | lintSource = "mypy", 9 | } 10 | -------------------------------------------------------------------------------- /vim/lua/efm/opa.lua: -------------------------------------------------------------------------------- 1 | return { 2 | formatCommand = "opa fmt", 3 | } 4 | -------------------------------------------------------------------------------- /vim/lua/efm/prettier.lua: -------------------------------------------------------------------------------- 1 | return { 2 | formatCommand = [[$([ -n "$(command -v node_modules/.bin/prettier)" ] && echo "node_modules/.bin/prettier" || echo "prettier") --stdin-filepath ${INPUT} ${--config-precedence:configPrecedence} ${--tab-width:tabWidth} ${--single-quote:singleQuote} ${--trailing-comma:trailingComma}]], 3 | formatStdin = true, 4 | } 5 | -------------------------------------------------------------------------------- /vim/lua/efm/shellcheck.lua: -------------------------------------------------------------------------------- 1 | return { 2 | lintCommand = "shellcheck -f gcc -x -", 3 | lintStdin = true, 4 | lintFormats = { "%f:%l:%c: %trror: %m", "%f:%l:%c: %tarning: %m", "%f:%l:%c: %tote: %m" }, 5 | lintSource = "shellcheck", 6 | } 7 | -------------------------------------------------------------------------------- /vim/lua/efm/shfmt.lua: -------------------------------------------------------------------------------- 1 | return { 2 | formatCommand = "shfmt ${-i:tabWidth}", 3 | } 4 | -------------------------------------------------------------------------------- /vim/lua/efm/staticcheck.lua: -------------------------------------------------------------------------------- 1 | return { 2 | lintCommand = "staticcheck", 3 | lintIgnoreExitCode = true, 4 | lintFormats = { "%f:%l:%c: %m" }, 5 | lintSource = "staticcheck", 6 | } 7 | -------------------------------------------------------------------------------- /vim/lua/efm/stylua.lua: -------------------------------------------------------------------------------- 1 | return { 2 | formatCommand = "stylua -s --stdin-filepath ${INPUT} -", 3 | formatStdin = true, 4 | } 5 | -------------------------------------------------------------------------------- /vim/lua/efm/terraform.lua: -------------------------------------------------------------------------------- 1 | return { 2 | formatCommand = "terraform fmt -", 3 | formatStdin = true, 4 | } 5 | -------------------------------------------------------------------------------- /vim/lua/efm/vint.lua: -------------------------------------------------------------------------------- 1 | return { 2 | lintCommand = "vint -", 3 | lintStdin = true, 4 | lintFormats = { "%f:%l:%c: %m" }, 5 | lintSource = "vint", 6 | } 7 | -------------------------------------------------------------------------------- /vim/lua/fold.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | M.close_all = function() 4 | if vim.wo.diff and #vim.api.nvim_list_wins() > 1 and vim.fn.foldlevel(vim.fn.getcurpos()[2]) == 0 then 5 | local view = vim.fn.winsaveview() 6 | local win = vim.api.nvim_get_current_win() 7 | vim.cmd [[windo normal! zM]] 8 | vim.api.nvim_set_current_win(win) 9 | vim.fn.winrestview(view) 10 | end 11 | end 12 | 13 | _G.foldtext = function() 14 | local line_count = vim.v.foldend - vim.v.foldstart + 1 15 | local foldtext = vim.treesitter.foldtext() 16 | 17 | if type(foldtext) == "table" then 18 | local pos = 1 19 | local whitespace = string.match(foldtext[1][1], "^%s+") or "" 20 | if #foldtext[1][1] == #whitespace then 21 | -- First part of the text is just whitespace, insert line count after 22 | pos = 2 23 | elseif #whitespace > 0 then 24 | -- First part of the text has leading whitespace, split it into two parts and insert line count in 25 | -- between 26 | foldtext[1][1] = string.gsub(foldtext[1][1], "^%s*", "") 27 | table.insert(foldtext, 1, { whitespace, {} }) 28 | pos = 2 29 | end 30 | table.insert(foldtext, pos, { "] ", "Comment" }) 31 | table.insert(foldtext, pos, { string.format("%d", line_count), "Number" }) 32 | table.insert(foldtext, pos, { "[", "Comment" }) 33 | table.insert(foldtext, pos, { " ", "LspCodeLens" }) 34 | end 35 | 36 | return foldtext 37 | end 38 | 39 | return M 40 | -------------------------------------------------------------------------------- /vim/lua/git.lua: -------------------------------------------------------------------------------- 1 | local gitsigns = require "gitsigns" 2 | 3 | local M = {} 4 | 5 | M.is_repo = function() 6 | vim.fn.system "git -C . rev-parse" 7 | return vim.v.shell_error == 0 8 | end 9 | 10 | M.setup = function() 11 | vim.g.git_base = "HEAD" 12 | end 13 | 14 | M.set_base = function(base) 15 | if not base or base == "" then 16 | base = "HEAD" 17 | end 18 | vim.g.git_base = base 19 | 20 | gitsigns.change_base(base, true) 21 | 22 | print(string.format("Now diffing against %s", vim.g.git_base)) 23 | end 24 | 25 | return M 26 | -------------------------------------------------------------------------------- /vim/lua/keymaps.lua: -------------------------------------------------------------------------------- 1 | local lists = require "lists" 2 | 3 | vim.keymap.set("n", "w", ":update") 4 | vim.keymap.set("n", "q", require("buffers").close) 5 | vim.keymap.set("n", "", require("buffers").close_others) 6 | vim.keymap.set("n", "", "") 7 | 8 | vim.keymap.set({ "n", "o", "v" }, "H", "^") 9 | vim.keymap.set({ "n", "o", "v" }, "L", "$") 10 | vim.keymap.set({ "n", "v" }, "J", "5j") 11 | vim.keymap.set({ "n", "v" }, "K", "5k") 12 | vim.keymap.set({ "n", "v" }, "j", "v:count ? (v:count > 5 ? \"m'\" . v:count : '') . 'j' : 'gj'", { expr = true }) 13 | vim.keymap.set({ "n", "v" }, "k", "v:count ? (v:count > 5 ? \"m'\" . v:count : '') . 'k' : 'gk'", { expr = true }) 14 | vim.keymap.set("c", "", "") 15 | vim.keymap.set("c", "", "") 16 | vim.keymap.set("n", "j", function() 17 | vim.diagnostic.goto_next { float = false } 18 | end) 19 | vim.keymap.set("n", "k", function() 20 | vim.diagnostic.goto_prev { float = false } 21 | end) 22 | 23 | vim.keymap.set("n", "N", ":e %:h/") 24 | 25 | vim.keymap.set("n", "z", "1z=") 26 | 27 | vim.keymap.set("n", "rr", ":%s/\\v()", { silent = false }) 28 | vim.keymap.set("x", "rr", ":s/\\v%V()", { silent = false }) 29 | 30 | vim.keymap.set("x", "P", [['"_d"'.v:register.'P']], { expr = true }) 31 | 32 | vim.keymap.set("v", "<", "", ">gv") 34 | 35 | vim.keymap.set("v", "p", '"_dP') 36 | 37 | vim.keymap.set("n", "x", '"_x') 38 | 39 | vim.keymap.set("n", "", function() 40 | lists.move "up" 41 | end) 42 | vim.keymap.set("n", "", function() 43 | lists.move "down" 44 | end) 45 | vim.keymap.set("n", "", function() 46 | lists.move "left" 47 | end) 48 | vim.keymap.set("n", "", function() 49 | lists.move "right" 50 | end) 51 | 52 | vim.keymap.set("n", "a", function() 53 | lists.change_active "Quickfix" 54 | vim.api.nvim_feedkeys(":silent grep ", "c", false) 55 | end, { silent = false }) 56 | 57 | vim.keymap.set("n", "i", function() 58 | local bufnr = vim.api.nvim_get_current_buf() 59 | local config = require("ibl.config").get_config(bufnr) 60 | local scope = require("ibl.scope").get(bufnr, config) 61 | if scope then 62 | local row, column = scope:start() 63 | vim.api.nvim_win_set_cursor(vim.api.nvim_get_current_win(), { row + 1, column }) 64 | end 65 | end) 66 | 67 | vim.cmd [[cabbrev nw noautocmd write]] 68 | -------------------------------------------------------------------------------- /vim/lua/lists.lua: -------------------------------------------------------------------------------- 1 | local utils = require "utils" 2 | local M = {} 3 | 4 | local quickfix = "Quickfix" 5 | local location = "Location" 6 | 7 | M.setup = function() 8 | vim.g.active_list = location 9 | end 10 | 11 | M.notify_list = function() 12 | vim.notify_once(string.format("Switched to %s list", vim.g.active_list), vim.log.levels.INFO, { 13 | title = "Lists", 14 | }) 15 | end 16 | 17 | M.change_active = function(list) 18 | if vim.g.active_list ~= list then 19 | vim.g.active_list = list 20 | M.notify_list() 21 | end 22 | end 23 | 24 | M.toggle_active = function() 25 | vim.g.active_list = utils._if(vim.g.active_list == quickfix, location, quickfix) 26 | M.notify_list() 27 | end 28 | 29 | vim.api.nvim_create_user_command("Filter", function(opts) 30 | local bang = "" 31 | if opts.bang then 32 | bang = "!" 33 | end 34 | if vim.g.active_list == quickfix then 35 | vim.cmd(string.format("Cfilter%s %s", bang, opts.args)) 36 | else 37 | vim.cmd(string.format("Lfilter%s %s", bang, opts.args)) 38 | end 39 | end, { bang = true }) 40 | 41 | M.move = function(direction) 42 | local wrap 43 | wrap = function(cmd, backup) 44 | local status = pcall(vim.cmd, cmd) 45 | if not status then 46 | wrap(backup, "echo 'No Errors'") 47 | end 48 | end 49 | 50 | if direction == "up" then 51 | if vim.g.active_list == quickfix then 52 | wrap("cprevious", "clast") 53 | else 54 | wrap("labove", "llast") 55 | end 56 | elseif direction == "down" then 57 | if vim.g.active_list == quickfix then 58 | wrap("cnext", "cfirst") 59 | else 60 | wrap("lbelow", "lfirst") 61 | end 62 | elseif direction == "left" then 63 | if vim.g.active_list == quickfix then 64 | pcall(vim.cmd, [[colder]]) 65 | else 66 | pcall(vim.cmd, [[lolder]]) 67 | end 68 | elseif direction == "right" then 69 | if vim.g.active_list == quickfix then 70 | pcall(vim.cmd, [[cnewer]]) 71 | else 72 | pcall(vim.cmd, [[lnewer]]) 73 | end 74 | end 75 | end 76 | 77 | return M 78 | -------------------------------------------------------------------------------- /vim/lua/lsp/diagnostics.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | local serverity_map = { 4 | "DiagnosticError", 5 | "DiagnosticWarn", 6 | "DiagnosticInfo", 7 | "DiagnosticHint", 8 | } 9 | local icon_map = { 10 | "  ", 11 | "  ", 12 | "  ", 13 | "  ", 14 | } 15 | 16 | local function source_string(source, code) 17 | if code then 18 | return string.format(" [%s %s]", source, code) 19 | else 20 | return string.format(" [%s]", source) 21 | end 22 | end 23 | 24 | M.line_diagnostics = function() 25 | local bufnr, lnum = unpack(vim.fn.getcurpos()) 26 | local diagnostics = vim.lsp.diagnostic.get_line_diagnostics(bufnr, lnum - 1, {}) 27 | if vim.tbl_isempty(diagnostics) then 28 | return 29 | end 30 | 31 | local lines = {} 32 | 33 | for _, diagnostic in ipairs(diagnostics) do 34 | table.insert( 35 | lines, 36 | icon_map[diagnostic.severity] 37 | .. " " 38 | .. diagnostic.message:gsub("\n", " ") 39 | .. source_string(diagnostic.source, diagnostic.code) 40 | ) 41 | end 42 | 43 | local floating_bufnr, _ = vim.lsp.util.open_floating_preview(lines, "plaintext", { 44 | border = vim.g.floating_window_border_dark, 45 | focus_id = "line", 46 | }) 47 | 48 | for i, diagnostic in ipairs(diagnostics) do 49 | local message_length = #lines[i] - #source_string(diagnostic.source, diagnostic.code) 50 | vim.api.nvim_buf_add_highlight(floating_bufnr, -1, serverity_map[diagnostic.severity], i - 1, 0, message_length) 51 | vim.api.nvim_buf_add_highlight(floating_bufnr, -1, "DiagnosticSource", i - 1, message_length, -1) 52 | end 53 | end 54 | 55 | return M 56 | -------------------------------------------------------------------------------- /vim/lua/lsp/handlers.lua: -------------------------------------------------------------------------------- 1 | local util = require "vim.lsp.util" 2 | local log = require "vim.lsp.log" 3 | 4 | vim.lsp.handlers["textDocument/publishDiagnostics"] = function(...) 5 | vim.lsp.with(vim.lsp.diagnostic.on_publish_diagnostics, { 6 | underline = true, 7 | update_in_insert = false, 8 | })(...) 9 | pcall(vim.diagnostic.setloclist, { open = false }) 10 | end 11 | 12 | vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { 13 | border = vim.g.floating_window_border_dark, 14 | }) 15 | 16 | vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, { 17 | border = vim.g.floating_window_border_dark, 18 | }) 19 | 20 | local inlay_hint_init = {} 21 | vim.lsp.handlers["experimental/serverStatus"] = function(_, result, ctx, _) 22 | if not result.quiescent then 23 | return 24 | end 25 | if inlay_hint_init[ctx.client_id] then 26 | return 27 | end 28 | local client = vim.lsp.get_client_by_id(ctx.client_id) 29 | if client == nil then 30 | return 31 | end 32 | if not client.supports_method "textDocument/inlayHint" then 33 | inlay_hint_init[ctx.client_id] = true 34 | return 35 | end 36 | vim.lsp.inlay_hint.enable(false, nil) 37 | vim.lsp.inlay_hint.enable(true, nil) 38 | inlay_hint_init[ctx.client_id] = true 39 | end 40 | 41 | local function location_handler(_, result, ctx, config) 42 | if result == nil or vim.tbl_isempty(result) then 43 | local _ = log.info() and log.info(ctx.method, "No location found") 44 | return nil 45 | end 46 | local client = vim.lsp.get_client_by_id(ctx.client_id) 47 | 48 | config = config or {} 49 | if vim.tbl_islist(result) then 50 | local title = "LSP locations" 51 | 52 | local seen = {} 53 | local new_result = {} 54 | for _, r in ipairs(result) do 55 | local uri = r.targetUri .. tostring(r.targetRange.start.line) 56 | if not seen[uri] then 57 | table.insert(new_result, r) 58 | end 59 | seen[uri] = true 60 | end 61 | 62 | if #new_result == 1 then 63 | util.jump_to_location(new_result[1], client.offset_encoding, config.reuse_win) 64 | return 65 | end 66 | local items = util.locations_to_items(new_result, client.offset_encoding) 67 | 68 | util.jump_to_location(result[1], client.offset_encoding, config.reuse_win) 69 | 70 | vim.fn.setqflist({}, " ", { title = title, items = items }) 71 | require("lists").change_active "Quickfix" 72 | 73 | local win = vim.api.nvim_get_current_win() 74 | vim.api.nvim_command "botright copen" 75 | vim.api.nvim_set_current_win(win) 76 | else 77 | util.jump_to_location(result, client.offset_encoding, config.reuse_win) 78 | end 79 | end 80 | 81 | -- vim.lsp.handlers["textDocument/declaration"] = location_handler 82 | -- vim.lsp.handlers["textDocument/definition"] = location_handler 83 | -- vim.lsp.handlers["textDocument/typeDefinition"] = location_handler 84 | -- vim.lsp.handlers["textDocument/implementation"] = location_handler 85 | 86 | -- local client_notifs = {} 87 | 88 | -- local function get_notif_data(client_id, token) 89 | -- if not client_notifs[client_id] then 90 | -- client_notifs[client_id] = {} 91 | -- end 92 | -- 93 | -- if not client_notifs[client_id][token] then 94 | -- client_notifs[client_id][token] = {} 95 | -- end 96 | -- 97 | -- return client_notifs[client_id][token] 98 | -- end 99 | -- 100 | -- local spinner_frames = { "⣾", "⣽", "⣻", "⢿", "⡿", "⣟", "⣯", "⣷" } 101 | 102 | -- local function update_spinner(client_id, token) 103 | -- local notif_data = get_notif_data(client_id, token) 104 | -- 105 | -- if notif_data.spinner then 106 | -- local new_spinner = (notif_data.spinner + 1) % #spinner_frames 107 | -- notif_data.spinner = new_spinner 108 | -- 109 | -- notif_data.notification = vim.notify(nil, nil, { 110 | -- hide_from_history = true, 111 | -- icon = spinner_frames[new_spinner], 112 | -- replace = notif_data.notification, 113 | -- }) 114 | -- 115 | -- vim.defer_fn(function() 116 | -- update_spinner(client_id, token) 117 | -- end, 100) 118 | -- end 119 | -- end 120 | -- 121 | -- local function format_title(title, client_name) 122 | -- return client_name .. (#title > 0 and ": " .. title or "") 123 | -- end 124 | -- 125 | -- local function format_message(message, percentage) 126 | -- return (percentage and percentage .. "%\t" or "") .. (message or "") 127 | -- end 128 | 129 | -- vim.lsp.handlers["$/progress"] = function(_, result, ctx) 130 | -- local client_id = ctx.client_id 131 | -- local client = vim.lsp.get_client_by_id(client_id) 132 | -- if client.name == "sumneko_lua" or client.name == "rust_analyzer" or client.name == "clangd" then 133 | -- return 134 | -- end 135 | -- local val = result.value 136 | -- 137 | -- if not val.kind then 138 | -- return 139 | -- end 140 | -- 141 | -- local notif_data = get_notif_data(client_id, result.token) 142 | -- 143 | -- if val.kind == "begin" then 144 | -- local message = format_message(val.message, val.percentage) 145 | -- 146 | -- notif_data.notification = vim.notify(message, "info", { 147 | -- title = format_title(val.title, vim.lsp.get_client_by_id(client_id).name), 148 | -- icon = spinner_frames[1], 149 | -- timeout = false, 150 | -- hide_from_history = false, 151 | -- }) 152 | -- 153 | -- notif_data.spinner = 1 154 | -- update_spinner(client_id, result.token) 155 | -- elseif val.kind == "report" and notif_data then 156 | -- notif_data.notification = vim.notify(format_message(val.message, val.percentage), "info", { 157 | -- replace = notif_data.notification, 158 | -- hide_from_history = false, 159 | -- }) 160 | -- elseif val.kind == "end" and notif_data then 161 | -- notif_data.notification = vim.notify(val.message and format_message(val.message) or "Complete", "info", { 162 | -- icon = "", 163 | -- replace = notif_data.notification, 164 | -- timeout = 3000, 165 | -- }) 166 | -- 167 | -- notif_data.spinner = nil 168 | -- end 169 | -- end 170 | -------------------------------------------------------------------------------- /vim/lua/luasnippets/all.lua: -------------------------------------------------------------------------------- 1 | local regular = {} 2 | 3 | local auto = { 4 | s( 5 | "nc", 6 | f(function() 7 | return string.format(vim.opt.commentstring:get(), " NO_COMMIT") 8 | end, {}) 9 | ), 10 | s( 11 | "todo ", 12 | f(function() 13 | return string.format(vim.opt.commentstring:get(), " TODO [Lukas]: ") 14 | end, {}), 15 | i(1), 16 | { condition = conds.line_begin } 17 | ), 18 | s( 19 | "fixme ", 20 | f(function() 21 | return string.format(vim.opt.commentstring:get(), " FIXME [Lukas]: ") 22 | end, {}), 23 | i(1), 24 | { condition = conds.line_begin } 25 | ), 26 | } 27 | 28 | return regular, auto 29 | -------------------------------------------------------------------------------- /vim/lua/luasnippets/gitcommit.lua: -------------------------------------------------------------------------------- 1 | local regular = {} 2 | 3 | local auto = { 4 | s("sci", { 5 | t "[skip ci]", 6 | }), 7 | } 8 | 9 | return regular, auto 10 | -------------------------------------------------------------------------------- /vim/lua/luasnippets/go.lua: -------------------------------------------------------------------------------- 1 | -- local go = require "refactoring.treesitter.langs.go" 2 | local utils = require "luasnippets.utils" 3 | 4 | local regular = {} 5 | 6 | local auto = { 7 | s( 8 | "ssp", 9 | fmt( 10 | [[ 11 | {logger}("{spacer} ┃ {file}:{line} > {path} > {input_rep}") 12 | {logger_rep}({input}) // NO_COMMIT 13 | {logger_rep}("{spacer}") 14 | ]], 15 | { 16 | logger = c(2, { 17 | t "fmt.Println", 18 | t "log.Info().Msg", 19 | }), 20 | logger_rep = rep(2), 21 | input = i(1), 22 | input_rep = f(function(args) 23 | return args[1][1]:gsub('"', '\\"'):gsub("\n", " ") 24 | end, 1), 25 | spacer = f(function(args) 26 | return args[1][1]:gsub(".", "-") 27 | end, 1), 28 | file = f(function() 29 | return vim.fn.expand "%:t" 30 | end), 31 | -- path = utils.path(go.new()), 32 | path = "", 33 | line = f(function() 34 | return tostring(vim.fn.line "." - 2) 35 | end), 36 | } 37 | ), 38 | { condition = conds.line_begin } 39 | ), 40 | 41 | s( 42 | "ssc", 43 | fmt( 44 | [[ 45 | {logger}("{file}:{line} > {path} [{counter}]") // NO_COMMIT 46 | ]], 47 | { 48 | logger = c(1, { 49 | t "fmt.Println", 50 | t "log.Info().Msg", 51 | }), 52 | file = f(function() 53 | return vim.fn.expand "%:t" 54 | end), 55 | -- path = utils.path(go.new()), 56 | path = "", 57 | counter = utils.counter "NO_COMMIT", 58 | line = f(function() 59 | return tostring(vim.fn.line "." - 2) 60 | end), 61 | } 62 | ), 63 | { condition = conds.line_begin } 64 | ), 65 | } 66 | 67 | return regular, auto 68 | -------------------------------------------------------------------------------- /vim/lua/luasnippets/lua.lua: -------------------------------------------------------------------------------- 1 | -- local lua = require "refactoring.treesitter.langs.lua" 2 | local utils = require "luasnippets.utils" 3 | 4 | local regular = { 5 | s( 6 | "M", 7 | fmt( 8 | [[ 9 | local M = {{}} 10 | 11 | {} 12 | 13 | return M 14 | ]], 15 | { 16 | i(1), 17 | } 18 | ), 19 | { condition = conds.line_begin } 20 | ), 21 | 22 | s( 23 | "use", 24 | fmt( 25 | [[ 26 | use {{ 27 | "{repo}", 28 | config = "require 'plugins.{file}'", 29 | }} 30 | ]], 31 | { 32 | repo = i(1), 33 | file = f(function(args) 34 | local parts = vim.split(args[1][1]:gsub("-", "_"), "/", true) 35 | return parts[#parts] or "" 36 | end, 1), 37 | } 38 | ), 39 | { condition = conds.line_begin } 40 | ), 41 | } 42 | 43 | local auto = { 44 | s("ssp", { 45 | t "_G.P(", 46 | i(1), 47 | t ") -- NO_COMMIT", 48 | }, { condition = conds.line_begin }), 49 | 50 | s( 51 | "ssc", 52 | fmt( 53 | [[ 54 | print("{file}:{line} -> {path} [{counter}]") -- NO_COMMIT 55 | ]], 56 | { 57 | file = f(function() 58 | return vim.fn.expand "%:t" 59 | end), 60 | -- path = utils.path(lua.new()), 61 | path = "", 62 | counter = utils.counter "NO_COMMIT", 63 | line = f(function() 64 | return tostring(vim.fn.line "." - 2) 65 | end), 66 | } 67 | ), 68 | { condition = conds.line_begin } 69 | ), 70 | 71 | s( 72 | "lreq", 73 | fmt( 74 | [[ 75 | local {loc} = require "{req}" 76 | ]], 77 | { 78 | req = i(1), 79 | loc = f(function(args) 80 | local parts = vim.split(args[1][1], ".", true) 81 | return parts[#parts] or "" 82 | end, 1), 83 | } 84 | ), 85 | { condition = conds.line_begin } 86 | ), 87 | } 88 | 89 | return regular, auto 90 | -------------------------------------------------------------------------------- /vim/lua/luasnippets/org.lua: -------------------------------------------------------------------------------- 1 | local regular = {} 2 | 3 | local auto = { 4 | s( 5 | "src", 6 | fmt( 7 | [[ 8 | #+BEGIN_SRC {} 9 | {} 10 | #+END_SRC 11 | ]], 12 | { 13 | i(1), 14 | i(2), 15 | } 16 | ), 17 | { condition = conds.line_begin } 18 | ), 19 | s({ trig = "%s*%*", regTrig = true }, t "*", { condition = conds.line_begin }), 20 | s({ trig = "%s*%-%-%-", regTrig = true }, t "-----", { condition = conds.line_begin }), 21 | } 22 | 23 | return regular, auto 24 | -------------------------------------------------------------------------------- /vim/lua/luasnippets/python.lua: -------------------------------------------------------------------------------- 1 | -- local python = require "refactoring.treesitter.langs.python" 2 | local utils = require "luasnippets.utils" 3 | 4 | local regular = { 5 | s( 6 | "try", 7 | fmt( 8 | [[ 9 | try: 10 | {try} 11 | except {exception}{as}: 12 | {except} 13 | ]], 14 | { 15 | try = i(1, "..."), 16 | exception = i(2, "Exception"), 17 | as = c(3, { t " as error", t "" }), 18 | except = i(4, "..."), 19 | } 20 | ), 21 | { condition = conds.line_begin } 22 | ), 23 | } 24 | 25 | local auto = { 26 | s( 27 | "ssp", 28 | fmt( 29 | [[ 30 | {logger}("{spacer} ┃ {file}:{line} > {path} > {input_rep}") 31 | {logger_rep}({input}) # NO_COMMIT 32 | {logger_rep}("{spacer}") 33 | ]], 34 | { 35 | logger = c(2, { 36 | t "print", 37 | t "logger.info", 38 | }), 39 | logger_rep = rep(2), 40 | input = i(1), 41 | input_rep = f(function(args) 42 | return args[1][1]:gsub('"', '\\"'):gsub("\n", " ") 43 | end, 1), 44 | spacer = f(function(args) 45 | return args[1][1]:gsub(".", "-") 46 | end, 1), 47 | file = f(function() 48 | return vim.fn.expand "%:t" 49 | end, {}), 50 | path = "", 51 | -- path = utils.path(python.new()), 52 | line = f(function() 53 | return tostring(vim.fn.line "." - 2) 54 | end, {}), 55 | } 56 | ), 57 | { condition = conds.line_begin } 58 | ), 59 | 60 | s( 61 | "ssc", 62 | fmt( 63 | [[ 64 | {logger}("{file}:{line} > {path} [{counter}]") # NO_COMMIT 65 | ]], 66 | { 67 | logger = c(1, { 68 | t "print", 69 | t "logger.info", 70 | }), 71 | file = f(function() 72 | return vim.fn.expand "%:t" 73 | end), 74 | -- path = utils.path(python.new()), 75 | path = "", 76 | counter = utils.counter "NO_COMMIT", 77 | line = f(function() 78 | return tostring(vim.fn.line "." - 2) 79 | end), 80 | } 81 | ), 82 | { condition = conds.line_begin } 83 | ), 84 | } 85 | 86 | return regular, auto 87 | -------------------------------------------------------------------------------- /vim/lua/luasnippets/rust.lua: -------------------------------------------------------------------------------- 1 | local regular = {} 2 | 3 | local auto = { 4 | s( 5 | "cns", 6 | fmt([[println!("{{:?}}", {input}); // NO_COMMIT]], { 7 | input = i(1), 8 | }) 9 | ), 10 | 11 | s( 12 | "dbg", 13 | fmt([[dbg!({input}); /* NO_COMMIT */]], { 14 | input = i(1), 15 | }) 16 | ), 17 | 18 | s("slp", t [[std::thread::sleep(std::time::Duration::from_secs(10));]], { condition = conds.line_begin }), 19 | 20 | s( 21 | "ssp", 22 | fmt( 23 | [[ 24 | println!("{spacer} ┃ {file}:{line} > {input_rep}"); 25 | println!("{{:?}}", {input}); // NO_COMMIT 26 | println!("{spacer}"); 27 | ]], 28 | { 29 | input = i(1), 30 | input_rep = f(function(args) 31 | return args[1][1]:gsub('"', '\\"'):gsub("\n", " ") 32 | end, 1), 33 | spacer = f(function(args) 34 | return args[1][1]:gsub(".", "-") 35 | end, 1), 36 | file = f(function() 37 | return vim.fn.expand "%:t" 38 | end), 39 | line = f(function() 40 | return tostring(vim.fn.line "." - 2) 41 | end), 42 | } 43 | ), 44 | { condition = conds.line_begin } 45 | ), 46 | 47 | s( 48 | "derive", 49 | fmt("#[derive({input})]", { 50 | input = i(1), 51 | }), 52 | { condition = conds.line_begin } 53 | ), 54 | } 55 | 56 | return regular, auto 57 | -------------------------------------------------------------------------------- /vim/lua/luasnippets/typescript.lua: -------------------------------------------------------------------------------- 1 | -- local typescript = require "refactoring.treesitter.langs.typescript" 2 | local utils = require "luasnippets.utils" 3 | 4 | local regular = { 5 | s( 6 | "describe", 7 | fmt( 8 | [[ 9 | describe('{input}', () => {{ 10 | }}); 11 | ]], 12 | { input = i(1) } 13 | ) 14 | ), 15 | s( 16 | "it", 17 | fmt( 18 | [[ 19 | it('should {input}', async () => {{ 20 | }}); 21 | ]], 22 | { input = i(1) } 23 | ) 24 | ), 25 | } 26 | 27 | local auto = { 28 | s( 29 | "cns", 30 | fmt([[console.log({input}) // NO_COMMIT]], { 31 | input = i(1), 32 | }) 33 | ), 34 | 35 | s( 36 | "stringy", 37 | fmt([[console.log(JSON.stringify({input}, null, 2)) // NO_COMMIT]], { 38 | input = i(1), 39 | }) 40 | ), 41 | 42 | s( 43 | "ssp", 44 | fmt( 45 | [[ 46 | {logger}("{spacer} ┃ {file}:{line} > {path} > {input_rep}") 47 | {logger}({input}) // NO_COMMIT 48 | {logger}("{spacer}") 49 | ]], 50 | { 51 | logger = t "console.log", 52 | input = i(1), 53 | input_rep = f(function(args) 54 | return args[1][1]:gsub('"', '\\"'):gsub("\n", " ") 55 | end, 1), 56 | spacer = f(function(args) 57 | return args[1][1]:gsub(".", "-") 58 | end, 1), 59 | file = f(function() 60 | return vim.fn.expand "%:t" 61 | end), 62 | -- path = utils.path(typescript.new()), 63 | path = "", 64 | line = f(function() 65 | return tostring(vim.fn.line "." - 2) 66 | end), 67 | } 68 | ), 69 | { condition = conds.line_begin } 70 | ), 71 | 72 | s( 73 | "ssc", 74 | fmt( 75 | [[ 76 | {logger}("{file}:{line} > {path} [{counter}]") // NO_COMMIT 77 | ]], 78 | { 79 | logger = t "console.log", 80 | file = f(function() 81 | return vim.fn.expand "%:t" 82 | end), 83 | -- path = utils.path(typescript.new()), 84 | path = "", 85 | counter = utils.counter "NO_COMMIT", 86 | line = f(function() 87 | return tostring(vim.fn.line "." - 2) 88 | end), 89 | } 90 | ), 91 | { condition = conds.line_begin } 92 | ), 93 | } 94 | 95 | return regular, auto 96 | -------------------------------------------------------------------------------- /vim/lua/luasnippets/utils.lua: -------------------------------------------------------------------------------- 1 | local ts_utils = require "nvim-treesitter.ts_utils" 2 | -- local navic = require "nvim-navic" 3 | local ls = require "luasnip" 4 | local f = ls.function_node 5 | 6 | local M = {} 7 | 8 | M.path = function(ts) 9 | return f(function() 10 | -- if navic.is_available() then 11 | -- return navic.get_location { highlight = false } 12 | -- end 13 | local cursor_node = ts_utils.get_node_at_cursor() 14 | local debug_path = ts and ts:get_debug_path(cursor_node) 15 | local path = {} 16 | for i = #debug_path, 1, -1 do 17 | table.insert(path, tostring(debug_path[i])) 18 | end 19 | 20 | return table.concat(path, " > ") 21 | end) 22 | end 23 | 24 | M.counter = function(pattern) 25 | return f(function() 26 | local counter = 0 27 | local lines = vim.api.nvim_buf_get_lines(0, 0, -1, false) 28 | for _, line in ipairs(lines) do 29 | if line:match(pattern) then 30 | counter = counter + 1 31 | end 32 | end 33 | return tostring(counter) 34 | end) 35 | end 36 | 37 | return M 38 | -------------------------------------------------------------------------------- /vim/lua/plugins/auto-session.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "rmagatti/auto-session", 3 | config = function() 4 | require("auto-session").setup {} 5 | end, 6 | } 7 | -------------------------------------------------------------------------------- /vim/lua/plugins/autopair.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "altermo/ultimate-autopair.nvim", 3 | config = function() 4 | require("ultimate-autopair").setup {} 5 | end, 6 | } 7 | -------------------------------------------------------------------------------- /vim/lua/plugins/bqf.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "kevinhwang91/nvim-bqf", 3 | event = "VeryLazy", 4 | enabled = false, 5 | config = function() 6 | require("bqf").setup { 7 | preview = { 8 | delay_syntax = 0, 9 | }, 10 | } 11 | end, 12 | } 13 | -------------------------------------------------------------------------------- /vim/lua/plugins/caser.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "arthurxavierx/vim-caser", 3 | event = "VeryLazy", 4 | } 5 | -------------------------------------------------------------------------------- /vim/lua/plugins/clear-action.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "luckasRanarison/clear-action.nvim", 3 | opts = { 4 | signs = { 5 | icons = { 6 | quickfix = "  ", 7 | refactor = " 󰌵 ", 8 | source = "  ", 9 | combined = " 󰌵 ", 10 | }, 11 | }, 12 | popup = { 13 | hide_cursor = true, 14 | border = vim.g.floating_window_border_dark, 15 | }, 16 | mappings = { 17 | code_action = "y", 18 | }, 19 | }, 20 | } 21 | -------------------------------------------------------------------------------- /vim/lua/plugins/comment.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "numToStr/Comment.nvim", 3 | event = "VeryLazy", 4 | config = function() 5 | require("Comment").setup() 6 | end, 7 | } 8 | -------------------------------------------------------------------------------- /vim/lua/plugins/crates.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "Saecki/crates.nvim", 3 | dependencies = { 4 | "nvim-lua/plenary.nvim", 5 | }, 6 | ft = "toml", 7 | config = function() 8 | require("crates").setup { 9 | popup = { 10 | border = vim.g.floating_window_border_dark, 11 | }, 12 | } 13 | end, 14 | } 15 | -------------------------------------------------------------------------------- /vim/lua/plugins/dev-container.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "https://github.com/esensar/nvim-dev-container", 3 | config = function() 4 | require("devcontainer").setup {} 5 | end, 6 | } 7 | -------------------------------------------------------------------------------- /vim/lua/plugins/devicons.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "kyazdani42/nvim-web-devicons", 3 | config = function() 4 | require("nvim-web-devicons").setup { 5 | default = true, 6 | } 7 | end, 8 | event = "VeryLazy", 9 | } 10 | -------------------------------------------------------------------------------- /vim/lua/plugins/diffview.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "sindrets/diffview.nvim", 3 | dependencies = { 4 | "nvim-lua/plenary.nvim", 5 | }, 6 | opts = { 7 | enhanced_diff_hl = true, 8 | hooks = { 9 | diff_buf_read = function(_) 10 | vim.opt_local.cursorlineopt = "number" 11 | -- vim.opt_local.winhighlight = "DiffDelete:DiffviewDiffDelete" 12 | end, 13 | }, 14 | }, 15 | } 16 | -------------------------------------------------------------------------------- /vim/lua/plugins/dressing.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "stevearc/dressing.nvim", 3 | event = "VeryLazy", 4 | config = function() 5 | require("dressing").setup { 6 | select = { 7 | backend = { "fzf_lua", "fzf" }, 8 | }, 9 | input = { 10 | override = function(conf) 11 | if conf.relative == "cursor" then 12 | conf.col = -1 13 | conf.row = 0 14 | end 15 | return conf 16 | end, 17 | get_config = function(conf) 18 | return conf 19 | end, 20 | }, 21 | } 22 | end, 23 | } 24 | -------------------------------------------------------------------------------- /vim/lua/plugins/flash.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "folke/flash.nvim", 3 | event = "VeryLazy", 4 | config = function() 5 | local flash = require "flash" 6 | flash.setup { 7 | labels = "asdfghjkl;vnryrueiwo", 8 | search = { 9 | multi_window = false, 10 | }, 11 | label = { 12 | uppercase = false, 13 | }, 14 | modes = { 15 | search = { 16 | enabled = true, 17 | }, 18 | char = { 19 | enabled = true, 20 | highlight = { backdrop = false }, 21 | multi_line = false, 22 | }, 23 | remote = { 24 | highlight = { backdrop = false }, 25 | remote_op = { restore = true, motion = true }, 26 | }, 27 | }, 28 | prompt = { 29 | enabled = false, 30 | }, 31 | } 32 | 33 | vim.keymap.set("o", "r", function() 34 | flash.remote { 35 | search = { 36 | mode = function(str) 37 | return "\\<" .. str 38 | end, 39 | }, 40 | } 41 | end) 42 | end, 43 | } 44 | -------------------------------------------------------------------------------- /vim/lua/plugins/fugitive.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "tpope/vim-fugitive", 3 | dependencies = { 4 | "tpope/vim-rhubarb", 5 | }, 6 | event = "VeryLazy", 7 | config = function() 8 | vim.keymap.set( 9 | "n", 10 | "gd", 11 | ":set splitright:setlocal winhighlight=DiffDelete:FuDiffDelete:set nosplitright:execute 'Gvdiff ' .. g:git_base" 12 | ) 13 | vim.keymap.set("n", "gb", ":Git blame") 14 | vim.keymap.set("n", "gs", ":Git") 15 | vim.keymap.set("n", "gc", ":0Gclog", { noremap = false }) 16 | vim.keymap.set("n", "gg", function() 17 | require("lists").change_active "Quickfix" 18 | vim.cmd(string.format("Git difftool %s", vim.g.git_base)) 19 | end) 20 | end, 21 | } 22 | -------------------------------------------------------------------------------- /vim/lua/plugins/fzf.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "junegunn/fzf.vim", 3 | dependencies = { "junegunn/fzf", "vijaymarupudi/nvim-fzf" }, 4 | config = function() 5 | local fuzzy = require "fuzzy" 6 | vim.g.fzf_buffers_jump = true 7 | vim.g.fzf_layout = { window = { width = 0.8, height = 0.4, yoffset = 0.2 } } 8 | vim.cmd [[let $FZF_DEFAULT_OPTS=$FZF_DEFAULT_OPTS . ' --reverse --ansi']] 9 | 10 | vim.keymap.set("n", "", function() 11 | fuzzy.files "" 12 | end) 13 | vim.keymap.set("n", "gf", fuzzy.git_files) 14 | vim.keymap.set("n", "n", function() 15 | fuzzy.files(vim.fn.expand "%:h") 16 | end) 17 | vim.keymap.set("n", "f", fuzzy.symbols) 18 | vim.keymap.set("n", "p", ":Buffers") 19 | vim.keymap.set("n", "", ":Commands") 20 | vim.keymap.set("n", "", ":Helptags") 21 | vim.keymap.set("n", "m", ":Marks") 22 | end, 23 | event = "VeryLazy", 24 | } 25 | -------------------------------------------------------------------------------- /vim/lua/plugins/gitsigns.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "lewis6991/gitsigns.nvim", 3 | event = "VeryLazy", 4 | config = function() 5 | local gitsigns = require "gitsigns" 6 | gitsigns.setup() 7 | 8 | local find_conflict = function(direction) 9 | return function() 10 | local ok = pcall(function() 11 | vim.cmd(string.format("%s<<<<<<<", direction)) 12 | end) 13 | if not ok then 14 | print "No conflicts found" 15 | return 16 | end 17 | vim.cmd [[nohlsearch]] 18 | vim.fn.histdel("search", -1) 19 | end 20 | end 21 | 22 | vim.keymap.set("n", "gj", gitsigns.next_hunk) 23 | vim.keymap.set("n", "gk", gitsigns.prev_hunk) 24 | vim.keymap.set("n", "gj", find_conflict "/") 25 | vim.keymap.set("n", "gk", find_conflict "?") 26 | vim.keymap.set("n", "ga", gitsigns.stage_hunk) 27 | vim.keymap.set("n", "gu", gitsigns.reset_hunk) 28 | vim.keymap.set("v", "ga", function() 29 | gitsigns.stage_hunk { vim.fn.line ".", vim.fn.line "v" } 30 | end) 31 | vim.keymap.set("v", "gu", function() 32 | gitsigns.reset_hunk { vim.fn.line ".", vim.fn.line "v" } 33 | end) 34 | vim.keymap.set("n", "gr", gitsigns.reset_buffer) 35 | vim.keymap.set({ "o", "x" }, "ig", ":Gitsigns select_hunk") 36 | end, 37 | } 38 | -------------------------------------------------------------------------------- /vim/lua/plugins/headlines.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "lukas-reineke/headlines.nvim", 3 | dev = true, 4 | enabled = false, 5 | ft = { 6 | "markdown", 7 | "org", 8 | }, 9 | config = function() 10 | local headline_highlights = { 11 | "HeadlineGreen", 12 | "HeadlineBlue", 13 | "HeadlineRed", 14 | "HeadlinePurple", 15 | "HeadlineYellow", 16 | "HeadlineGreen", 17 | } 18 | -- local bullet_highlights = { 19 | -- "@text.title.1.markdown", 20 | -- "@text.title.2.markdown", 21 | -- "@text.title.3.markdown", 22 | -- "@text.title.4.markdown", 23 | -- "@text.title.5.markdown", 24 | -- "@text.title.6.markdown", 25 | -- } 26 | require("headlines").setup { 27 | markdown = { headline_highlights = headline_highlights }, 28 | org = { headline_highlights = headline_highlights }, 29 | } 30 | end, 31 | } 32 | -------------------------------------------------------------------------------- /vim/lua/plugins/helpview.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "OXY2DEV/helpview.nvim", 3 | enabled = false, 4 | opts = {}, 5 | } 6 | -------------------------------------------------------------------------------- /vim/lua/plugins/ibl.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "lukas-reineke/indent-blankline.nvim", 3 | dev = true, 4 | main = "ibl", 5 | ---@module "ibl" 6 | ---@type ibl.config 7 | opts = {}, 8 | } 9 | -------------------------------------------------------------------------------- /vim/lua/plugins/image.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "3rd/image.nvim", 3 | opts = { 4 | tmux_show_only_in_active_window = true, 5 | integrations = { 6 | markdown = { 7 | enabled = true, 8 | clear_in_insert_mode = true, 9 | download_remote_images = true, 10 | only_render_image_at_cursor = true, 11 | }, 12 | }, 13 | }, 14 | } 15 | -------------------------------------------------------------------------------- /vim/lua/plugins/is.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "haya14busa/is.vim", 3 | config = function() 4 | vim.api.nvim_set_keymap("n", "g*", "(is-g*)N", { noremap = false }) 5 | vim.api.nvim_set_keymap("n", "*", "(is-*)N", { noremap = false }) 6 | end, 7 | } 8 | -------------------------------------------------------------------------------- /vim/lua/plugins/lazy-dev.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "folke/lazydev.nvim", 3 | ft = "lua", 4 | opts = { 5 | library = { 6 | { path = "luvit-meta/library", words = { "vim%.uv" } }, 7 | }, 8 | }, 9 | } 10 | -------------------------------------------------------------------------------- /vim/lua/plugins/lsp-format.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "lukas-reineke/lsp-format.nvim", 3 | dev = true, 4 | config = function() 5 | local prettier = { 6 | tabWidth = function() 7 | return vim.opt.shiftwidth:get() 8 | end, 9 | singleQuote = true, 10 | trailingComma = "all", 11 | configPrecedence = "prefer-file", 12 | exclude = { "tsserver", "jsonls", "ts_ls" }, 13 | } 14 | 15 | require("lsp-format").setup { 16 | typescript = prettier, 17 | javascript = prettier, 18 | typescriptreact = prettier, 19 | javascriptreact = prettier, 20 | json = prettier, 21 | css = prettier, 22 | scss = prettier, 23 | html = prettier, 24 | yaml = { 25 | tabWidth = function() 26 | return vim.opt.shiftwidth:get() 27 | end, 28 | singleQuote = true, 29 | trailingComma = "all", 30 | configPrecedence = "prefer-file", 31 | }, 32 | python = { 33 | lineLength = 120, 34 | }, 35 | markdown = prettier, 36 | sh = { 37 | tabWidth = function() 38 | return vim.opt.shiftwidth:get() 39 | end, 40 | }, 41 | } 42 | end, 43 | event = "VeryLazy", 44 | } 45 | -------------------------------------------------------------------------------- /vim/lua/plugins/lsp-signature.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "ray-x/lsp_signature.nvim", 3 | event = "InsertEnter", 4 | enabled = false, 5 | } 6 | -------------------------------------------------------------------------------- /vim/lua/plugins/lspconfig.lua: -------------------------------------------------------------------------------- 1 | return { "neovim/nvim-lspconfig" } 2 | -------------------------------------------------------------------------------- /vim/lua/plugins/luaref.lua: -------------------------------------------------------------------------------- 1 | return { "milisims/nvim-luaref" } 2 | -------------------------------------------------------------------------------- /vim/lua/plugins/luasnip.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "L3MON4D3/LuaSnip", 3 | event = { "InsertEnter", "CmdlineEnter" }, 4 | config = function() 5 | require("luasnip.loaders.from_lua").load { paths = "~/dotfiles/vim/lua/luasnippets" } 6 | 7 | require("luasnip").config.set_config { 8 | history = true, 9 | enable_autosnippets = true, 10 | updateevents = "TextChanged,TextChangedI", 11 | delete_check_events = "TextChanged", 12 | ext_opts = { 13 | [require("luasnip.util.types").choiceNode] = { 14 | active = { 15 | virt_text = { { "↺", "markdownBold" } }, 16 | }, 17 | }, 18 | }, 19 | } 20 | end, 21 | } 22 | -------------------------------------------------------------------------------- /vim/lua/plugins/luvit-meta.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "Bilal2453/luvit-meta", 3 | } 4 | -------------------------------------------------------------------------------- /vim/lua/plugins/navigator.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "numToStr/Navigator.nvim", 3 | config = function() 4 | require("Navigator").setup {} 5 | vim.keymap.set("n", "", require("Navigator").left) 6 | vim.keymap.set("n", "", require("Navigator").down) 7 | vim.keymap.set("n", "", require("Navigator").up) 8 | vim.keymap.set("n", "", require("Navigator").right) 9 | end, 10 | } 11 | -------------------------------------------------------------------------------- /vim/lua/plugins/neo-tree.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "nvim-neo-tree/neo-tree.nvim", 3 | dependencies = { 4 | "nvim-lua/plenary.nvim", 5 | "MunifTanjim/nui.nvim", 6 | "kyazdani42/nvim-web-devicons", 7 | "mrbjarksen/neo-tree-diagnostics.nvim", 8 | }, 9 | keys = { "-", "g-" }, 10 | config = function() 11 | require("neo-tree.sources.common.components").diagnostics = function(_config, node, state) 12 | local diag = state.diagnostics_lookup or {} 13 | local diag_state = diag[node:get_id()] 14 | if not diag_state then 15 | return {} 16 | end 17 | return { 18 | text = ({ 19 | Error = " ", 20 | Warn = " ", 21 | Info = " ", 22 | Hint = "", 23 | })[diag_state.severity_string], 24 | highlight = "Diagnostic" .. diag_state.severity_string, 25 | } 26 | end 27 | 28 | require("neo-tree").setup { 29 | close_if_last_window = true, 30 | sources = { 31 | "filesystem", 32 | "buffers", 33 | "git_status", 34 | "diagnostics", 35 | }, 36 | window = { 37 | position = "current", 38 | mappings = { 39 | ["o"] = "open", 40 | ["m"] = "cut_to_clipboard", 41 | ["p"] = "paste_from_clipboard", 42 | ["q"] = "close_window", 43 | [""] = "close_window", 44 | }, 45 | }, 46 | filesystem = { 47 | filtered_items = { 48 | visible = true, 49 | hide_dotfiles = false, 50 | hide_gitignored = true, 51 | }, 52 | follow_current_file = { 53 | enabled = true, 54 | }, 55 | hijack_netrw_behavior = "open_current", 56 | use_libuv_file_watcher = true, 57 | }, 58 | } 59 | local git = require "git" 60 | 61 | vim.keymap.set("n", "-", function() 62 | if git.is_repo() then 63 | vim.cmd(string.format("Neotree current reveal git_base=%s", vim.g.git_base)) 64 | else 65 | vim.cmd [[Neotree reveal]] 66 | end 67 | end) 68 | vim.keymap.set("n", "g-", function() 69 | if git.is_repo() then 70 | vim.cmd(string.format("Neotree current git_status git_base=%s", vim.g.git_base)) 71 | else 72 | vim.notify("Not a git repo", vim.log.levels.ERROR) 73 | end 74 | end) 75 | end, 76 | event = "VeryLazy", 77 | } 78 | -------------------------------------------------------------------------------- /vim/lua/plugins/neodev.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "folke/neodev.nvim", 3 | enabled = false, 4 | ft = "lua", 5 | config = function() 6 | require("neodev").setup() 7 | end, 8 | } 9 | -------------------------------------------------------------------------------- /vim/lua/plugins/neotest.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "nvim-neotest/neotest", 3 | dependencies = { 4 | "nvim-lua/plenary.nvim", 5 | "nvim-treesitter/nvim-treesitter", 6 | "rouge8/neotest-rust", 7 | "nvim-neotest/neotest-go", 8 | "nvim-neotest/neotest-plenary", 9 | "haydenmeade/neotest-jest", 10 | "nvim-neotest/neotest-python", 11 | }, 12 | keys = { 13 | "tt", 14 | "to", 15 | "ts", 16 | "tf", 17 | "td", 18 | }, 19 | config = function() 20 | local neotest = require "neotest" 21 | neotest.setup { 22 | icons = { 23 | failed = "", 24 | passed = "", 25 | running = "", 26 | skipped = "○", 27 | unknown = "", 28 | }, 29 | output = { 30 | open_on_run = false, 31 | }, 32 | floating = { 33 | border = vim.g.floating_window_border_dark, 34 | }, 35 | discovery = { 36 | enabled = false, 37 | concurrent = 1, 38 | }, 39 | adapters = { 40 | require "neotest-rust" { 41 | args = { "--no-capture" }, 42 | dap_adapter = "codelldb", 43 | }, 44 | require "neotest-go", 45 | require "neotest-plenary", 46 | require "neotest-jest" { 47 | jestCommand = "npm run test:run --", 48 | }, 49 | require "neotest-python" { 50 | runner = "pytest", 51 | }, 52 | }, 53 | } 54 | 55 | vim.keymap.set("n", "tt", function() 56 | vim.notify_once("Running single test", vim.log.levels.INFO, { 57 | title = "Neotest", 58 | }) 59 | neotest.run.run() 60 | end) 61 | vim.keymap.set("n", "to", function() 62 | neotest.output.open { 63 | enter = true, 64 | open_win = function(settings) 65 | local height = math.min(settings.height, vim.o.lines - 2) 66 | local width = math.min(settings.width, vim.o.columns - 2) 67 | return vim.api.nvim_open_win(0, true, { 68 | relative = "editor", 69 | row = 7, 70 | col = (vim.o.columns - width) / 2, 71 | width = width, 72 | height = height, 73 | style = "minimal", 74 | border = vim.g.floating_window_border, 75 | noautocmd = true, 76 | title = "Test Output", 77 | }) 78 | end, 79 | } 80 | end) 81 | vim.keymap.set("n", "ts", function() 82 | neotest.summary.toggle() 83 | end) 84 | vim.keymap.set("n", "tf", function() 85 | vim.notify_once("Running tests", vim.log.levels.INFO, { 86 | title = "Neotest", 87 | }) 88 | neotest.run.run(vim.fn.expand "%") 89 | end) 90 | vim.keymap.set("n", "td", function() 91 | vim.notify_once("Start debugging test", vim.log.levels.INFO, { 92 | title = "Neotest", 93 | }) 94 | neotest.run.run { strategy = "dap" } 95 | end) 96 | vim.keymap.set("n", "tl", function() 97 | vim.notify_once("Start debugging test", vim.log.levels.INFO, { 98 | title = "Neotest", 99 | }) 100 | neotest.run.run_last {} 101 | end) 102 | end, 103 | } 104 | -------------------------------------------------------------------------------- /vim/lua/plugins/obsidian.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "epwalsh/obsidian.nvim", 3 | lazy = true, 4 | ft = "markdown", 5 | dependencies = { 6 | -- Required. 7 | "nvim-lua/plenary.nvim", 8 | 9 | -- see below for full list of optional dependencies 👇 10 | }, 11 | opts = { 12 | workspaces = { 13 | { 14 | name = "obsidian", 15 | path = "~/obsidian", 16 | }, 17 | }, 18 | }, 19 | } 20 | -------------------------------------------------------------------------------- /vim/lua/plugins/octo.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "https://github.com/pwntester/octo.nvim", 3 | enabled = false, 4 | dependencies = { 5 | "nvim-lua/plenary.nvim", 6 | "ibhagwan/fzf-lua", 7 | }, 8 | config = function() 9 | require("octo").setup { 10 | picker = "fzf-lua", 11 | } 12 | end, 13 | } 14 | -------------------------------------------------------------------------------- /vim/lua/plugins/onedark.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "lukas-reineke/onedark.nvim", 3 | dev = true, 4 | config = function() 5 | require("onedark").setup() 6 | end, 7 | } 8 | -------------------------------------------------------------------------------- /vim/lua/plugins/org.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "nvim-orgmode/orgmode", 3 | dependencies = { 4 | "akinsho/org-bullets.nvim", 5 | "dhruvasagar/vim-table-mode", 6 | }, 7 | enabled = false, 8 | config = function() 9 | local onedark = require "onedark" 10 | -- require("orgmode").setup_ts_grammar() 11 | require("orgmode").setup { 12 | org_default_notes_file = "~/dev/org/notes.org", 13 | org_agenda_templates = { 14 | f = { 15 | description = "File notes", 16 | template = "* TODO %?\n %u\n %a", 17 | target = "~/dev/org/notes.org", 18 | }, 19 | }, 20 | org_todo_keywords = { "TODO(t)", "|", "DONE", "CANCELED" }, 21 | org_todo_keyword_faces = { 22 | TODO = ":foreground " .. onedark.colors.purple .. " :weight bold", 23 | DONE = ":foreground " .. onedark.colors.green .. " :weight bold", 24 | CANCELED = ":foreground " .. onedark.colors.red .. " :weight bold", 25 | }, 26 | org_hide_emphasis_markers = true, 27 | org_startup_indented = true, 28 | org_adapt_indentation = false, 29 | mappings = { 30 | disable_all = true, 31 | }, 32 | } 33 | -- require("org-bullets").setup { 34 | -- concealcursor = true, 35 | -- symbols = { 36 | -- checkboxes = { 37 | -- half = { "", "OrgCancelled" }, 38 | -- done = { "", "OrgDone" }, 39 | -- todo = { " ", "OrgTODO" }, 40 | -- }, 41 | -- }, 42 | -- } 43 | -- 44 | vim.keymap.set("n", "of", function() 45 | require("orgmode").action "capture.prompt" 46 | end) 47 | vim.keymap.set("n", "oa", function() 48 | require("orgmode").action "agenda.prompt" 49 | end) 50 | end, 51 | } 52 | -------------------------------------------------------------------------------- /vim/lua/plugins/pqf.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "yorickpeterse/nvim-pqf", 3 | event = "VeryLazy", 4 | enabled = false, 5 | config = function() 6 | require("pqf").setup { 7 | signs = { 8 | error = "", 9 | warning = "", 10 | info = "", 11 | hint = "", 12 | }, 13 | } 14 | end, 15 | } 16 | -------------------------------------------------------------------------------- /vim/lua/plugins/profile.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "stevearc/profile.nvim", 3 | enabled = false, 4 | config = function() 5 | if os.getenv "NVIM_PROFILE" then 6 | require("profile").instrument_autocmds() 7 | require("profile").instrument "*" 8 | 9 | local function toggle_profile() 10 | local prof = require "profile" 11 | if prof.is_recording() then 12 | prof.stop() 13 | vim.ui.input( 14 | { prompt = "Save profile to:", completion = "file", default = "profile.json" }, 15 | function(filename) 16 | if filename then 17 | prof.export(filename) 18 | vim.notify(string.format("Wrote %s", filename)) 19 | end 20 | end 21 | ) 22 | else 23 | prof.start "*" 24 | end 25 | end 26 | vim.keymap.set("", "", toggle_profile) 27 | end 28 | end, 29 | } 30 | -------------------------------------------------------------------------------- /vim/lua/plugins/qf.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "romainl/vim-qf", 3 | eanbeld = false, 4 | init = function() 5 | vim.g.qf_nowrap = false 6 | vim.g.qf_max_height = 20 7 | end, 8 | } 9 | -------------------------------------------------------------------------------- /vim/lua/plugins/quicker.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "stevearc/quicker.nvim", 3 | event = "VeryLazy", 4 | config = function() 5 | local quicker = require "quicker" 6 | quicker.setup { 7 | type_icons = { 8 | E = " ", 9 | W = " ", 10 | I = " ", 11 | N = " ", 12 | H = " ", 13 | }, 14 | } 15 | 16 | vim.keymap.set("n", "c", function() 17 | quicker.toggle { 18 | focus = true, 19 | } 20 | require("lists").change_active "Quickfix" 21 | end, { noremap = false, silent = true }) 22 | vim.keymap.set("n", "v", function() 23 | quicker.toggle { 24 | focus = true, 25 | loclist = true, 26 | } 27 | require("lists").change_active "Location" 28 | end, { noremap = false, silent = true }) 29 | end, 30 | } 31 | -------------------------------------------------------------------------------- /vim/lua/plugins/quickscope.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "kepbod/quick-scope", 3 | event = "VeryLazy", 4 | config = function() 5 | vim.api.nvim_set_hl(0, "QuickScopePrimary", { 6 | bold = true, 7 | bg = "None", 8 | fg = "None", 9 | }) 10 | vim.api.nvim_set_hl(0, "QuickScopeSecondary", { 11 | bold = true, 12 | bg = "None", 13 | fg = "None", 14 | }) 15 | end, 16 | } 17 | -------------------------------------------------------------------------------- /vim/lua/plugins/render-markdown.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "MeanderingProgrammer/render-markdown.nvim", 3 | opts = { 4 | heading = { 5 | sign = false, 6 | border = true, 7 | position = "inline", 8 | above = "▃", 9 | below = "🬂", 10 | icons = { "◉ ", "○ ", "✸ ", "✿ " }, 11 | foregrounds = { 12 | "@markup.heading.1.markdown", 13 | "@markup.heading.2.markdown", 14 | "@markup.heading.3.markdown", 15 | "@markup.heading.4.markdown", 16 | "@markup.heading.5.markdown", 17 | "@markup.heading.6.markdown", 18 | }, 19 | backgrounds = { 20 | "@text.title.1.markdown", 21 | "@text.title.2.markdown", 22 | "@text.title.3.markdown", 23 | "@text.title.4.markdown", 24 | "@text.title.5.markdown", 25 | "@text.title.6.markdown", 26 | }, 27 | }, 28 | code = { 29 | sign = false, 30 | width = "block", 31 | right_pad = 2, 32 | }, 33 | quote = { 34 | repeat_linebreak = true, 35 | }, 36 | indent = { 37 | enabled = true, 38 | per_level = 2, 39 | }, 40 | }, 41 | dependencies = { "nvim-treesitter/nvim-treesitter", "nvim-tree/nvim-web-devicons" }, 42 | } 43 | -------------------------------------------------------------------------------- /vim/lua/plugins/repeat.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "tpope/vim-repeat", 3 | event = "VeryLazy", 4 | } 5 | -------------------------------------------------------------------------------- /vim/lua/plugins/sandwich.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "machakann/vim-sandwich", 3 | event = "VeryLazy", 4 | init = function() 5 | vim.g.textobj_sandwich_no_default_key_mappings = 1 6 | 7 | vim.keymap.set("v", "(", "(sandwich-add)(") 8 | vim.keymap.set("v", "{", "(sandwich-add){") 9 | vim.keymap.set("v", "[", "(sandwich-add)[") 10 | vim.keymap.set("v", "[", "(sandwich-add)[") 11 | vim.keymap.set("v", "'", "(sandwich-add)'") 12 | vim.keymap.set("v", '"', '(sandwich-add)"') 13 | end, 14 | } 15 | -------------------------------------------------------------------------------- /vim/lua/plugins/sleuth.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "tpope/vim-sleuth", 3 | event = "VeryLazy", 4 | } 5 | -------------------------------------------------------------------------------- /vim/lua/plugins/spider.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "chrisgrieser/nvim-spider", 3 | config = function() 4 | vim.keymap.set({ "n", "o", "x" }, "w", function() 5 | require("spider").motion "w" 6 | end) 7 | vim.keymap.set({ "n", "o", "x" }, "e", function() 8 | require("spider").motion "e" 9 | end) 10 | vim.keymap.set({ "n", "o", "x" }, "b", function() 11 | require("spider").motion "b" 12 | end) 13 | vim.keymap.set({ "n", "o", "x" }, "ge", function() 14 | require("spider").motion "ge" 15 | end) 16 | end, 17 | } 18 | -------------------------------------------------------------------------------- /vim/lua/plugins/substitute.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "gbprod/substitute.nvim", 3 | config = function() 4 | require("substitute").setup { 5 | highlight_substituted_text = { timer = 150 }, 6 | } 7 | 8 | vim.keymap.del("n", "grn") 9 | vim.keymap.del("n", "gra") 10 | vim.keymap.del("n", "grr") 11 | vim.keymap.del("n", "gri") 12 | 13 | vim.keymap.set("n", "gr", require("substitute").operator, { noremap = true }) 14 | vim.keymap.set("n", "grr", function() 15 | require("substitute").line() 16 | vim.api.nvim_feedkeys("==", "n", false) 17 | end, { noremap = true }) 18 | end, 19 | } 20 | -------------------------------------------------------------------------------- /vim/lua/plugins/treesitter.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "nvim-treesitter/nvim-treesitter", 3 | dependencies = { 4 | "nvim-treesitter/nvim-treesitter-textobjects", 5 | "chrisgrieser/nvim-various-textobjs", 6 | }, 7 | build = ":TSUpdate", 8 | config = function() 9 | vim.filetype.add { 10 | pattern = { [".*/hyprland%.conf"] = "hyprlang" }, 11 | } 12 | local parser_config = require("nvim-treesitter.parsers").get_parser_configs() 13 | parser_config.hyprlang = { 14 | install_info = { 15 | url = "~/dev/tree-sitter-hyprlang", 16 | files = { "src/parser.c" }, 17 | }, 18 | filetype = "hyprlang", 19 | } 20 | 21 | require("nvim-treesitter.configs").setup { 22 | ensure_installed = "all", 23 | highlight = { 24 | enable = true, 25 | language_tree = true, 26 | additional_vim_regex_highlighting = { "org" }, 27 | }, 28 | textobjects = { 29 | select = { 30 | enable = true, 31 | keymaps = { 32 | ["af"] = "@function.outer", 33 | ["if"] = "@function.inner", 34 | ["al"] = "@loop.outer", 35 | ["il"] = "@loop.inner", 36 | ["ac"] = "@comment.outer", 37 | ["ic"] = "@comment.inner", 38 | ["aa"] = "@parameter.outer", 39 | ["ia"] = "@parameter.inner", 40 | ["is"] = { query = "@scope", query_group = "locals" }, 41 | }, 42 | }, 43 | }, 44 | } 45 | require("various-textobjs").setup { 46 | keymaps = { 47 | useDefaults = true, 48 | }, 49 | } 50 | 51 | vim.keymap.set({ "o", "x" }, "aS", function() 52 | require("various-textobjs").subword "outer" 53 | end) 54 | vim.keymap.set({ "o", "x" }, "iS", function() 55 | require("various-textobjs").subword "inner" 56 | end) 57 | vim.keymap.set({ "o", "x" }, "ik", function() 58 | require("various-textobjs").key "inner" 59 | end) 60 | vim.keymap.set({ "o", "x" }, "iv", function() 61 | require("various-textobjs").value "inner" 62 | end) 63 | vim.keymap.set({ "o", "x" }, "am", function() 64 | require("various-textobjs").chainMember "outer" 65 | end) 66 | vim.keymap.set({ "o", "x" }, "ii", function() 67 | require("various-textobjs").indentation("inner", "inner") 68 | end) 69 | vim.keymap.set({ "o", "x" }, "ai", function() 70 | require("various-textobjs").indentation("outer", "inner") 71 | end) 72 | end, 73 | } 74 | -------------------------------------------------------------------------------- /vim/lua/plugins/treesj.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "Wansmer/treesj", 3 | keys = { "e" }, 4 | config = function() 5 | require("treesj").setup { 6 | use_default_keymaps = false, 7 | max_join_length = 2000, 8 | } 9 | vim.keymap.set("n", "e", require("treesj").toggle) 10 | end, 11 | } 12 | -------------------------------------------------------------------------------- /vim/lua/plugins/unconditional-paste.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "vim-scripts/UnconditionalPaste", 3 | keys = { 4 | "glp", 5 | "glP", 6 | }, 7 | config = function() 8 | vim.keymap.set("n", "", "UnconditionalPasteLineAfter") 9 | vim.keymap.set("n", "", "UnconditionalPasteLineBefore") 10 | vim.keymap.set("n", "", "UnconditionalPasteCommaAfter") 11 | vim.keymap.set("n", "", "UnconditionalPasteCommaBefore") 12 | vim.keymap.set("n", "", "UnconditionalPasteCommaSingleQuoteAfter") 13 | vim.keymap.set("n", "", "UnconditionalPasteCommaSingleQuoteBefore") 14 | vim.keymap.set("n", "", "VimwikiIncrementListItem") 15 | vim.keymap.set("n", "", "VimwikiDecrementListItem") 16 | vim.keymap.set("n", "", "UnconditionalPasteUnjoinBefore") 17 | vim.keymap.set("n", "", "UnconditionalPasteUnjoinAfter") 18 | vim.keymap.set("n", "glp", "UnconditionalPasteIndentedAfter") 19 | vim.keymap.set("n", "glP", "UnconditionalPasteIndentedBefore") 20 | end, 21 | } 22 | -------------------------------------------------------------------------------- /vim/lua/plugins/virt-column.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "lukas-reineke/virt-column.nvim", 3 | dev = true, 4 | config = function() 5 | require("virt-column").setup {} 6 | require("virt-column").overwrite { 7 | virtcolumn = "+1", 8 | highlight = "VirtColumn", 9 | exclude = { 10 | filetypes = { 11 | "lspinfo", 12 | "packer", 13 | "checkhealth", 14 | "man", 15 | "TelescopePrompt", 16 | "TelescopeResults", 17 | }, 18 | }, 19 | } 20 | end, 21 | } 22 | -------------------------------------------------------------------------------- /vim/lua/plugins/workspace-diagnostics.lua: -------------------------------------------------------------------------------- 1 | return { "artemave/workspace-diagnostics.nvim" } 2 | 3 | -------------------------------------------------------------------------------- /vim/lua/settings.lua: -------------------------------------------------------------------------------- 1 | vim.cmd [[syntax enable]] 2 | vim.cmd [[filetype plugin indent on]] 3 | 4 | local opt = setmetatable({}, { 5 | __newindex = function(_, key, value) 6 | vim.o[key] = value 7 | vim.bo[key] = value 8 | end, 9 | }) 10 | 11 | opt.dict = "~/dotfiles/lib/10k.txt" 12 | opt.expandtab = true 13 | opt.formatoptions = "crqnbj" 14 | vim.opt.grepprg = "rg --vimgrep --hidden --smart-case --ignore-file ~/dotfiles/fzf-ignore" 15 | vim.opt.grepformat = "%f:%l:%c:%m" 16 | opt.shiftwidth = 4 17 | opt.smartindent = true 18 | opt.softtabstop = 4 19 | opt.spellcapcheck = "" 20 | opt.swapfile = false 21 | opt.tabstop = 4 22 | opt.textwidth = 80 23 | opt.undofile = true 24 | opt.undolevels = 10000 25 | vim.opt.jumpoptions = "stack" 26 | vim.opt.exrc = true 27 | 28 | vim.o.clipboard = "unnamedplus" 29 | vim.o.completeopt = "menu,menuone,noinsert,noselect" 30 | vim.o.confirm = true 31 | vim.o.diffopt = "internal,filler,closeoff,foldcolumn:1,hiddenoff,algorithm:histogram,linematch:120,indent-heuristic" 32 | vim.o.emoji = false 33 | -- vim.o.foldclose = "all" 34 | -- vim.o.foldopen = "all" 35 | vim.wo.foldtext = "" 36 | -- vim.wo.foldtext = "v:lua.foldtext()" 37 | vim.opt.sessionoptions:remove "folds" 38 | vim.o.foldmethod = "expr" 39 | vim.o.foldexpr = "nvim_treesitter#foldexpr()" 40 | vim.o.hidden = true 41 | vim.o.history = 10000 42 | vim.o.ignorecase = true 43 | vim.o.inccommand = "nosplit" 44 | vim.o.infercase = true 45 | vim.o.lazyredraw = true 46 | vim.o.mouse = "a" 47 | vim.o.pumblend = 10 48 | vim.o.ruler = false 49 | vim.o.scrolloff = 8 50 | vim.o.showbreak = "↳⋅" 51 | vim.o.showcmd = false 52 | vim.o.showmode = false 53 | vim.o.showtabline = 0 54 | vim.o.sidescroll = 1 55 | vim.o.sidescrolloff = 15 56 | vim.o.smartcase = true 57 | vim.o.smarttab = true 58 | vim.o.splitbelow = true 59 | vim.o.splitright = true 60 | vim.o.splitkeep = "screen" 61 | vim.o.termguicolors = true 62 | vim.o.timeoutlen = 500 63 | vim.o.undodir = vim.fn.expand "~/.config/nvim/backups" 64 | vim.o.updatetime = 0 65 | vim.o.viewoptions = "" 66 | vim.o.virtualedit = "onemore" 67 | vim.o.whichwrap = "b,h,l" 68 | vim.o.wildmode = "longest,full" 69 | vim.o.wildoptions = "pum" 70 | 71 | vim.wo.foldenable = false 72 | vim.wo.foldlevel = 2 73 | vim.wo.signcolumn = "yes:1" 74 | vim.wo.conceallevel = 2 75 | vim.wo.concealcursor = "n" 76 | vim.wo.breakindent = true 77 | vim.wo.linebreak = true 78 | vim.wo.number = true 79 | vim.wo.relativenumber = true 80 | vim.wo.cursorline = true 81 | vim.wo.winhighlight = "NormalNC:WinNormalNC" 82 | vim.wo.spell = true 83 | vim.opt.list = true 84 | vim.opt.listchars = { 85 | space = "⋅", 86 | eol = "↴", 87 | tab = "▎_", 88 | -- tab = ">.", 89 | trail = "•", 90 | extends = "❯", 91 | precedes = "❮", 92 | nbsp = "", 93 | } 94 | vim.opt.fillchars = { 95 | fold = " ", 96 | foldsep = " ", 97 | foldopen = "", 98 | foldclose = "", 99 | diff = "╱", 100 | } 101 | vim.opt.shortmess:append "W" 102 | vim.opt.shortmess:append "A" 103 | vim.opt.shortmess:append "F" 104 | 105 | vim.g.floating_window_border = { "╭", "─", "╮", "│", "╯", "─", "╰", "│" } 106 | vim.g.floating_window_border_dark = { 107 | { "╭", "FloatBorderDark" }, 108 | { "─", "FloatBorderDark" }, 109 | { "╮", "FloatBorderDark" }, 110 | { "│", "FloatBorderDark" }, 111 | { "╯", "FloatBorderDark" }, 112 | { "─", "FloatBorderDark" }, 113 | { "╰", "FloatBorderDark" }, 114 | { "│", "FloatBorderDark" }, 115 | } 116 | vim.g.no_man_maps = true 117 | vim.g.vim_json_syntax_conceal = false 118 | vim.g.vim_json_conceal = false 119 | 120 | vim.diagnostic.config { 121 | virtual_lines = false, 122 | virtual_text = { 123 | spacing = 3, 124 | prefix = " ", 125 | severity_sort = true, 126 | source = "if_many", 127 | }, 128 | } 129 | -------------------------------------------------------------------------------- /vim/lua/utils.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | M.merge = function(t1, t2) 4 | for k, v in pairs(t2) do 5 | t1[k] = v 6 | end 7 | return t1 8 | end 9 | 10 | M._if = function(bool, a, b) 11 | if bool then 12 | return a 13 | else 14 | return b 15 | end 16 | end 17 | 18 | function _G.P(...) 19 | print(unpack(vim.tbl_map(vim.inspect, { ... }))) 20 | end 21 | 22 | function _G.R(package) 23 | package.loaded[package] = nil 24 | return require(package) 25 | end 26 | 27 | function _G.T() 28 | print(require("nvim-treesitter.ts_utils").get_node_at_cursor():type()) 29 | end 30 | 31 | M.ansi_codes = { 32 | _clear = "", 33 | _red = "", 34 | _green = "", 35 | _yellow = "", 36 | _blue = "", 37 | _magenta = "", 38 | _cyan = "", 39 | _grey = "", 40 | _dark_grey = "", 41 | _white = "", 42 | red = function(self, string) 43 | return self._red .. string .. self._clear 44 | end, 45 | green = function(self, string) 46 | return self._green .. string .. self._clear 47 | end, 48 | yellow = function(self, string) 49 | return self._yellow .. string .. self._clear 50 | end, 51 | blue = function(self, string) 52 | return self._blue .. string .. self._clear 53 | end, 54 | magenta = function(self, string) 55 | return self._magenta .. string .. self._clear 56 | end, 57 | cyan = function(self, string) 58 | return self._cyan .. string .. self._clear 59 | end, 60 | grey = function(self, string) 61 | return self._grey .. string .. self._clear 62 | end, 63 | dark_grey = function(self, string) 64 | return self._dark_grey .. string .. self._clear 65 | end, 66 | white = function(self, string) 67 | return self._white .. string .. self._clear 68 | end, 69 | } 70 | 71 | M.shorten_string = function(string, length) 72 | if #string < length then 73 | return string 74 | end 75 | local start = string:sub(1, (length / 2) - 2) 76 | local _end = string:sub(#string - (length / 2) + 1, #string) 77 | return start .. "..." .. _end 78 | end 79 | 80 | M.wrap_lines = function(input, width) 81 | local output = {} 82 | for _, line in ipairs(input) do 83 | line = line:gsub("\r", "") 84 | while #line > width + 2 do 85 | local trimmed_line = string.sub(line, 1, width) 86 | local index = trimmed_line:reverse():find " " 87 | if index == nil or index > #trimmed_line / 2 then 88 | break 89 | end 90 | table.insert(output, string.sub(line, 1, width - index)) 91 | line = vim.o.showbreak .. string.sub(line, width - index + 2, #line) 92 | end 93 | table.insert(output, line) 94 | end 95 | 96 | return output 97 | end 98 | 99 | return M 100 | -------------------------------------------------------------------------------- /vim/queries/comment/highlights.scm: -------------------------------------------------------------------------------- 1 | ; extends 2 | 3 | ("text" @text.fixme @nospell 4 | (#eq? @text.fixme "FIXME") 5 | (#set! "priority" 200)) 6 | -------------------------------------------------------------------------------- /vim/queries/markdown/highlights.scm: -------------------------------------------------------------------------------- 1 | ; extends 2 | 3 | ; (fenced_code_block (info_string) @MDTSFencedCodeBlockInfo) @MDTSFencedCodeBlock 4 | ; (fenced_code_block_delimiter) @MDTSFencedCodeBlock 5 | ; ( 6 | ; (atx_heading (atx_h1_marker)) @OrgTSHeadlineLevel1 7 | ; (set! "priority" 2050) 8 | ; ) 9 | ; ( 10 | ; (atx_heading (atx_h2_marker)) @OrgTSHeadlineLevel2 11 | ; (set! "priority" 2050) 12 | ; ) 13 | ; ( 14 | ; (atx_heading (atx_h3_marker)) @OrgTSHeadlineLevel3 15 | ; (set! "priority" 2050) 16 | ; ) 17 | ; ( 18 | ; (atx_heading (atx_h4_marker)) @OrgTSHeadlineLevel4 19 | ; (set! "priority" 2050) 20 | ; ) 21 | ; ( 22 | ; (atx_heading (atx_h5_marker)) @OrgTSHeadlineLevel5 23 | ; (set! "priority" 2050) 24 | ; ) 25 | -------------------------------------------------------------------------------- /vim/queries/org/highlights.scm: -------------------------------------------------------------------------------- 1 | ; extends 2 | 3 | (hr) @OrgTSTable 4 | (row) @OrgTSTable 5 | -------------------------------------------------------------------------------- /vim/queries/prisma/injections.scm: -------------------------------------------------------------------------------- 1 | ; extends 2 | 3 | ((comment) @injection.content 4 | (#match? @injection.content "^/// \\@") 5 | (#offset! @injection.content 0 3 0 0) 6 | (#set! injection.language "typescript")) 7 | -------------------------------------------------------------------------------- /vim/queries/tsx/injections.scm: -------------------------------------------------------------------------------- 1 | ; ; extends 2 | ; 3 | ; (jsx_attribute 4 | ; (property_identifier) @_name 5 | ; (#eq? @_name "css") 6 | ; (jsx_expression 7 | ; (template_string) @css 8 | ; (#offset! @css 0 1 0 -1))) 9 | ; 10 | ; (jsx_attribute 11 | ; (property_identifier) @_name 12 | ; (#eq? @_name "css") 13 | ; (string) @css 14 | ; (#offset! @css 0 1 0 -1)) 15 | -------------------------------------------------------------------------------- /vim/queries/typescript/injections.scm: -------------------------------------------------------------------------------- 1 | ; extends 2 | 3 | ; (call_expression 4 | ; (member_expression 5 | ; (member_expression 6 | ; property: (property_identifier) @_sequelize_property (#eq? @_sequelize_property "sequelize")) 7 | ; property: (property_identifier) @_query_property (#eq? @_query_property "query")) 8 | ; arguments: (arguments 9 | ; (template_string) @sql 10 | ; (#offset! @sql 0 1 0 -1))) 11 | -------------------------------------------------------------------------------- /vim/syntax/gitconfig.vim: -------------------------------------------------------------------------------- 1 | " Vim syntax file 2 | " Language: git config file 3 | " Maintainer: Tim Pope 4 | " Filenames: gitconfig, .gitconfig, *.git/config 5 | " Last Change: 2010 May 21 6 | 7 | if exists("b:current_syntax") 8 | finish 9 | endif 10 | 11 | setlocal iskeyword+=- 12 | setlocal iskeyword-=_ 13 | syn case ignore 14 | syn sync minlines=10 15 | 16 | syn match gitconfigComment "[#;].*" 17 | syn match gitconfigSection "\%(^\s*\)\@<=\[[a-z0-9.-]\+\]" 18 | syn match gitconfigSection '\%(^\s*\)\@<=\[[a-z0-9.-]\+ \+\"\%([^\\"]\|\\.\)*"\]' 19 | syn match gitconfigVariable "\%(^\s*\)\@<=\a\k*\%(\s*\%([=#;]\|$\)\)\@=" nextgroup=gitconfigAssignment skipwhite 20 | syn region gitconfigAssignment matchgroup=gitconfigNone start=+=\s*+ skip=+\\+ end=+\s*$+ contained contains=gitconfigBoolean,gitconfigNumber,gitConfigString,gitConfigEscape,gitConfigError,gitconfigComment keepend 21 | syn keyword gitconfigBoolean true false yes no contained 22 | syn match gitconfigNumber "\d\+" contained 23 | syn region gitconfigString matchgroup=gitconfigDelim start=+"+ skip=+\\+ end=+"+ matchgroup=gitconfigError end=+[^\\"]\%#\@!$+ contained contains=gitconfigEscape,gitconfigEscapeError 24 | syn match gitconfigError +\\.+ contained 25 | syn match gitconfigEscape +\\[\\"ntb]+ contained 26 | syn match gitconfigEscape +\\$+ contained 27 | 28 | hi def link gitconfigComment Comment 29 | hi def link gitconfigSection Keyword 30 | hi def link gitconfigVariable Identifier 31 | hi def link gitconfigBoolean Boolean 32 | hi def link gitconfigNumber Number 33 | hi def link gitconfigString String 34 | hi def link gitconfigDelim Delimiter 35 | hi def link gitconfigEscape Delimiter 36 | hi def link gitconfigError Error 37 | 38 | let b:current_syntax = "gitconfig" 39 | -------------------------------------------------------------------------------- /yay/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "buildDir": "/home/lukas/.cache/yay", 3 | "editor": "", 4 | "editorflags": "", 5 | "makepkgbin": "makepkg", 6 | "pacmanbin": "pacman", 7 | "pacmanconf": "/etc/pacman.conf", 8 | "tarbin": "bsdtar", 9 | "redownload": "no", 10 | "rebuild": "no", 11 | "answerclean": "no", 12 | "answeredit": "no", 13 | "answerdiff": "no", 14 | "answerupgrade": "", 15 | "gitbin": "git", 16 | "gpgbin": "gpg", 17 | "gpgflags": "", 18 | "mflags": "", 19 | "sortby": "votes", 20 | "gitflags": "", 21 | "requestsplitn": 150, 22 | "sortmode": 0, 23 | "sudoloop": false, 24 | "timeupdate": false, 25 | "devel": false, 26 | "cleanAfter": false, 27 | "diffmenu": false, 28 | "editmenu": false, 29 | "cleanmenu": false, 30 | "gitclone": true 31 | } 32 | --------------------------------------------------------------------------------