├── .github └── workflows │ └── stale.yml ├── .gitignore ├── Brewfile ├── Brewfile.lock.json ├── CargoFile ├── LICENSE ├── README.md ├── Yarnfile ├── _assets └── screenshots │ ├── cake16_dark.png │ ├── cake16_light.png │ ├── deus_dark.png │ ├── deus_light.png │ ├── flattened_fish.png │ ├── nord.png │ ├── snappy_one.png │ ├── snappy_two.png │ ├── solar.png │ ├── solar8_dark.png │ ├── solar8_light.png │ ├── solarized8_fish.png │ └── space.png ├── config ├── nvim │ ├── after │ │ └── ftplugin │ │ │ ├── clojure.lua │ │ │ ├── diff.lua │ │ │ ├── fugitiveblame.lua │ │ │ ├── git.lua │ │ │ ├── gitcommit.lua │ │ │ ├── gitconfig.lua │ │ │ ├── gitrebase.lua │ │ │ ├── go.lua │ │ │ ├── help.lua │ │ │ ├── html.lua │ │ │ ├── markdown.lua │ │ │ ├── patch.lua │ │ │ ├── qf.lua │ │ │ ├── rails.lua │ │ │ ├── ruby.lua │ │ │ └── sql.lua │ ├── init.lua │ ├── lua │ │ ├── autocmds.lua │ │ ├── general.lua │ │ ├── keymaps.lua │ │ ├── options.lua │ │ ├── plugins │ │ │ ├── autocomplete.lua │ │ │ ├── blame-nvim.lua │ │ │ ├── bufferline-nvim.lua │ │ │ ├── git.lua │ │ │ ├── kommentary.lua │ │ │ ├── modus-themes-nvim.lua │ │ │ ├── neorg.lua │ │ │ ├── nvim-lspconfig.lua │ │ │ ├── nvim-navic.lua │ │ │ ├── nvim-treesitter.lua │ │ │ ├── nvim-ufo.lua │ │ │ ├── nvimux.lua │ │ │ ├── oil-nvim.lua │ │ │ ├── telescope.lua │ │ │ ├── testing.lua │ │ │ ├── vim-bbye.lua │ │ │ ├── vim-maximizer.lua │ │ │ ├── vim-rooter.lua │ │ │ └── vim-signify.lua │ │ └── util.lua │ └── rocks.toml ├── pgcli │ └── config ├── ranger │ └── rc.conf ├── wezterm │ └── wezterm.lua └── zed │ ├── keymap.json │ ├── settings.json │ └── tasks.json ├── dircolors ├── dircolors.ansi-dark └── dircolors.bw ├── editorconfig ├── editrc ├── eslintrc ├── gitattributes ├── gitconfig ├── gitignore ├── gnupg ├── gpg-agent.conf ├── gpg.conf └── scdaemon.conf ├── inputrc ├── irbrc ├── pryrc ├── rcrc ├── ripgreprc ├── rubocop.yml ├── scripts ├── check_migrations ├── checkhosts ├── compile-zsh ├── exfat_clean ├── generate-brew-env.sh ├── install-terminfo.sh ├── install-tmux-plugins.sh ├── mermaid-ascii ├── rmlink.sh ├── santakiller ├── spec └── theme ├── ssh └── config ├── terminfo ├── tmux-256color.terminfo ├── xterm-256color-italic.terminfo └── xterm-256color-italic.tic ├── tmux.conf ├── zprofile ├── zsh_aliases ├── zsh_keybindings ├── zsh_prompt ├── zshenv └── zshrc /.github/workflows/stale.yml: -------------------------------------------------------------------------------- 1 | name: Mark stale issues and pull requests 2 | 3 | on: 4 | schedule: 5 | - cron: "30 1 * * *" 6 | 7 | jobs: 8 | stale: 9 | 10 | runs-on: ubuntu-latest 11 | 12 | steps: 13 | - uses: actions/stale@v3.0.17 14 | with: 15 | repo-token: ${{ secrets.GITHUB_TOKEN }} 16 | stale-issue-message: 'This issue has not seen any recent activity and therefore has been marked as `stale`. If the issue is no longer relevant, please alert the author so that the issue can be closed.' 17 | stale-pr-message: 'This pull-request has not seen any recent activity. If the proposed change is no longer desired, please alert the author so that the PR can be closed.' 18 | stale-issue-label: 'stale-issue' 19 | stale-pr-label: 'stale-pr' 20 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # javascript 2 | node_modules 3 | jspm_packages/ 4 | bower_components 5 | coverage 6 | # dist 7 | .grunt 8 | .tmp 9 | app/bower_components 10 | .tern-project 11 | .lock-wscript 12 | build/Release 13 | .yarn-integrity 14 | 15 | # Compressed files 16 | *.tgz 17 | *.zip 18 | *.tar.gz 19 | 20 | # ruby 21 | *.ruby-version 22 | .bundle 23 | 24 | #temp json output of yaml translations 25 | app/languages/*.json 26 | 27 | # Webstorm files 28 | .idea/* 29 | 30 | # vim swap files 31 | *.swp 32 | *.swo 33 | swoopBuf 34 | .tern-port 35 | 36 | # apple temp files and code unrelated directories 37 | .DS_Store 38 | /Library 39 | ~/Library 40 | 41 | # vim sessions and log files 42 | *.session 43 | logfile.log 44 | 45 | # Intheam config files 46 | *.pem 47 | .intheam/* 48 | 49 | # Visual studio code 50 | .vscode/* 51 | 52 | # Gitlab cli config 53 | ~/.config/gitlab-cli/default.js 54 | 55 | # cache directories 56 | Caches 57 | .CACHES 58 | .cache 59 | .yarn-cache 60 | .sass-cache 61 | .npm 62 | .eslintcache 63 | 64 | # Logs 65 | logs 66 | *.log 67 | npm-debug.log* 68 | yarn-debug.log* 69 | yarn-error.log* 70 | 71 | # Runtime data 72 | pids 73 | *.pid 74 | *.seed 75 | *.pid.lock 76 | 77 | # misc 78 | .byebug_history 79 | public_ 80 | public 81 | bin/pretty 82 | *.bak 83 | 84 | # dotenv environment variable files 85 | .env* 86 | .zshenv.local 87 | 88 | # fzf / RG 89 | .git 90 | 91 | # H1 specific 92 | Procfile.local 93 | 94 | # RCM specific 95 | __pycache__/ 96 | *.orig 97 | *~ 98 | config/neovim/sessions/ 99 | config/neovim/UndoHistory/ 100 | config/neovim/undo/ 101 | config/neovim/.netrwhist 102 | config/neovim/plugged/ 103 | config/neovim/spell/ 104 | config/neovim/dein/ 105 | 106 | config/coc/history.json 107 | config/coc/lists 108 | config/coc/memos.json 109 | config/coc/mru 110 | config/configstore/ 111 | config/ranger/plugins/ 112 | -------------------------------------------------------------------------------- /Brewfile: -------------------------------------------------------------------------------- 1 | tap "homebrew/bundle" 2 | tap "homebrew/cask" 3 | tap "homebrew/cask-fonts" 4 | tap "homebrew/cask-versions" 5 | tap "homebrew/core" 6 | tap "homebrew/services" 7 | tap "jason0x43/neovim-nightly" 8 | tap "jhawthorn/fzy" 9 | tap "thoughtbot/formulae" 10 | # Provides session management: i.e. separate programs from terminals 11 | brew "abduco" 12 | # Graphical system information display for macOS 13 | brew "archey" 14 | # Tool for generating GNU Standards-compliant Makefiles 15 | brew "automake" 16 | # Authenticate with AWS using your Okta credentials 17 | brew "aws-okta" 18 | # Tool Command Language 19 | brew "tcl-tk" 20 | # Interpreted, interactive, object-oriented programming language 21 | brew "python@3.9" 22 | # Official Amazon AWS command-line interface 23 | brew "awscli" 24 | # Clone of cat(1) with syntax highlighting and Git integration 25 | brew "bat" 26 | # Command-line benchmark tool 27 | brew "bench" 28 | # Remove large files or passwords from Git history like git-filter-branch 29 | brew "bfg" 30 | # Core application library for C 31 | brew "glib" 32 | # Vector graphics library with cross-device output support 33 | brew "cairo" 34 | # Easily generate Instruments traces for your rust crate 35 | brew "cargo-instruments" 36 | # Cross-platform make 37 | brew "cmake" 38 | # GNU File, Shell, and Text utilities 39 | brew "coreutils" 40 | # Utilities for .cue and .toc files 41 | brew "cuetools" 42 | # Secure runtime for JavaScript and TypeScript 43 | brew "deno" 44 | # Modern replacement for 'ls' 45 | brew "exa" 46 | # ISO AAC audio encoder 47 | brew "faac" 48 | # Simple, fast and user-friendly alternative to find 49 | brew "fd" 50 | # Standalone library of the Fraunhofer FDK AAC code from Android 51 | brew "fdk-aac" 52 | # Free lossless audio codec 53 | brew "flac" 54 | # Command-line fuzzy finder written in Go 55 | brew "fzf" 56 | # Distributed revision control system 57 | brew "git" 58 | # Generic library support script 59 | brew "libtool" 60 | # GNU Pretty Good Privacy (PGP) package 61 | brew "gnupg" 62 | # Open source programming language to build simple/reliable/efficient software 63 | brew "go" 64 | # Generate introspection data for GObject libraries 65 | brew "gobject-introspection" 66 | # Interpreted, interactive, object-oriented programming language 67 | brew "python@3.8" 68 | # OpenType text shaping engine 69 | brew "harfbuzz" 70 | # Framework for layout and rendering of i18n text 71 | brew "pango" 72 | # Graph visualization software from AT&T and Bell Labs 73 | brew "graphviz" 74 | # Command-line tools for OpenPGP-related operations 75 | brew "hopenpgp-tools" 76 | # Add GitHub support to git on the command-line 77 | brew "hub" 78 | # Command-line benchmarking tool 79 | brew "hyperfine" 80 | # ISO/IEC 23008-12:2017 HEIF file format decoder and encoder 81 | brew "libheif" 82 | # Tools and libraries to manipulate images in many formats 83 | brew "imagemagick" 84 | # Install and debug iPhone apps from the command-line 85 | brew "ios-deploy" 86 | # Platform built on V8 to build network applications 87 | brew "node" 88 | # Command-line application launcher for the iOS Simulator 89 | brew "ios-sim" 90 | # Lightweight and flexible command-line JSON processor 91 | brew "jq" 92 | # Selection-based modal text editor 93 | brew "kakoune" 94 | # Network authentication protocol 95 | brew "krb5" 96 | # High quality MPEG Audio Layer III (MP3) encoder 97 | brew "lame" 98 | # DNS library written in C 99 | brew "ldns" 100 | # Subtitle renderer for the ASS/SSA subtitle format 101 | brew "libass" 102 | # Provides library functionality for FIDO U2F & FIDO 2.0, including USB 103 | brew "libfido2" 104 | # Postgres C API library 105 | brew "libpq" 106 | # Vorbis General Audio Compression Codec 107 | brew "libvorbis" 108 | # Audio codec 109 | brew "opus" 110 | # VP8/VP9 video codec 111 | brew "libvpx" 112 | # Just-In-Time Compiler (JIT) for the Lua programming language 113 | brew "luajit", args: ["HEAD"] 114 | # Package manager for the Lua programming language 115 | brew "luarocks" 116 | # Mac App Store command-line interface 117 | brew "mas" 118 | # Library for a binary-based efficient data interchange format 119 | brew "msgpack" 120 | # Ambitious Vim-fork focused on extensibility and agility 121 | brew "neovim", args: ["HEAD"] 122 | # Install NodeJS versions 123 | brew "node-build", args: ["HEAD"] 124 | # Manage multiple NodeJS versions 125 | brew "nodenv" 126 | # Manage multiple Node.js versions 127 | brew "nvm" 128 | # OpenBSD freely-licensed SSH connectivity tools 129 | brew "openssh" 130 | # Terminal multiplexer 131 | brew "tmux", args: ["HEAD"] 132 | # Process manager for Procfile-based applications and tmux 133 | brew "overmind" 134 | # CLI for Postgres with auto-completion and syntax highlighting 135 | brew "pgcli" 136 | # Pinentry for GPG on Mac 137 | brew "pinentry-mac" 138 | # Object-relational database system 139 | brew "postgresql" 140 | # Object-relational database system 141 | brew "postgresql@10" 142 | # Object-relational database system 143 | brew "postgresql@11" 144 | # Object-relational database system 145 | brew "postgresql@12", restart_service: true 146 | # Cross-platform application and UI framework 147 | brew "qt", link: false 148 | # File browser 149 | brew "ranger", args: ["HEAD"] 150 | # Install various Ruby versions and implementations 151 | brew "ruby-build" 152 | # Ruby version manager 153 | brew "rbenv" 154 | # RC file (dotfile) management 155 | brew "rcm" 156 | # Persistent key-value database, with built-in net interface 157 | brew "redis", restart_service: true 158 | # Perl-powered file rename script with many helpful built-ins 159 | brew "rename" 160 | # Search tool like grep and The Silver Searcher 161 | brew "ripgrep" 162 | # Move files to macOS's Trash 163 | brew "rmtrash" 164 | # Rust toolchain installer 165 | brew "rustup-init" 166 | # Substitute for classic 'make' tool with autoconf/automake functionality 167 | brew "scons" 168 | # Low-level access to audio, keyboard, mouse, joystick and graphics 169 | brew "sdl" 170 | # Multi-purpose tool for manipulating and analyzing WAV files 171 | brew "shntool" 172 | # GNU's portable shell tool 173 | brew "shtool" 174 | # Secure Reliable Transport 175 | brew "srt" 176 | # Cross-shell prompt for astronauts 177 | brew "starship" 178 | # Send macOS User Notifications from the command-line 179 | brew "terminal-notifier" 180 | # Convert TeXinfo files to HTML 181 | brew "texi2html" 182 | # Open video compression format 183 | brew "theora" 184 | # Display directories as trees (with optional color/HTML output) 185 | brew "tree" 186 | # Google's open source JavaScript engine 187 | brew "v8@3.15", link: true 188 | # Hybrid lossless audio compression 189 | brew "wavpack" 190 | # Internet file retriever 191 | brew "wget" 192 | # H.264/AVC encoder 193 | brew "x264" 194 | # High-performance, high-quality MPEG-4 video library 195 | brew "xvid" 196 | # Modular BSD reimplementation of NASM 197 | brew "yasm" 198 | # Tool for managing your YubiKey configuration 199 | brew "ykman" 200 | # Shell extension to navigate your filesystem faster 201 | brew "zoxide" 202 | # UNIX shell (command interpreter) 203 | brew "zsh" 204 | # GPU-accelerated terminal emulator 205 | # Application launcher and productivity software 206 | cask "alfred" 207 | # API documentation browser and code snippet manager 208 | cask "dash" 209 | # Collect, organize, edit and annotate documents 210 | cask "devonthink" 211 | # Web browser 212 | cask "firefox" 213 | cask "font-jetbrains-mono-nerd-font" 214 | # Free and open-source image editor 215 | cask "gimp" 216 | # End-to-end encryption software 217 | cask "keybase" 218 | # Audio tagger focusing on efficiency 219 | cask "kid3" 220 | # GPU-based terminal emulator 221 | cask "kitty" 222 | # Office suite 223 | cask "libreoffice" 224 | cask "macsvg" 225 | cask "neovim-nightly" 226 | cask "pgadmin4" 227 | cask "phantomjs" 228 | # Screen measuring tool 229 | cask "pixelsnap" 230 | # Collaboration platform for API development 231 | cask "postman" 232 | # Store SSH keys in the Secure Enclave 233 | cask "secretive" 234 | # Instant messaging application focusing on security 235 | cask "signal" 236 | # Collect, organize & share colors 237 | cask "sip" 238 | # Team communication and collaboration software 239 | cask "slack" 240 | # Sets a minimum speed for built-in fans 241 | cask "smcfancontrol" 242 | cask "steermouse" 243 | # VPN client for secure internet access and private browsing 244 | cask "viscosity" 245 | # Open-source code editor 246 | cask "visual-studio-code" 247 | # Multimedia player 248 | cask "vlc" 249 | # Network protocol analyzer 250 | cask "wireshark" 251 | mas "1Password 7", id: 1333542190 252 | mas "GarageBand", id: 682658836 253 | mas "iMovie", id: 408981434 254 | mas "Keynote", id: 409183694 255 | mas "NordVPN IKE", id: 1116599239 256 | mas "Numbers", id: 409203825 257 | mas "Pages", id: 409201541 258 | mas "Skitch", id: 425955336 259 | mas "Theine", id: 955848755 260 | mas "Xcode", id: 497799835 261 | -------------------------------------------------------------------------------- /CargoFile: -------------------------------------------------------------------------------- 1 | bin-wrapper v1.0.0 (https://github.com/alexanderjeurissen/bin-wrapper.git?branch=main#9a3025bc): 2 | bin-wrapper 3 | cargo-script v0.2.8: 4 | cargo-script 5 | run-cargo-script 6 | git-delta v0.3.0: 7 | delta 8 | lint-emit v0.3.3: 9 | lint-emit 10 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2016-2025 Alexander Jeurissen 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Disclaimer 2 | 3 | This repo contains the latest and greatest version of my dotfiles. 4 | I try to extract meaningful bits and pieces to separate plugins/repositories so they can be used by the broader public, however tweaks that are highly personal preference often first end up here before I decide what to do with them. 5 | 6 | In summary my work environment consists of: 7 | 8 | | purpose | tool | 9 | |---------|------| 10 | | editor | Neovim | 11 | | terminal multiplexer | Tmux | 12 | | shell | Zsh | 13 | | terminal application | Alacritty | 14 | 15 | ![image](https://raw.githubusercontent.com/alexanderjeurissen/dotfiles/main/_assets/screenshots/nord.png) 16 | 17 | ## Installation 18 | 19 | ### Using rcm 20 | 21 | 1. Install `rcm` using your package manager, e.g. `brew install rcm`. 22 | 2. Clone this repository into `~/.dotfiles`. 23 | 3. Run `rcup -v` from the repo root to symlink all managed files. The 24 | included `rcrc` file controls which files are linked. 25 | 26 | ### Manual setup 27 | 28 | Create your own symlinks if you prefer not to use `rcm`: 29 | 30 | ```sh 31 | ln -s "$PWD/zshrc" ~/.zshrc 32 | ln -s "$PWD/tmux.conf" ~/.tmux.conf 33 | ``` 34 | 35 | ### Dependencies 36 | 37 | - **Homebrew** packages: `brew bundle` installs everything from the 38 | `Brewfile`. 39 | - **Yarn** packages: run `npx yarn-bundle` to install entries from 40 | `Yarnfile`. 41 | - **Cargo** packages: `cargo install --locked $(awk '{print $1}' CargoFile)`. 42 | 43 | ### Editor and shell configuration 44 | 45 | - Neovim uses the files under `config/nvim`. Start Neovim once to install 46 | plugins. 47 | - Zsh is configured using `zshrc`, `zshenv` and related files. Set it as 48 | your shell with `chsh -s $(which zsh)`. 49 | - Additional application configs live in the `config/` directory (for 50 | Ranger, etc.). Link them with `rcup` or create 51 | manual symlinks. 52 | 53 | ### Terminfo entries 54 | 55 | Custom terminfo definitions live in the `terminfo/` directory. Compile and 56 | install them using: 57 | 58 | ```sh 59 | scripts/install-terminfo.sh 60 | ``` 61 | 62 | This installs the entries into `~/.terminfo` so that tools like tmux can use 63 | them. 64 | 65 | ### Tmux plugins 66 | 67 | Clone the [Tmux Plugin Manager](https://github.com/tmux-plugins/tpm) and 68 | install the configured plugins by running: 69 | 70 | ```sh 71 | scripts/install-tmux-plugins.sh 72 | ``` 73 | 74 | Run this once after linking `tmux.conf`. 75 | 76 | ### Compiling Zsh files 77 | 78 | Run `scripts/compile-zsh` whenever you modify `zsh_prompt`, `zsh_aliases` or 79 | `zsh_keybindings` to regenerate their `.zwc` files. The compiled versions will 80 | be loaded automatically if present. 81 | 82 | ## License 83 | 84 | This project is licensed under the MIT License. See [LICENSE](LICENSE) for details. 85 | -------------------------------------------------------------------------------- /Yarnfile: -------------------------------------------------------------------------------- 1 | # Bundler for global yarn packages 2 | @alexanderjeurissen/yarn-bundle@1.0.2 3 | # CLI to rename a npm package 4 | @tiaanduplessis/pkg-rename@1.0.1 5 | # Makes eslint the fastest linter on the planet 6 | eslint_d@9.1.1 7 | # Gatsby command-line interface for creating new sites and running Gatsby commands 8 | gatsby-cli@2.12.50 9 | # Create a merge request from command line in gitlab 10 | git-lab-cli@2.0.7 11 | # Simple and convenient Git tool to easily recall what you've done 12 | git-recall@1.2.4 13 | # Command line tool for common GraphQL development workflows 14 | graphql-cli@4.0.0 15 | # A toolkit for JavaScript codemods 16 | jscodeshift@0.10.0 17 | # Simple proxy to bypass CORS issues. This was built as a local dev only solution to enable prototyping against existing APIs without having to worry about CORS. 18 | local-cors-proxy@1.1.0 19 | # Node.js native addon build tool 20 | node-gyp@7.0.0 21 | # CLI for PostCSS 22 | postcss-cli@7.1.1 23 | # Use react-devtools outside of the browser 24 | react-devtools@4.7.0 25 | # A framework for building native apps using React 26 | react-native@0.62.2 27 | # A transform module to make vim support RPC request as neovim 28 | vim-node-rpc@0.1.34 29 | # CLI for webpack & friends 30 | webpack-cli@3.3.12 31 | -------------------------------------------------------------------------------- /_assets/screenshots/cake16_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexanderjeurissen/dotfiles/1c547f3a1b293a4d19ee6f35f01dbbde93fa29a9/_assets/screenshots/cake16_dark.png -------------------------------------------------------------------------------- /_assets/screenshots/cake16_light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexanderjeurissen/dotfiles/1c547f3a1b293a4d19ee6f35f01dbbde93fa29a9/_assets/screenshots/cake16_light.png -------------------------------------------------------------------------------- /_assets/screenshots/deus_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexanderjeurissen/dotfiles/1c547f3a1b293a4d19ee6f35f01dbbde93fa29a9/_assets/screenshots/deus_dark.png -------------------------------------------------------------------------------- /_assets/screenshots/deus_light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexanderjeurissen/dotfiles/1c547f3a1b293a4d19ee6f35f01dbbde93fa29a9/_assets/screenshots/deus_light.png -------------------------------------------------------------------------------- /_assets/screenshots/flattened_fish.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexanderjeurissen/dotfiles/1c547f3a1b293a4d19ee6f35f01dbbde93fa29a9/_assets/screenshots/flattened_fish.png -------------------------------------------------------------------------------- /_assets/screenshots/nord.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexanderjeurissen/dotfiles/1c547f3a1b293a4d19ee6f35f01dbbde93fa29a9/_assets/screenshots/nord.png -------------------------------------------------------------------------------- /_assets/screenshots/snappy_one.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexanderjeurissen/dotfiles/1c547f3a1b293a4d19ee6f35f01dbbde93fa29a9/_assets/screenshots/snappy_one.png -------------------------------------------------------------------------------- /_assets/screenshots/snappy_two.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexanderjeurissen/dotfiles/1c547f3a1b293a4d19ee6f35f01dbbde93fa29a9/_assets/screenshots/snappy_two.png -------------------------------------------------------------------------------- /_assets/screenshots/solar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexanderjeurissen/dotfiles/1c547f3a1b293a4d19ee6f35f01dbbde93fa29a9/_assets/screenshots/solar.png -------------------------------------------------------------------------------- /_assets/screenshots/solar8_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexanderjeurissen/dotfiles/1c547f3a1b293a4d19ee6f35f01dbbde93fa29a9/_assets/screenshots/solar8_dark.png -------------------------------------------------------------------------------- /_assets/screenshots/solar8_light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexanderjeurissen/dotfiles/1c547f3a1b293a4d19ee6f35f01dbbde93fa29a9/_assets/screenshots/solar8_light.png -------------------------------------------------------------------------------- /_assets/screenshots/solarized8_fish.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexanderjeurissen/dotfiles/1c547f3a1b293a4d19ee6f35f01dbbde93fa29a9/_assets/screenshots/solarized8_fish.png -------------------------------------------------------------------------------- /_assets/screenshots/space.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexanderjeurissen/dotfiles/1c547f3a1b293a4d19ee6f35f01dbbde93fa29a9/_assets/screenshots/space.png -------------------------------------------------------------------------------- /config/nvim/after/ftplugin/clojure.lua: -------------------------------------------------------------------------------- 1 | vim.g.acid_auto_start_repl = 1 2 | vim.g.acid_namespace = 'repl' 3 | -------------------------------------------------------------------------------- /config/nvim/after/ftplugin/diff.lua: -------------------------------------------------------------------------------- 1 | local vim = vim or {} 2 | local map = vim.keymap.set 3 | 4 | vim.opt_local.foldenable = true 5 | vim.opt_local.foldlevel = 0 6 | vim.opt_local.foldnestmax = 0 7 | 8 | vim.opt_local.list = false 9 | 10 | vim.opt_local.cursorcolumn = false 11 | vim.opt_local.cursorline = false 12 | vim.opt_local.conceallevel = 0 13 | vim.opt_local.colorcolumn = '0' 14 | 15 | -- NOTE: Ensures that :q and :x work with neovim-remote 16 | -- https://github.com/mhinz/neovim-remote#typical-use-cases 17 | vim.opt_local.bufhidden = 'delete' 18 | 19 | vim.cmd(':normal zv') 20 | 21 | -- Create some additional fold movements 22 | map('n', 'zN', [[:normal zC/^diff --git:nohl:normal zA:normal zt]], { silent = true, buffer = true }) 23 | map('n', 'zP', [[:normal zC?^diff --git:nohl:normal zA:normal zt]], { silent = true, buffer = true }) 24 | 25 | map('n', 'zn', [[:normal zc/^@@:nohl:normal zv:normal zt]], { silent = true, buffer = true }) 26 | map('n', 'zp', [[:normal zc?^@@:nohl:normal zv:normal zb]], { silent = true, buffer = true }) 27 | map('n', 'q', 'DiffviewClose', { silent = true, buffer = true }) 28 | -------------------------------------------------------------------------------- /config/nvim/after/ftplugin/fugitiveblame.lua: -------------------------------------------------------------------------------- 1 | vim.call('general#MarkMargin', 0) 2 | -------------------------------------------------------------------------------- /config/nvim/after/ftplugin/git.lua: -------------------------------------------------------------------------------- 1 | local vim = vim or {} 2 | 3 | vim.opt_local.list = false 4 | vim.opt_local.cursorcolumn = false 5 | vim.opt_local.cursorline = false 6 | vim.opt_local.conceallevel = 0 7 | vim.opt_local.colorcolumn = '0' 8 | -------------------------------------------------------------------------------- /config/nvim/after/ftplugin/gitcommit.lua: -------------------------------------------------------------------------------- 1 | vim.opt_local.spell = true 2 | vim.opt_local.textwidth = 70 3 | 4 | -- NOTE: Ensures that :q and :x work with neovim-remote 5 | -- https://github.com/mhinz/neovim-remote#typical-use-cases 6 | vim.opt_local.bufhidden = 'delete' 7 | -------------------------------------------------------------------------------- /config/nvim/after/ftplugin/gitconfig.lua: -------------------------------------------------------------------------------- 1 | vim.opt_local.spell = true 2 | vim.opt_local.textwidth = 70 3 | 4 | -- NOTE: Ensures that :q and :x work with neovim-remote 5 | -- https://github.com/mhinz/neovim-remote#typical-use-cases 6 | vim.opt_local.bufhidden = 'delete' 7 | -------------------------------------------------------------------------------- /config/nvim/after/ftplugin/gitrebase.lua: -------------------------------------------------------------------------------- 1 | vim.opt_local.spell = true 2 | vim.opt_local.textwidth = 70 3 | 4 | -- NOTE: Ensures that :q and :x work with neovim-remote 5 | -- https://github.com/mhinz/neovim-remote#typical-use-cases 6 | vim.opt_local.bufhidden = 'delete' 7 | -------------------------------------------------------------------------------- /config/nvim/after/ftplugin/go.lua: -------------------------------------------------------------------------------- 1 | local vim = vim or {} 2 | 3 | -- vim.bo.tabstop = 2 4 | vim.opt_local.tabstop = 4 5 | vim.opt_local.shiftwidth = 4 6 | vim.opt_local.softtabstop = 4 7 | vim.opt_local.expandtab = 0 8 | 9 | -- vim.o.list = true 10 | -------------------------------------------------------------------------------- /config/nvim/after/ftplugin/help.lua: -------------------------------------------------------------------------------- 1 | local vim = vim or {} 2 | local map = vim.keymap.set 3 | 4 | -- Snippets from vim-help 5 | -- Credits: 6 | -- * https://github.com/dahu/vim-help 7 | -- * https://github.com/rafi/vim-config/blob/master/ftplugin/help.vim 8 | 9 | vim.opt_local.spell = false 10 | 11 | vim.opt_local.bufhidden = '' 12 | vim.opt_local.iskeyword = vim.bo.iskeyword .. ",:,#,-" 13 | 14 | vim.opt_local.cursorline = false 15 | vim.opt_local.colorcolumn = '0' 16 | 17 | -- Jump to links with o and L 18 | map('n', 'o', '', { remap = true, silent = true, buffer = true }) 19 | map('n', 'L', '', { remap = true, silent = true, buffer = true }) 20 | 21 | -- Jump back with H 22 | map('n', 'H', '', { remap = true, silent = true, buffer = true }) 23 | -------------------------------------------------------------------------------- /config/nvim/after/ftplugin/html.lua: -------------------------------------------------------------------------------- 1 | vim.opt_local.spell = true 2 | -------------------------------------------------------------------------------- /config/nvim/after/ftplugin/markdown.lua: -------------------------------------------------------------------------------- 1 | local vim = vim or {} 2 | 3 | vim.opt_local.spell = true 4 | 5 | -- setlocal omnifunc=htmlcomplete#CompleteTags 6 | vim.opt_local.complete = vim.bo.complete .. ',kspell' 7 | 8 | -- imap('' [[[s1z=`]a]], {}, true) 9 | 10 | -- Allow for folding markdown headings 11 | vim.g.markdown_folding = 1 12 | 13 | -------------------------------------------------------------------------------- /config/nvim/after/ftplugin/patch.lua: -------------------------------------------------------------------------------- 1 | local vim = vim or {} 2 | 3 | vim.opt_local.foldenable = true 4 | 5 | -- Autofold nothing by default 6 | vim.opt_local.foldlevel = 0 7 | 8 | -- Only fold outer functions 9 | vim.opt_local.foldnestmax = 0 10 | 11 | vim.opt_local.list = false 12 | vim.opt_local.cursorcolumn = false 13 | vim.opt_local.cursorline = false 14 | vim.opt_local.conceallevel = 0 15 | vim.opt_local.colorcolumn = '0' 16 | -------------------------------------------------------------------------------- /config/nvim/after/ftplugin/qf.lua: -------------------------------------------------------------------------------- 1 | -- Snippets from vim-qf 2 | -- Credits: https://github.com/romainl/vim-qf 3 | 4 | local vim = vim or {} 5 | local map = vim.keymap.set 6 | 7 | -- Preview the file under the cursor in a vertical preview window 8 | local function preview_file() 9 | local winwidth = vim.o.columns 10 | local cur_line = vim.fn.getline('.') 11 | local cur_file = vim.fn.fnameescape(cur_line:gsub('|.*$', '')) 12 | 13 | if cur_line:match('|%d+') then 14 | local cur_pos = cur_line:match('^.-|(%d+)') 15 | vim.cmd('vertical pedit! +' .. cur_pos .. ' ' .. cur_file) 16 | else 17 | vim.cmd('vertical pedit! ' .. cur_file) 18 | end 19 | 20 | vim.cmd('wincmd P') 21 | vim.cmd('vert resize ' .. math.floor(winwidth / 2)) 22 | vim.cmd('wincmd p') 23 | end 24 | 25 | -- expose function for mappings 26 | _G.quickfix_preview = preview_file 27 | 28 | -- Map keys for quickfix buffers 29 | map('n', 'p', 'lua quickfix_preview()', { silent = true, buffer = true }) 30 | map('n', 'q', ':pclose!:quit', { silent = true, buffer = true }) 31 | map('n', 'o', 'p', { silent = false, buffer = true }) 32 | 33 | -------------------------------------------------------------------------------- /config/nvim/after/ftplugin/rails.lua: -------------------------------------------------------------------------------- 1 | local vim = vim or {} 2 | local map = vim.keymap.set 3 | 4 | -- tpope/vim-rails 5 | map('n', ' rC', ':.Runner', { silent = true, buffer = true }) 6 | map('n', ' rA', ':Runner', { silent = true, buffer = true }) 7 | -------------------------------------------------------------------------------- /config/nvim/after/ftplugin/ruby.lua: -------------------------------------------------------------------------------- 1 | local vim = vim or {} 2 | 3 | vim.opt_local.number = true 4 | vim.opt_local.relativenumber = true 5 | 6 | -------------------------------------------------------------------------------- /config/nvim/after/ftplugin/sql.lua: -------------------------------------------------------------------------------- 1 | vim.opt_local.foldenable = false 2 | vim.opt_local.foldmethod = 'manual' 3 | -------------------------------------------------------------------------------- /config/nvim/init.lua: -------------------------------------------------------------------------------- 1 | vim.loader.enable() 2 | 3 | local k = vim.keycode 4 | 5 | -- load options, keymaps and autocommands from separate modules 6 | require('options') 7 | 8 | -- Abbreviations {{{ 9 | -- Fix annoying typos 10 | vim.api.nvim_exec([[ 11 | cnoreabbrev qw wq 12 | cnoreabbrev Wq wq 13 | cnoreabbrev WQ wq 14 | cnoreabbrev QA qa 15 | cnoreabbrev Qa qa 16 | cnoreabbrev W w 17 | cnoreabbrev WW w 18 | cnoreabbrev Q q 19 | 20 | inoreabbrev teh the 21 | inoreabbrev reprot report 22 | inoreabbrev Reprot Report 23 | ]], false) 24 | 25 | -- }}} 26 | -- Variables {{{ 27 | vim.g.python_host_prog = "python3" 28 | 29 | vim.g.netrw_browsex_viewer = 30 | "open -a '/Applications/Google Chrome.app'" -- ensure gx opens the url under cursor 31 | vim.g.netrw_keepdir = 0 32 | 33 | vim.g.mapleader = k'' -- Set mapleader to 34 | -- }}} 35 | 36 | require('keymaps') 37 | require('autocmds') 38 | 39 | 40 | 41 | 42 | if vim.g.vscode then 43 | -- VSCode extension 44 | else 45 | -- PLUGINS {{{ 46 | local rocks_config = { 47 | rocks_path = vim.env.HOME .. "/.local/share/nvim/rocks", 48 | luarocks_config = { 49 | arch = "macosx-aarch64", -- or arch = "macosx-x86_64" , depending on your architecture 50 | }, 51 | } 52 | 53 | vim.g.rocks_nvim = rocks_config 54 | 55 | local luarocks_path = { 56 | vim.fs.joinpath(rocks_config.rocks_path, "share", "lua", "5.1", "?.lua"), 57 | vim.fs.joinpath(rocks_config.rocks_path, "share", "lua", "5.1", "?", "init.lua"), 58 | } 59 | package.path = package.path .. ";" .. table.concat(luarocks_path, ";") 60 | 61 | local luarocks_cpath = { 62 | vim.fs.joinpath(rocks_config.rocks_path, "lib", "lua", "5.1", "?.so"), 63 | vim.fs.joinpath(rocks_config.rocks_path, "lib64", "lua", "5.1", "?.so"), 64 | -- Remove the dylib and dll paths if you do not need macos or windows support 65 | vim.fs.joinpath(rocks_config.rocks_path, "lib", "lua", "5.1", "?.dylib"), 66 | vim.fs.joinpath(rocks_config.rocks_path, "lib64", "lua", "5.1", "?.dylib"), 67 | vim.fs.joinpath(rocks_config.rocks_path, "lib", "lua", "5.1", "?.dll"), 68 | vim.fs.joinpath(rocks_config.rocks_path, "lib64", "lua", "5.1", "?.dll"), 69 | } 70 | package.cpath = package.cpath .. ";" .. table.concat(luarocks_cpath, ";") 71 | 72 | vim.opt.runtimepath:append(vim.fs.joinpath(rocks_config.rocks_path, "lib", "luarocks", "rocks-5.1", "rocks.nvim", "*")) 73 | -- }}} 74 | end 75 | 76 | -- vim: foldmethod=marker:sw=2:foldlevel=10 77 | -------------------------------------------------------------------------------- /config/nvim/lua/autocmds.lua: -------------------------------------------------------------------------------- 1 | local vim = vim or {} 2 | local augroup = vim.api.nvim_create_augroup 3 | local autocmd = vim.api.nvim_create_autocmd 4 | 5 | local general = augroup('ALEXANDER_GENERAL_LUA', {}) 6 | 7 | -- When editing a file, always jump to the last known cursor position. 8 | autocmd('BufReadPost', { 9 | callback = function() 10 | local line = vim.fn.line 11 | if vim.bo.filetype == 'gitcommit' then return end 12 | if line("'\"") <= 0 then return end 13 | if line("'\"") > line('$') then return end 14 | vim.cmd("normal g`\"") 15 | vim.cmd('normal zv') 16 | end, 17 | group = general 18 | }) 19 | 20 | -- Set syntax highlighting for Appraisals 21 | vim.filetype.add({ filename = { Appraisals = 'ruby' } }) 22 | 23 | -- Function to delete hidden buffers 24 | autocmd('BufLeave', { 25 | pattern = '*', 26 | callback = function() 27 | local buffers = vim.fn.filter(vim.fn.range(1, vim.fn.bufnr('$')), function(_, val) 28 | return vim.fn.buflisted(val) == 1 and vim.fn.bufwinnr(val) == -1 and vim.fn.getbufvar(val, "&modified") == 0 and 29 | vim.fn.empty(vim.fn.bufname(val)) == 1 30 | end) 31 | for _, buf in ipairs(buffers) do 32 | vim.cmd('bdelete ' .. buf) 33 | end 34 | end, 35 | group = general 36 | }) 37 | 38 | -- Automatically remove trailing whitespaces unless file is blacklisted 39 | autocmd('BufWritePre', { 40 | callback = function() 41 | require('general').Preserve(function() vim.cmd("%s/\\s\\+$//e") end) 42 | end, 43 | group = general 44 | }) 45 | 46 | -- Ensure directory structure exists when opening a new file 47 | autocmd('BufNewFile', { 48 | callback = function() require('general').EnsureDirExists() end, 49 | group = general 50 | }) 51 | 52 | -- NOTE: open quickfix/location list window after it's populated 53 | local qf_group = augroup('ALEXANDER_QF', {}) 54 | autocmd('QuickFixCmdPost', { 55 | pattern = '[^l]*', 56 | command = 'cwindow', 57 | group = qf_group 58 | }) 59 | 60 | autocmd('QuickFixCmdPost', { 61 | pattern = 'l*', 62 | command = 'lwindow', 63 | group = qf_group 64 | }) 65 | 66 | return {} 67 | -------------------------------------------------------------------------------- /config/nvim/lua/general.lua: -------------------------------------------------------------------------------- 1 | local Util = require('util') 2 | 3 | local mkdir = Util.mkdir 4 | local cmd = Util.nvim_command 5 | local nvim_call_function = Util.nvim_call_function 6 | 7 | local General = {} 8 | 9 | -- NOTE: inspired by a similar function in Damian Conway's vimrc 10 | -- SOURCE: https://github.com/thoughtstream/Damian-Conway-s-Vim-Setup/blob/master/.vimrc 11 | function General.EnsureDirExists() 12 | local required_dir = vim.fn.expand('%:h') 13 | 14 | if not Util.exists(required_dir) then 15 | Util.confirm({ 16 | create = Util.noop, 17 | quit = function() cmd('exit') end 18 | }, "Parent directory '" .. required_dir .. "' doesn't exist.") 19 | 20 | if not mkdir(required_dir) then 21 | Util.confirm({ 22 | Quit = function() cmd('exit') end, 23 | Continue = '' 24 | }, "Can't create '" .. required_dir .. "'") 25 | end 26 | end 27 | end 28 | 29 | function General.rename_file() 30 | local fname = vim.api.nvim_buf_get_name(0) 31 | local new_name = vim.fn.input('New file name: ', fname) 32 | 33 | if new_name and #new_name > 0 and new_name ~= fname then 34 | Util.confirm({ 35 | Yes = function() 36 | vim.fn.rename(fname, new_name) 37 | vim.cmd('edit ' .. new_name) 38 | vim.cmd('w! ' .. new_name) 39 | vim.cmd('redraw!') 40 | end, 41 | No = Util.noop 42 | }) 43 | end 44 | end 45 | 46 | -- NOTE: Inspired by similar function in Damian Conway's vimrc 47 | -- SOURCE: https://github.com/thoughtstream/Damian-Conway-s-Vim-Setup/blob/master/.vimrc 48 | function General.hl_next(blinktime) 49 | local target_pat = [[\c\%#]] .. vim.fn.getreg('/') 50 | 51 | local ring = vim.fn.matchadd('CurrentSearchMatch', target_pat, 101) 52 | vim.cmd('redraw') 53 | 54 | cmd('sleep ' .. blinktime .. 'm') 55 | 56 | vim.fn.matchdelete(ring) 57 | vim.cmd('redraw') 58 | end 59 | 60 | function General.Preserve(callback) 61 | -- Preparation: save last search, and cursor position. 62 | local search = vim.fn.getreg('/') 63 | local line = vim.fn.line('.') 64 | local col = vim.fn.col('.') 65 | 66 | -- Do the business unless filetype is blacklisted 67 | local blacklist = {'sql'} 68 | 69 | local in_blacklist = false 70 | for _, value in pairs(blacklist) do 71 | if value == vim.bo.filetype then 72 | in_blacklist = true 73 | end 74 | end 75 | 76 | if in_blacklist == false then 77 | callback() 78 | end 79 | 80 | -- Clean up: restore previous search history, and cursor position 81 | vim.fn.setreg('/', search) 82 | vim.fn.cursor(line, col) 83 | end 84 | 85 | function General.ExecuteMacroOverVisualRange() 86 | -- Get the macro register from the user input 87 | local macro_register = vim.fn.nr2char(vim.fn.getchar()) 88 | -- Echo the macro register (for debugging purposes) 89 | print('@' .. macro_register) 90 | -- Execute the macro over the visual selection 91 | vim.cmd(":'<,'>normal @" .. macro_register) 92 | end 93 | 94 | return General 95 | -------------------------------------------------------------------------------- /config/nvim/lua/keymaps.lua: -------------------------------------------------------------------------------- 1 | local vim = vim or {} 2 | local map = vim.keymap.set 3 | 4 | -- main keymaps 5 | map('n', 'n', [[nzz:lua require('general').hl_next(100)]], { silent = true }) 6 | map('n', 'N', [[Nzz:lua require('general').hl_next(100)]], { silent = true }) 7 | 8 | -- KEYBINDINGS: Editing 9 | -- Map '@' in visual mode to run macro over visual selection 10 | vim.keymap.set('x', '@', [[:lua require('general').ExecuteMacroOverVisualRange()]], { 11 | noremap = true, 12 | silent = true, 13 | desc = 'Run macro over visual selection', 14 | }) 15 | 16 | -- Define the Bufmacro command 17 | vim.api.nvim_create_user_command('Bufmacro', function() 18 | vim.cmd('bufdo execute "normal @a" | write') 19 | end, {}) 20 | 21 | -- Define the Cmacro command 22 | vim.api.nvim_create_user_command('Cmacro', function() 23 | vim.cmd('cdo execute "normal @a" | write') 24 | end, {}) 25 | 26 | -- Move visual block 27 | map('v', 'J', [[:m '>+1gv=gv]], { silent = true }) 28 | map('v', 'K', [[:m '<-2gv=gv]], { silent = true }) 29 | 30 | -- custom comma motion mapping 31 | map('n', 'di,', [[f,dT,]], { silent = true }) 32 | map('n', 'ci,', [[f,cT,]], { silent = true }) 33 | 34 | -- (upper|lower)case word under cursor 35 | map('n', 'g^', [[gUiW]], { silent = true }) 36 | map('n', 'gv', [[guiW]], { silent = true }) 37 | 38 | -- Create newline before/after current row 39 | map('n', 'go', [[ok]], { silent = true }) 40 | map('n', 'gO', [[Oj]], { silent = true }) 41 | 42 | -- Paste and keep pasting same thing, don't take what was removed 43 | map('v', 'p', [["_dP]], { silent = true }) 44 | 45 | -- Make Y behave like other capital commands. 46 | map('n', 'Y', [[y$]], { silent = true }) 47 | 48 | -- keep selection after indent 49 | map('v', '<', [[', [[>gv]], { silent = true }) 51 | 52 | map('i', '', [[x]], { silent = true }) 53 | 54 | -- KEYBINDINGS: Navigation / Search 55 | -- Go to previous and next item in quickfix list 56 | map('n', ' cw', [[:cwindowJ]], { silent = true }) 57 | map('n', ' cq', [[:cclose]], { silent = true }) 58 | map('n', ' cn', [[:cnext]], { silent = true }) 59 | map('n', ' cN', [[:cnfile]], { silent = true }) 60 | map('n', ' cp', [[:cprev]], { silent = true }) 61 | map('n', ' cP', [[:cpfile]], { silent = true }) 62 | 63 | map('n', ' ln', [[:lnext]], { silent = true }) 64 | map('n', ' lN', [[:lnfile]], { silent = true }) 65 | map('n', ' lp', [[:lprev]], { silent = true }) 66 | map('n', ' lP', [[:lpfile]], { silent = true }) 67 | 68 | -- Split creation 69 | map('n', ' wv', [[v]], { silent = true }) 70 | map('n', ' ws', [[s]], { silent = true }) 71 | 72 | -- Split resizing 73 | map('n', '', [[5<]], { remap = true, silent = true }) 74 | map('n', '', [[5+]], { remap = true, silent = true }) 75 | map('n', '', [[5-]], { remap = true, silent = true }) 76 | map('n', '', [[5>]], { remap = true, silent = true }) 77 | 78 | -- Split navigation 79 | map('n', '', [[]], { silent = true }) 80 | map('n', '', [[]], { silent = true }) 81 | map('n', '', [[]], { silent = true }) 82 | map('n', '', [[]], { silent = true }) 83 | map('n', [[]], [[]], { silent = true }) 84 | 85 | -- KEYBINDINGS: General 86 | -- Disable arrows and BS in insert mode 87 | map('i', '', [[]], { silent = true }) 88 | map('i', '', [[]], { silent = true }) 89 | map('i', '', [[]], { silent = true }) 90 | map('i', '', [[]], { silent = true }) 91 | map('i', '', [[]], { silent = true }) 92 | 93 | -- Wrapped lines goes down/up to next row, rather than next line in file. 94 | map('n', 'j', [[gj]], { silent = true }) 95 | map('n', 'k', [[gk]], { silent = true }) 96 | 97 | -- Find merge conflict markers 98 | map('n', 'gm', [[/\v^[<\|=>]{7}( .*\|$)]], { silent = false }) 99 | 100 | -- Rebind the old H and L key to zh, zl 101 | map('n', 'zh', [[H]], { silent = true }) 102 | map('n', 'zm', [[M]], { silent = true }) 103 | map('n', 'zl', [[L]], { silent = true }) 104 | 105 | -- Repurpose the H and L keys to quickly switch buffers 106 | map('n', 'H', [[:bp]], { silent = true }) 107 | map('n', 'L', [[:bn]], { silent = true }) 108 | 109 | map('n', 'zgg', [[:normal 100000000zk]], { silent = true }) 110 | map('n', 'zG', [[:normal 100000000zj]], { silent = true }) 111 | 112 | -- auto-center on specific movement keys, and blink current search match 113 | map('n', 'G', [[Gzz]], { silent = true }) 114 | map('n', 'n', [[nzz:lua require('general').hl_next(100)]], { silent = true }) 115 | map('n', 'N', [[Nzz:lua require('general').hl_next(100)]], { silent = true }) 116 | map('n', '}', [[}zz]], { silent = true }) 117 | map('n', '{', [[{zz]], { silent = true }) 118 | 119 | map('n', '', '', { silent = true, noremap = true }) 120 | 121 | -- Save the current buffer 122 | map('n', 'fs', ':w', { silent = true }) 123 | 124 | -- Open vimrc with fed 125 | map('n', 'fed', ':e $MYVIMRC', { silent = true }) 126 | 127 | -- Reload vimrc with feR 128 | map('n', 'feR', ':luafile $MYVIMRC', { silent = true }) 129 | 130 | -- Save file with sudo 131 | vim.keymap.set('c', 'w!!', 'w !sudo tee % > /dev/null', { 132 | noremap = true, 133 | silent = false, 134 | desc = 'Write with sudo', 135 | }) 136 | 137 | -- Copy current file path + line number to system clipboard 138 | map('n', 'fC', [[:let @+=expand("%") . ":" . line(".")]], { silent = true }) 139 | 140 | return {} 141 | -------------------------------------------------------------------------------- /config/nvim/lua/options.lua: -------------------------------------------------------------------------------- 1 | local vim = vim or {} 2 | 3 | -- Meta accessors for vim options 4 | local o = vim.o 5 | local bo = vim.bo 6 | local wo = vim.wo 7 | local k = vim.keycode 8 | 9 | local home = os.getenv("HOME") 10 | local pwd = os.getenv("PWD") 11 | 12 | -- OPTIONS: Editor 13 | o.path = pwd .. ',' .. pwd .. '/**' 14 | -- Make :find more usable by default 15 | o.wildmenu = true 16 | -- Show all matches when tab completing 17 | o.wildmode = 'longest:list,full' 18 | -- Show longest match first 19 | o.regexpengine = 0 20 | -- Better for ruby 21 | o.swapfile = false 22 | -- Disable swap 23 | o.showmode = true 24 | -- show mode in bottom-left corner 25 | o.synmaxcol = 200 26 | -- Only syntax highlight 200 chars (performance) 27 | o.autowrite = true 28 | -- Write before running commands. 29 | o.shortmess = 'aAIsTF' 30 | -- Reduce |hit-enter| prompts. 31 | o.cmdheight = 1 32 | -- Number of screen lines for the command-line. 33 | o.smartcase = true 34 | -- Search case insensitive. 35 | -- o.textwidth = 100 -- Set maximum number of characters per line 36 | o.sessionoptions = 37 | "blank,buffers,curdir,folds,help,tabpages,winsize,resize,globals" 38 | -- Changes the effect of the |:mksession| cmd. 39 | o.spellfile = home .. '/.config/nvim/spell/en.utf-8.add' 40 | o.listchars = "tab:▸ ,trail:-,extends:»,precedes:«,space:·,nbsp:·,eol:¬" 41 | -- Strings in 'list' mode. 42 | o.hidden = true 43 | -- Allow for more then one unsaved buffer. 44 | o.undofile = true 45 | -- Save undo's after file closes. 46 | o.undolevels = 1000 47 | -- Number of changes to be saved. 48 | o.tabstop = 2 49 | -- Number of spaces a char is rendered as. 50 | o.shiftwidth = 2 51 | -- Number of spaces that >> and << count for. 52 | o.softtabstop = 2 53 | -- Number of spaces of while editing. 54 | o.expandtab = true 55 | -- Use spaces instead of for indentation. 56 | o.splitbelow = true 57 | -- Open new split panes at bottommost position 58 | o.splitright = true 59 | -- Open new split panes at rightmost position 60 | -- NOTE: commented out as this can conflict with Noice 61 | o.lazyredraw = true 62 | -- Don't redraw while executing macros. 63 | o.inccommand = 'nosplit' 64 | -- Show visual indication when using substitute. 65 | o.modeline = true 66 | -- load vim settings from magic file comment 67 | o.confirm = true 68 | -- Makes operations like qa ask for confirmation 69 | o.scrolloff = 2 70 | -- Keep at least 2 lines above/below 71 | o.sidescrolloff = 5 72 | -- Keep at least 5 lines left/right 73 | o.smartindent = true 74 | o.updatetime = 1000 75 | -- if idle for updatetime write swap and trigger CursorHold 76 | --[[ o.statusline = o.statusline .. "%=" 77 | o.statusline = o.statusline .. "%{&paste?'  ':''}" 78 | o.statusline = o.statusline .. "%{&spell?' ¶ ':''}" ]] 79 | 80 | o.laststatus = 2 81 | -- Disable/enable bottom statusline 82 | o.syntax = 'on' 83 | 84 | o.shell = "/bin/sh" -- Set shell to bin/sh to improve performance in zsh 85 | o.termguicolors = true 86 | o.background = 'dark' 87 | 88 | -- OPTIONS: Window 89 | wo.wrap = false -- Don't wrap lines as it makes j/k unintuitive. 90 | wo.list = false 91 | -- wo.colorcolumn = +1 -- Highlight first column after 'textwidth' 92 | wo.number = true -- Enable line numbers 93 | wo.relativenumber = true -- Make line numbers relative 94 | wo.numberwidth = 4 -- Set width of number column 95 | wo.foldenable = true -- collapse all folds. 96 | wo.foldcolumn = '0' -- Don't indicate fold open/closed 97 | wo.foldlevel = 99 -- Using ufo provider need a large value 98 | o.foldlevelstart = 99 -- Sets 'foldlevel' when starting to edit another buffer in a window. (99) means no folds are closed at start 99 | wo.foldnestmax = 3 -- Only fold outer functions 100 | 101 | if wo.diff == true then -- Set diff mode specific window options 102 | wo.list = false 103 | wo.cursorcolumn = false 104 | wo.cursorline = false 105 | wo.conceallevel = 0 106 | wo.colorcolumn = '0' 107 | end 108 | 109 | vim.cmd.colorscheme "modus_operandi" 110 | 111 | return {} 112 | -------------------------------------------------------------------------------- /config/nvim/lua/plugins/autocomplete.lua: -------------------------------------------------------------------------------- 1 | local cmp = require('cmp') 2 | local lspkind = require('lspkind') 3 | 4 | -- require("cmp-path").setup() 5 | -- require("cmp-buffer").setup() 6 | -- require("cmp-cmdline").setup() 7 | 8 | lspkind.init({ 9 | mode = 'symbol', 10 | preset = 'codicons', 11 | }) 12 | 13 | --[[ require("copilot").setup({ 14 | panel = { 15 | enabled = false, 16 | auto_refresh = false, 17 | }, 18 | suggestion = { 19 | enabled = false, 20 | auto_trigger = true, 21 | debounce = 75, 22 | }, 23 | filetypes = { 24 | help = false, 25 | gitcommit = false, 26 | gitrebase = false, 27 | hgcommit = false, 28 | svn = false, 29 | cvs = false, 30 | ["."] = false, 31 | }, 32 | }) 33 | 34 | require("copilot_cmp").setup() ]] 35 | 36 | cmp.setup({ 37 | snippet = { 38 | expand = function(args) 39 | vim.snippet.expand(args.body) -- For native neovim snippets (Neovim v0.10+) 40 | end, 41 | }, 42 | window = { 43 | completion = cmp.config.window.bordered(), 44 | documentation = cmp.config.window.bordered(), 45 | }, 46 | mapping = cmp.mapping.preset.insert({ 47 | [''] = cmp.mapping.scroll_docs(-4), 48 | [''] = cmp.mapping.scroll_docs(4), 49 | [''] = cmp.mapping.complete(), 50 | [''] = cmp.mapping.abort(), 51 | [''] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. 52 | }), 53 | sources = cmp.config.sources({ 54 | -- { name = "copilot" }, 55 | { name = "nvim_lsp" }, 56 | }, { 57 | { name = 'buffer' }, 58 | { name = "path" }, 59 | { name = "orgmode" }, 60 | }), 61 | formatting = { 62 | -- fields = { "kind", "abbr" }, 63 | fields = { "kind", "abbr", "menu" }, 64 | format = function(entry, vim_item) 65 | local kind = lspkind.cmp_format({ 66 | mode = 'symbol_text', -- show only symbol annotations 67 | maxwidth = 50, -- prevent the popup from showing more than provided characters (e.g 50 will not show more than 50 characters) 68 | ellipsis_char = '...', -- when popup menu exceed maxwidth, the truncated part would show ellipsis_char instead (must define maxwidth first) 69 | show_labelDetails = true, -- show labelDetails in menu. Disabled by default 70 | symbol_map = { Copilot = "" } 71 | })(entry, vim_item) 72 | 73 | local strings = vim.split(kind.kind, "%s", { trimempty = true }) 74 | kind.kind = " " .. (strings[1] or "") .. " " 75 | kind.menu = " (" .. (strings[2] or "") .. ")" 76 | 77 | return kind 78 | end, 79 | } 80 | }) 81 | 82 | -- Use buffer source for `/` and `?` (if you enabled `native_menu`, this won't work anymore). 83 | cmp.setup.cmdline({ '/', '?' }, { 84 | mapping = cmp.mapping.preset.cmdline(), 85 | sources = cmp.config.sources({ 86 | { name = 'buffer' }, 87 | }, { 88 | { name = 'path' } 89 | }), 90 | }) 91 | 92 | -- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore). 93 | cmp.setup.cmdline(':', { 94 | mapping = cmp.mapping.preset.cmdline(), 95 | sources = cmp.config.sources({ 96 | { name = 'cmdline' } 97 | }, { 98 | { name = 'path' } 99 | }), 100 | matching = { disallow_symbol_nonprefix_matching = false } 101 | }) 102 | -------------------------------------------------------------------------------- /config/nvim/lua/plugins/blame-nvim.lua: -------------------------------------------------------------------------------- 1 | local blame = require('blame') 2 | local window_view = require("blame.views.window_view") 3 | local virtual_view = require("blame.views.virtual_view") 4 | local formats = require("blame.formats.default_formats") 5 | commit_date_author_fn = function(line_porcelain, config, idx) 6 | local hash = string.sub(line_porcelain.hash, 0, 7) 7 | local line_with_hl = {} 8 | local is_commited = hash ~= "0000000" 9 | 10 | -- Helper function to trim a string to the max_summary_width 11 | local function trim_to_width(str, width) 12 | if #str > width then 13 | return string.sub(str, 1, width) .. "…" -- Use ellipsis to indicate truncation 14 | else 15 | return str 16 | end 17 | end 18 | 19 | if is_commited then 20 | -- Trim author name based on max_summary_width 21 | local trimmed_author = trim_to_width(line_porcelain.author, config.max_summary_width) 22 | 23 | -- Create the values table dynamically based on config.show_date 24 | local values = { 25 | { 26 | textValue = hash, 27 | hl = "Comment", 28 | }, 29 | { 30 | textValue = trimmed_author, 31 | hl = hash, 32 | }, 33 | } 34 | 35 | if config.show_date then 36 | -- Insert the date value into the values table if show_date is true 37 | table.insert(values, 2, { 38 | textValue = os.date(config.date_format, line_porcelain.committer_time), 39 | hl = hash, 40 | }) 41 | end 42 | 43 | -- Set format string dynamically based on whether date is shown 44 | local format_str = config.show_date and "%s %s %s" or "%s %s" 45 | 46 | line_with_hl = { 47 | idx = idx, 48 | values = values, 49 | format = format_str, 50 | } 51 | else 52 | line_with_hl = { 53 | idx = idx, 54 | values = { 55 | { 56 | textValue = "Not commited", 57 | hl = "Comment", 58 | }, 59 | }, 60 | format = "%s", 61 | } 62 | end 63 | 64 | return line_with_hl 65 | end 66 | blame.setup({ 67 | date_format = "%Y.%m.%d", 68 | focus_blame = true, 69 | merge_consecutive = false, 70 | virtual_style = "right_align", 71 | show_date = true, 72 | views = { 73 | window = window_view, 74 | virtual = virtual_view, 75 | default = window_view, 76 | }, 77 | max_summary_width = 15, 78 | colors = { "#595959" }, 79 | blame_options = nil, 80 | commit_detail_view = "vsplit", 81 | format_fn = commit_date_author_fn, 82 | -- format_fn = formats.commit_date_author_fn, 83 | mappings = { 84 | commit_info = "i", 85 | stack_push = "", 86 | stack_pop = "", 87 | show_commit = "", 88 | close = { "", "q" }, 89 | } 90 | }) 91 | -------------------------------------------------------------------------------- /config/nvim/lua/plugins/bufferline-nvim.lua: -------------------------------------------------------------------------------- 1 | require("bufferline").setup { 2 | options = { 3 | diagnostics = 'nvim_lsp', 4 | show_buffer_close_icons = false, 5 | numbers = function(opts) -- TODO: HACK to display readonly flag 6 | if vim.bo[opts.id].readonly then 7 | return "" 8 | else 9 | return "" 10 | end 11 | end, 12 | name_formatter = function(buf) 13 | local len = #buf.path 14 | local sep = "/" 15 | local max_len = 18 16 | local path = vim.fn.expand('%:~:.') 17 | 18 | if len <= max_len then 19 | return path 20 | end 21 | 22 | local segments = vim.split(path, sep) 23 | for idx = 1, #segments - 1 do 24 | if len <= max_len then 25 | break 26 | end 27 | 28 | local segment = segments[idx] 29 | local shortened = segment:sub(1, vim.startswith(segment, '.') and 2 or 1) 30 | segments[idx] = shortened 31 | len = len - (#segment - #shortened) 32 | end 33 | 34 | return table.concat(segments, sep) 35 | end, 36 | --[[ groups = { 37 | options = { 38 | toggle_hidden_on_enter = true -- when you re-enter a hidden group this options re-opens that group so the buffer is visible 39 | }, 40 | items = { 41 | { 42 | name = " Tests", -- Mandatory 43 | auto_close = true, 44 | priority = 2, -- determines where it will appear relative to other groups (Optional) 45 | matcher = function(buf) -- Mandatory 46 | local filepath = vim.api.nvim_buf_get_name(buf.id) 47 | return filepath:match("%_spec") or 48 | filepath:match("%_test") or 49 | filepath:match("%.test") or 50 | filepath:match("%.feature") 51 | end, 52 | }, 53 | } 54 | } ]] 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /config/nvim/lua/plugins/git.lua: -------------------------------------------------------------------------------- 1 | local map = vim.keymap.set 2 | 3 | local diffview = require("diffview") 4 | local neogit = require('neogit') 5 | 6 | diffview.setup() 7 | neogit.setup({ 8 | auto_show_console = false 9 | }) 10 | 11 | map('n', 'gs', [[:lua require('neogit').open()]], { silent = true }) 12 | map('n', 'dc', [[:DiffviewClose]], { silent = true }) 13 | map('n', 'gd', [[:DiffviewOpen]], { silent = true }) 14 | map('n', 'gD', [[:DiffviewOpen develop]], { silent = true }) 15 | map('n', 'fh', [[:DiffviewFileHistory %]], { silent = true }) 16 | -------------------------------------------------------------------------------- /config/nvim/lua/plugins/kommentary.lua: -------------------------------------------------------------------------------- 1 | 2 | vim.g.kommentary_create_default_mappings = false 3 | 4 | vim.keymap.set("n", "gcc", "kommentary_line_default", { desc = 'Toggle comment line' }) 5 | vim.keymap.set("n", "gc", "kommentary_motion_default", { desc = 'Toggle comment motion' }) 6 | vim.keymap.set("v", "gc", "kommentary_visual_default", { desc = 'Toggle comment selection' }) 7 | -------------------------------------------------------------------------------- /config/nvim/lua/plugins/modus-themes-nvim.lua: -------------------------------------------------------------------------------- 1 | -- Default options 2 | require("modus-themes").setup({ 3 | -- Theme comes in two styles `modus_operandi` and `modus_vivendi` 4 | -- `auto` will automatically set style based on background set with vim.o.background 5 | style = "auto", 6 | variant = "default", -- Theme comes in four variants `default`, `tinted`, `deuteranopia`, and `tritanopia` 7 | transparent = false, -- Transparent background (as supported by the terminal) 8 | dim_inactive = false, -- "non-current" windows are dimmed 9 | styles = { 10 | -- Style to be applied to different syntax groups 11 | -- Value is any valid attr-list value for `:help nvim_set_hl` 12 | comments = { italic = true }, 13 | keywords = { bold = true }, 14 | functions = {}, 15 | variables = {}, 16 | }, 17 | 18 | --- You can override specific color groups to use other groups or a hex color 19 | --- Function will be called with a ColorScheme table 20 | --- Refer to `extras/lua/modus_operandi.lua` or `extras/lua/modus_vivendi.lua` for the ColorScheme table 21 | ---@param colors ColorScheme 22 | on_colors = function(colors) end, 23 | 24 | --- You can override specific highlights to use other groups or a hex color 25 | --- Function will be called with a Highlights and ColorScheme table 26 | --- Refer to `extras/lua/modus_operandi.lua` or `extras/lua/modus_vivendi.lua` for the Highlights and ColorScheme table 27 | ---@param highlights Highlights 28 | ---@param colors ColorScheme 29 | on_highlights = function(highlights, colors) end, 30 | }) 31 | -------------------------------------------------------------------------------- /config/nvim/lua/plugins/neorg.lua: -------------------------------------------------------------------------------- 1 | local home = vim.env.HOME 2 | 3 | require("neorg").setup { 4 | load = { 5 | ["core.defaults"] = {}, 6 | ["core.concealer"] = {}, 7 | ["core.dirman"] = { 8 | config = { 9 | workspaces = { 10 | notes = home .. "/Documents/Notes", 11 | }, 12 | default_workspace = "notes", 13 | }, 14 | }, 15 | -- ["external.context"] = {}, 16 | }, 17 | } 18 | -------------------------------------------------------------------------------- /config/nvim/lua/plugins/nvim-lspconfig.lua: -------------------------------------------------------------------------------- 1 | local lspconfig = require('lspconfig') 2 | local configs = require("lspconfig.configs") 3 | local util = require("lspconfig.util") 4 | 5 | local map = vim.keymap.set 6 | 7 | local capabilities = require('cmp_nvim_lsp').default_capabilities() 8 | 9 | -- Diagnostics {{{ 10 | 11 | vim.diagnostic.config({ 12 | virtual_text = { 13 | source = "if_many", -- Or "if_many" 14 | severity = vim.diagnostic.severity.ERROR, 15 | prefix = '⏽', -- Could be '■', '▎', 'x' 16 | }, 17 | underline = true, 18 | signs = true, 19 | severity_sort = true, 20 | float = { 21 | source = "if_many", -- Or "if_many" 22 | }, 23 | }) 24 | 25 | vim.api.nvim_create_autocmd('CursorHold', { 26 | callback = vim.diagnostic.open_float, 27 | }) 28 | vim.api.nvim_create_autocmd('CursorHoldI', { 29 | callback = vim.diagnostic.open_float, 30 | }) 31 | -- }}} 32 | 33 | 34 | -- Signs {{{ 35 | local signs = { Error = " ", Warn = " ", Hint = " ", Info = " " } 36 | -- local signs = { Error = "⏽", Warn = "⏽", Hint = "⏽", Info = "⏽" } 37 | for type, icon in pairs(signs) do 38 | local hl = "DiagnosticSign" .. type 39 | vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl }) 40 | end 41 | -- }}} 42 | 43 | --[[ lspconfig.solargraph.setup { 44 | capabilities = capabilities, 45 | settings = { 46 | solargraph = { 47 | diagnostics = true, 48 | formatting = true, 49 | completion = true, 50 | definitions = true, 51 | symbols = true, 52 | hover = true, 53 | references = true 54 | } 55 | } 56 | } ]] 57 | 58 | lspconfig.ruby_lsp.setup { 59 | capabilities = capabilities, -- This is for enabling features like completion, etc. 60 | init_options = { 61 | enabledFeatures = { 62 | codeActions = true, 63 | codeLens = true, 64 | completion = true, 65 | definition = true, 66 | diagnostics = true, 67 | documentHighlights = true, 68 | documentLink = true, 69 | documentSymbols = true, 70 | foldingRanges = true, 71 | formatting = true, 72 | hover = true, 73 | inlayHint = true, 74 | onTypeFormatting = true, 75 | selectionRanges = true, 76 | semanticHighlighting = true, 77 | signatureHelp = true, 78 | typeHierarchy = true, 79 | workspaceSymbol = true 80 | }, 81 | --[[ "featuresConfiguration": { 82 | "inlayHint": { 83 | "implicitHashValue": true, 84 | "implicitRescue": true 85 | } 86 | }, ]] 87 | formatter = 'auto', 88 | linters = { 'standard', 'rubocop' }, 89 | }, 90 | } 91 | 92 | lspconfig.cssls.setup{ 93 | capabilities = capabilities, 94 | } 95 | 96 | lspconfig.ts_ls.setup{ capabilities = capabilities } 97 | 98 | lspconfig.lua_ls.setup{ 99 | capabilities = capabilities, 100 | } 101 | 102 | lspconfig.jsonls.setup{ 103 | capabilities = capabilities, 104 | } 105 | 106 | lspconfig.gopls.setup{ 107 | capabilities = capabilities, 108 | cmd = {"gopls", "serve"}, 109 | settings = { 110 | gopls = { 111 | analyses = { 112 | unusedparams = true, 113 | }, 114 | staticcheck = true, 115 | gofumpt = true 116 | }, 117 | }, 118 | } 119 | 120 | map('n', 'gD', 'lua vim.lsp.buf.declaration()', { silent = true }) 121 | map('n', 'gd', 'lua vim.lsp.buf.definition()', { silent = true }) 122 | map('n', 'gh ', 'lua vim.lsp.buf.hover()', { silent = true }) 123 | map('n', 'gi', 'lua vim.lsp.buf.implementation()', { silent = true }) 124 | map('n', 'gr', 'lua vim.lsp.buf.references()', { silent = true }) 125 | 126 | map('n', '=', 'lua vim.lsp.buf.format()', { silent = true }) 127 | 128 | map('n', '[d', 'lua vim.diagnostic.goto_prev()', { silent = true }) 129 | map('n', ']d', 'lua vim.diagnostic.goto_next()', { silent = true }) 130 | 131 | -- vim: foldmethod=marker:sw=2:foldlevel=10 132 | -------------------------------------------------------------------------------- /config/nvim/lua/plugins/nvim-navic.lua: -------------------------------------------------------------------------------- 1 | local navic = require("nvim-navic") 2 | 3 | navic.setup{ 4 | lsp = { 5 | auto_attach = true, 6 | preference = nil, 7 | }, 8 | separator = "  ", 9 | } 10 | -------------------------------------------------------------------------------- /config/nvim/lua/plugins/nvim-treesitter.lua: -------------------------------------------------------------------------------- 1 | 2 | --[[ require'nvim-treesitter.configs'.setup { 3 | -- A list of parser names, or "all" (the five listed parsers should always be installed) 4 | ensure_installed = { 5 | --[[ "c", 6 | "lua", 7 | "vim", 8 | "vimdoc", 9 | "go", 10 | "gomod", 11 | "gosum", 12 | "graphql", 13 | "ruby", 14 | "toml", 15 | "json", 16 | "gitcommit", 17 | "tsx", 18 | "jsx", 19 | "tmux", 20 | "sql", 21 | "javascript", 22 | "typescript", 23 | "scss", 24 | "xml", 25 | "norg", 26 | "norg-meta", 27 | "yaml" ]] 28 | }, 29 | 30 | -- Install parsers synchronously (only applied to `ensure_installed`) 31 | sync_install = false, 32 | 33 | -- Automatically install missing parsers when entering buffer 34 | -- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally 35 | auto_install = false, 36 | 37 | ---- If you need to change the installation directory of the parsers (see -> Advanced Setup) 38 | -- parser_install_dir = "/some/path/to/store/parsers", -- Remember to run vim.opt.runtimepath:append("/some/path/to/store/parsers")! 39 | 40 | highlight = { 41 | enable = true, 42 | 43 | -- NOTE: these are the names of the parsers and not the filetype. (for example if you want to 44 | -- disable highlighting for the `tex` filetype, you need to include `latex` in this list as this is 45 | -- the name of the parser) 46 | -- list of language that will be disabled 47 | -- disable = { "c", "rust" }, 48 | -- Or use a function for more flexibility, e.g. to disable slow treesitter highlight for large files 49 | disable = function(lang, buf) 50 | local max_filesize = 100 * 1024 -- 100 KB 51 | local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf)) 52 | if ok and stats and stats.size > max_filesize then 53 | return true 54 | end 55 | end, 56 | 57 | -- Setting this to true will run `:h syntax` and tree-sitter at the same time. 58 | -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation). 59 | -- Using this option may slow down your editor, and you may see some duplicate highlights. 60 | -- Instead of true it can also be a list of languages 61 | additional_vim_regex_highlighting = false, 62 | }, 63 | } ]] 64 | -------------------------------------------------------------------------------- /config/nvim/lua/plugins/nvim-ufo.lua: -------------------------------------------------------------------------------- 1 | require("ufo").setup({ 2 | provider_selector = function() 3 | return { "treesitter", "indent" } 4 | end, 5 | }) 6 | -------------------------------------------------------------------------------- /config/nvim/lua/plugins/nvimux.lua: -------------------------------------------------------------------------------- 1 | local nvimux = require('nvimux') 2 | 3 | -- Nvimux configuration 4 | nvimux.config.set_all{ 5 | prefix = '', 6 | new_window = 'term', -- Use 'term' if you want to open a new term for every new window 7 | new_tab = nil, -- Defaults to new_window. Set to 'term' if you want a new term for every new tab 8 | new_window_buffer = 'single', 9 | quickterm_direction = 'botright', 10 | quickterm_orientation = 'vertical', 11 | quickterm_scope = 't', -- Use 'g' for global quickterm 12 | quickterm_size = '80', 13 | } 14 | 15 | -- Nvimux custom bindings 16 | nvimux.bindings.bind_all{ 17 | {'"', ':NvimuxHorizontalSplit', {'n', 'v', 'i', 't'}}, 18 | {'%', ':NvimuxVerticalSplit', {'n', 'v', 'i', 't'}}, 19 | } 20 | 21 | -- Required so nvimux sets the mappings correctly 22 | nvimux.bootstrap() 23 | -------------------------------------------------------------------------------- /config/nvim/lua/plugins/oil-nvim.lua: -------------------------------------------------------------------------------- 1 | 2 | require("oil").setup() 3 | 4 | vim.keymap.set("n", "-", "Oil", { desc = "Open parent directory" }) 5 | -------------------------------------------------------------------------------- /config/nvim/lua/plugins/telescope.lua: -------------------------------------------------------------------------------- 1 | -- Telescope requires 2 | local builtin = require('telescope.builtin') 3 | local actions = require('telescope.actions') 4 | local action_state = require('telescope.actions.state') 5 | 6 | require('telescope').setup{ 7 | pickers = { 8 | -- FIXME: This picker is somehow not recognized so we hardcoded it in the keybinding which is suboptimal 9 | marks = { 10 | layout_config = { height = 30, width = 100 }, 11 | }, 12 | projects = { 13 | layout_config = { height = 30, width = 100 }, 14 | }, 15 | git_files = { 16 | layout_config = { height = 30, width = 100 }, 17 | }, 18 | find_files = { 19 | layout_config = { height = 30, width = 100 }, 20 | }, 21 | buffers = { 22 | layout_config = { height = 30, width = 100 }, 23 | }, 24 | live_grep = { 25 | layout_config = { height = 30, width = 200 }, 26 | preview = { hide_on_startup = false }, 27 | debounce = 100 28 | } 29 | }, 30 | defaults = { 31 | preview = { 32 | hide_on_startup = true -- hide previewer when picker starts 33 | }, 34 | mappings = { 35 | i = { 36 | -- close in insert mode 37 | [''] = actions.close, 38 | [""] = actions.toggle_selection + actions.move_selection_next, 39 | [""] = actions.toggle_selection + actions.move_selection_previous, 40 | [""] = actions.toggle_all, 41 | [""] = actions.send_selected_to_loclist + actions.open_loclist, 42 | [""] = actions.send_selected_to_qflist + actions.open_qflist 43 | }, 44 | n = { 45 | [""] = actions.toggle_selection + actions.move_selection_next, 46 | [""] = actions.toggle_selection + actions.move_selection_previous, 47 | [""] = actions.toggle_all, 48 | [""] = actions.send_selected_to_loclist + actions.open_loclist, 49 | [""] = actions.send_selected_to_qflist + actions.open_qflist 50 | } 51 | }, 52 | selection_caret = '❯ ', 53 | entry_prefix = ' ', 54 | initial_mode = 'insert', 55 | selection_strategy = 'reset', 56 | sorting_strategy = 'descending', 57 | }, 58 | extensions = { 59 | ["zf-native"] = { 60 | -- options for sorting file-like items 61 | file = { 62 | -- override default telescope file sorter 63 | enable = true, 64 | 65 | -- highlight matching text in results 66 | highlight_results = true, 67 | 68 | -- enable zf filename match priority 69 | match_filename = true, 70 | 71 | -- optional function to define a sort order when the query is empty 72 | initial_sort = nil, 73 | 74 | -- set to false to enable case sensitive matching 75 | smart_case = true, 76 | }, 77 | 78 | -- options for sorting all other items 79 | generic = { 80 | -- override default telescope generic item sorter 81 | enable = true, 82 | 83 | -- highlight matching text in results 84 | highlight_results = true, 85 | 86 | -- disable zf filename match priority 87 | match_filename = false, 88 | 89 | -- optional function to define a sort order when the query is empty 90 | initial_sort = nil, 91 | 92 | -- set to false to enable case sensitive matching 93 | smart_case = true, 94 | }, 95 | } 96 | } 97 | } 98 | 99 | -- Files bindings {{{ 100 | -- Open general Telescope picker 101 | vim.keymap.set('n', 'm', "lua require('telescope.builtin').marks()", { 102 | noremap = true, 103 | silent = true, 104 | desc = 'List marks' 105 | }) 106 | 107 | -- Open general Telescope picker 108 | vim.keymap.set('n', 'tl', "Telescope", { 109 | noremap = true, 110 | silent = true, 111 | desc = 'Open Telescope' 112 | }) 113 | 114 | -- Find files in the current project (similar to FZF's project_files) 115 | vim.keymap.set('n', 'pf', "lua require('telescope.builtin').git_files()", { 116 | noremap = true, 117 | silent = true, 118 | desc = 'Project files' 119 | }) 120 | 121 | -- Live grep in the project 122 | vim.keymap.set('n', 'p/', "lua require('telescope.builtin').live_grep()", { 123 | noremap = true, 124 | silent = true, 125 | desc = 'Grep project' 126 | }) 127 | 128 | -- Find files using the file browser 129 | vim.keymap.set('n', 'ff', "lua require('telescope.builtin').find_files()", { 130 | noremap = true, 131 | silent = true, 132 | desc = 'Find files' 133 | }) 134 | -- }}} 135 | 136 | -- Buffer bindings {{{ 137 | -- List open buffers 138 | vim.keymap.set('n', 'bb', "lua require('telescope.builtin').buffers()", { 139 | noremap = true, 140 | silent = true, 141 | desc = 'List buffers' 142 | }) 143 | vim.keymap.set('n', 'gb', "lua require('telescope.builtin').buffers()", { 144 | noremap = true, 145 | silent = true, 146 | desc = 'List buffers' 147 | }) 148 | -- }}} 149 | 150 | -- Git bindings {{{ 151 | -- List files changed in current branch 152 | vim.keymap.set('n', 'gF', "lua require('telescope.builtin').git_files()", { 153 | noremap = true, 154 | silent = true, 155 | desc = 'Git files' 156 | }) 157 | 158 | -- List git diffs for current file 159 | vim.keymap.set('n', 'gf', "lua require('telescope.builtin').git_status()", { 160 | noremap = true, 161 | silent = true, 162 | desc = 'Git status' 163 | }) 164 | -- }}} 165 | 166 | -- Load Telescope extensions 167 | require('telescope').load_extension('zf-native') 168 | -------------------------------------------------------------------------------- /config/nvim/lua/plugins/testing.lua: -------------------------------------------------------------------------------- 1 | 2 | require("neotest").setup({ 3 | adapters = { 4 | require("neotest-rspec")({ 5 | -- Optionally your function can take a position_type which is one of: 6 | -- - "file" 7 | -- - "test" 8 | -- - "dir" 9 | rspec_cmd = function(position_type) 10 | if position_type == "test" then 11 | return vim.tbl_flatten({ 12 | "docker-compose", 13 | "exec", 14 | "-T", -- Use non-interactive mode 15 | "-e", "RAILS_ENV=test", -- Set the environment variable 16 | "core-specs", -- Service name in docker-compose 17 | "rspec", 18 | "--fail-fast" 19 | }) 20 | else 21 | return vim.tbl_flatten({ 22 | "docker-compose", 23 | "exec", 24 | "-T", -- Use non-interactive mode 25 | "-e", "RAILS_ENV=test", -- Set the environment variable 26 | "core-specs", -- Service name in docker-compose 27 | "rspec" 28 | }) 29 | end 30 | end, 31 | 32 | transform_spec_path = function(path) 33 | -- Adjust the spec path transformation as needed 34 | local prefix = require('neotest-rspec').root(path) 35 | return string.sub(path, string.len(prefix) + 2, -1) 36 | end, 37 | 38 | results_path = "tmp/rspec.output" -- Path to store results 39 | }), 40 | require("neotest-jest"), 41 | } 42 | }) 43 | -------------------------------------------------------------------------------- /config/nvim/lua/plugins/vim-bbye.lua: -------------------------------------------------------------------------------- 1 | local map = vim.keymap.set 2 | 3 | map('n', 'wc', ':q', { desc = 'Close window' }) 4 | map('n', 'bd', ':Bdelete', { desc = 'Delete buffer' }) 5 | 6 | map('n', 'tC', ':tabnew', { desc = 'New tab' }) 7 | map('n', 'tc', ':tabclose', { desc = 'Close tab' }) 8 | map('n', 'tp', ':tabprevious', { desc = 'Previous tab' }) 9 | map('n', 'tn', ':tabnext', { desc = 'Next tab' }) 10 | 11 | -- Delete all hidden buffers 12 | map('n', 'bo', ':DeleteHiddenBuffers', { noremap = true, silent = true, desc = 'Delete hidden buffers' }) 13 | 14 | -- Delete all buffers, but keep windows open 15 | map('n', 'bw', ':bufdo :Bdelete', { noremap = true, silent = true, desc = 'Wipe all buffers' }) 16 | -------------------------------------------------------------------------------- /config/nvim/lua/plugins/vim-maximizer.lua: -------------------------------------------------------------------------------- 1 | local map = vim.keymap.set 2 | 3 | vim.g.maximizer_set_default_mapping = 0 4 | vim.g.maximizer_restore_on_winleave = 1 5 | 6 | map('n', 'wz', ':MaximizerToggle', { silent = true, desc = 'Toggle window maximizer' }) 7 | -------------------------------------------------------------------------------- /config/nvim/lua/plugins/vim-rooter.lua: -------------------------------------------------------------------------------- 1 | vim.g.rooter_silent_chdir = 1 2 | vim.g.rooter_patterns = {'.git', '_darcs', '.hg', '.bzr', '.svn', 'Makefile'} 3 | -------------------------------------------------------------------------------- /config/nvim/lua/plugins/vim-signify.lua: -------------------------------------------------------------------------------- 1 | vim.g.signify_vcs_list = { 'git' } 2 | vim.g.signify_sign_add = '+' 3 | vim.g.signify_sign_delete = '_' 4 | vim.g.signify_sign_delete_first_line = '‾' 5 | vim.g.signify_sign_change = '!' 6 | vim.g.signify_sign_changedelete = vim.g.signify_sign_change 7 | vim.g.signify_update_on_bufenter = 0 8 | vim.g.signify_update_on_focusgained = 1 9 | -------------------------------------------------------------------------------- /config/nvim/lua/util.lua: -------------------------------------------------------------------------------- 1 | --- NVIM SPECIFIC SHORTCUTS 2 | local vim = vim or {} 3 | local api = vim.api 4 | local fn = vim.fn 5 | 6 | local Util = {} 7 | 8 | Util.nvim_command = api.nvim_command 9 | Util.nvim_call_function = api.nvim_call_function 10 | 11 | -- Check if a file or directory exists in this path 12 | function Util.exists(path) 13 | return io.open(path, "r") and true or false 14 | end 15 | 16 | -- create directory if it doesn't exist yet 17 | function Util.mkdir(path) 18 | if Util.exists(path) then return false end 19 | return vim.fn.mkdir(path, 'p') == 1 20 | end 21 | 22 | function Util.getPath(str) 23 | local s = str:gsub("%-","") 24 | return s:match("(.*[/\\])") 25 | end 26 | 27 | function Util.noop() --[[ do nothing ]] end 28 | 29 | -- Slice table as this is not included in lua 5.1 30 | function Util.tbl_slice(tbl, start_idx, end_idx) 31 | local slice = {} 32 | end_idx = end_idx or #tbl 33 | 34 | for idx=start_idx, end_idx do 35 | table.insert(slice, tbl[idx]) 36 | end 37 | 38 | return slice 39 | end 40 | 41 | -- Show confirm dialog before executing predicate 42 | function Util.confirm(options, msg) 43 | local defaults = { Yes = Util.noop, No = Util.noop } 44 | msg = msg or 'Are you sure ?' 45 | options = options or defaults 46 | 47 | local option_tbl = {} 48 | local callback_tbl = {} 49 | 50 | for option, callback in pairs(options) do 51 | table.insert(option_tbl, '&'..option) 52 | table.insert(callback_tbl, callback) 53 | end 54 | 55 | local option_str = table.concat(option_tbl, '\n') 56 | 57 | local choice = vim.fn.confirm(msg, option_str) 58 | local choice_func = callback_tbl[choice] 59 | 60 | if choice and choice_func and type(choice_func) == 'function' then 61 | choice_func() 62 | end 63 | end 64 | 65 | -- Check if the current directory is a git repo 66 | function Util.ensure_git() 67 | if os.execute("git rev-parse --is-inside-work-tree 2>/dev/null") ~= 0 then 68 | error("Not a git repository") 69 | end 70 | end 71 | 72 | 73 | -- Define a function to get the highlighting group under the cursor 74 | function get_highlight_group() 75 | local cursor_pos = vim.api.nvim_win_get_cursor(0) 76 | local row, col = cursor_pos[1], cursor_pos[2] 77 | 78 | local synID = vim.fn.synID(row, col, 1) 79 | local name = vim.fn.synIDattr(synID, "name") 80 | local fg = vim.fn.synIDattr(synID, "fg") 81 | local fgGui = vim.fn.synIDattr(synID, "fg#") 82 | local bg = vim.fn.synIDattr(synID, "bg") 83 | local bgGui = vim.fn.synIDattr(synID, "bg#") 84 | 85 | print(vim.inspect(name)) 86 | print(vim.inspect(fg)) 87 | print(vim.inspect(bg)) 88 | print(vim.inspect(fgGui)) 89 | print(vim.inspect(bgGui)) 90 | end 91 | 92 | -- Bind this function to a command or keymap if desired 93 | vim.cmd("command! HighlightGroup lua get_highlight_group()") 94 | 95 | return Util 96 | -------------------------------------------------------------------------------- /config/nvim/rocks.toml: -------------------------------------------------------------------------------- 1 | # ROCKS: List of non-Neovim rocks. 2 | # This includes things like `toml` or other lua packages. 3 | [rocks] # {{{ 4 | # }}} 5 | 6 | # PLUGINS: List of Neovim plugins to install alongside their versions. 7 | # If the plugin name contains a dot then you must add quotes to the key name! 8 | [plugins] # {{{ 9 | "rocks.nvim" = "2.44.0" 10 | "rocks-config.nvim" = "3.1.0" 11 | "rocks-git.nvim" = "2.5.3" 12 | "rocks-lazy.nvim" = "scm" 13 | "rocks-treesitter.nvim" = "1.3.0" 14 | 15 | "plenary.nvim" = "scm" 16 | "telescope-zf-native.nvim" = "1.0.0" 17 | "telescope.nvim" = "scm" 18 | neorg-telescope = "1.2.2" 19 | 20 | nvim-lspconfig = "2.1.0" 21 | 22 | "oil.nvim" = "2.15.0" 23 | "unimpaired.nvim" = "0.4.0" 24 | "guess-indent.nvim" = "scm" 25 | nvim-web-devicons = "0.100" 26 | "nvim-colorizer.lua" = "scm" 27 | nvim-surround = "3.1.1" 28 | promise-async = "scm" 29 | nvim-ufo = "1.5.0" 30 | 31 | "diffview.nvim" = "scm" 32 | neogit = "2.0.0" 33 | neotest = "5.8.0" 34 | neotest-jest = "scm" 35 | neotest-rspec = "scm" 36 | cmp-nvim-lsp = "scm" 37 | cmp-cmdline = "scm" 38 | nvim-cmp = "scm" 39 | cmp-path = "scm" 40 | cmp-buffer = "scm" 41 | neorg = "9.3.0" 42 | tree-sitter-toml = "scm" 43 | tree-sitter-lua = "scm" 44 | tree-sitter-ruby = "scm" 45 | tree-sitter-yaml = "scm" 46 | tree-sitter-markdown = "scm" 47 | tree-sitter-json = "scm" 48 | tree-sitter-vimdoc = "scm" 49 | tree-sitter-tsx = "scm" 50 | nvim-treesitter-legacy-api = "0.9.2" 51 | tree-sitter-typescript = "scm" 52 | tree-sitter-javascript = "scm" 53 | tree-sitter-ecma = "scm" 54 | tree-sitter-jsx = "scm" 55 | tree-sitter-vim = "scm" 56 | tree-sitter-graphql = "scm" 57 | tree-sitter-scss = "scm" 58 | tree-sitter-embedded_template = "scm" 59 | tree-sitter-norg = "0.2.6" 60 | tree-sitter-sql = "scm" 61 | "headlines.nvim" = "scm" 62 | tree-sitter-python = "scm" 63 | tree-sitter-css = "scm" 64 | tree-sitter-bash = "scm" 65 | tree-sitter-gitcommit = "scm" 66 | tree-sitter-xml = "scm" 67 | tree-sitter-regex = "scm" 68 | tree-sitter-markdown_inline = "scm" 69 | tree-sitter-swift = "0.0.53" 70 | tree-sitter-git_config = "0.0.30" 71 | 72 | [plugins."CopilotChat.nvim" ] 73 | git = "CopilotC-Nvim/CopilotChat.nvim" 74 | rev = "v3.11.1" 75 | 76 | 77 | [plugins."tailwind-tools.nvim" ] 78 | git = "luckasRanarison/tailwind-tools.nvim" 79 | rev = "v0.3.2" 80 | 81 | [plugins."lspkind.nvim" ] 82 | git = "onsails/lspkind.nvim" 83 | rev = "cff4ae321a91ee3473a92ea1a8c637e3a9510aec" 84 | 85 | [plugins."blame.nvim" ] 86 | git = "FabijanZulj/blame.nvim" 87 | rev = "dedbcdce857f708c63f261287ac7491a893912d0" 88 | 89 | [plugins."fileline.nvim" ] 90 | git = "lewis6991/fileline.nvim" 91 | rev = "c116aa8dd7aa7e1db6938f872285e598dc9ee00b" 92 | 93 | [plugins."modus-themes.nvim" ] 94 | git = "miikanissi/modus-themes.nvim" 95 | rev = "v1.4.0" 96 | 97 | [plugins."vim-bbye" ] 98 | git = "moll/vim-bbye" 99 | rev = "v1.0.1" 100 | 101 | [plugins."vim-visualstar" ] 102 | git = "thinca/vim-visualstar" 103 | rev = "v0.5.0" 104 | 105 | [plugins."kommentary" ] 106 | git = "b3nj5m1n/kommentary" 107 | rev = "v1.0" 108 | 109 | [plugins."vim-exchange" ] 110 | git = "tommcdo/vim-exchange" 111 | rev = "d6c1e9790bcb8df27c483a37167459bbebe0112e" 112 | 113 | [plugins."todo-comments.nvim" ] 114 | git = "folke/todo-comments.nvim" 115 | rev = "v1.4.0" 116 | 117 | [plugins."claude-code.nvim" ] 118 | git = "greggh/claude-code.nvim" 119 | rev = "v0.4.3" 120 | 121 | # BUNDLES: bundles allow for a single plugins/x.lua file per bundle instead of per plugin 122 | # {{{ 123 | 124 | [bundles.neorg] 125 | items = [ 126 | "neorg", 127 | # "neorg-contexts" 128 | ] 129 | 130 | [bundles.git] 131 | items = [ 132 | "neogit", 133 | "diffview.nvim", 134 | ] 135 | 136 | [bundles.telescope] 137 | items = [ 138 | "neorg-telescope", 139 | "telescope-zf-native.nvim", 140 | "telescope.nvim" 141 | ] 142 | 143 | [bundles.testing] 144 | items = [ 145 | "neotest", 146 | "neotest-jest", 147 | "neotest-rspec" 148 | ] 149 | 150 | [bundles.autocomplete] 151 | items = [ 152 | "nvim-cmp", 153 | "cmp-path", 154 | "cmp-buffer", 155 | "cmp-cmdline", 156 | "cmp-nvim-lsp", 157 | "lspkind.nvim" 158 | ] 159 | # }}} 160 | 161 | [config] # {{{ 162 | plugins_dir = "plugins/" 163 | auto_setup = true 164 | # }}} 165 | 166 | [treesitter] # {{{ 167 | auto_highlight = "all" 168 | auto_install = "false" # prompt | true | false 169 | 170 | [treesitter.parser_map] 171 | typescriptreact = "tsx" 172 | # }}} 173 | 174 | # vim: foldmethod=marker:sw=2:foldlevel=10 175 | -------------------------------------------------------------------------------- /config/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 = True 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 = False 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 | # eg: prompt = '\x1b[35m\u@\x1b[32m\h:\x1b[36m\d>' 131 | prompt = '\u@\h:\d> ' 132 | 133 | # Number of lines to reserve for the suggestion menu 134 | min_num_menu_lines = 4 135 | 136 | # Character used to left pad multi-line queries to match the prompt size. 137 | multiline_continuation_char = '' 138 | 139 | # The string used in place of a null value. 140 | null_string = '' 141 | 142 | # manage pager on startup 143 | enable_pager = True 144 | 145 | # Use keyring to automatically save and load password in a secure manner 146 | keyring = True 147 | 148 | # Custom colors for the completion menu, toolbar, etc. 149 | [colors] 150 | completion-menu.completion.current = 'bg:#ffffff #000000' 151 | completion-menu.completion = 'bg:#008888 #ffffff' 152 | completion-menu.meta.completion.current = 'bg:#44aaaa #000000' 153 | completion-menu.meta.completion = 'bg:#448888 #ffffff' 154 | completion-menu.multi-column-meta = 'bg:#aaffff #000000' 155 | scrollbar.arrow = 'bg:#003333' 156 | scrollbar = 'bg:#00aaaa' 157 | selected = '#ffffff bg:#6666aa' 158 | search = '#ffffff bg:#4444aa' 159 | search.current = '#ffffff bg:#44aa44' 160 | bottom-toolbar = 'bg:#222222 #aaaaaa' 161 | bottom-toolbar.off = 'bg:#222222 #888888' 162 | bottom-toolbar.on = 'bg:#222222 #ffffff' 163 | search-toolbar = 'noinherit bold' 164 | search-toolbar.text = 'nobold' 165 | system-toolbar = 'noinherit bold' 166 | arg-toolbar = 'noinherit bold' 167 | arg-toolbar.text = 'nobold' 168 | bottom-toolbar.transaction.valid = 'bg:#222222 #00ff5f bold' 169 | bottom-toolbar.transaction.failed = 'bg:#222222 #ff005f bold' 170 | 171 | # style classes for colored table output 172 | output.header = "#00ff5f bold" 173 | output.odd-row = "" 174 | output.even-row = "" 175 | 176 | # Named queries are queries you can execute by name. 177 | [named queries] 178 | 179 | # DSN to call by -D option 180 | [alias_dsn] 181 | # example_dsn = postgresql://[user[:password]@][netloc][:port][/dbname] 182 | 183 | # Format for number representation 184 | # for decimal "d" - 12345678, ",d" - 12,345,678 185 | # for float "g" - 123456.78, ",g" - 123,456.78 186 | [data_formats] 187 | decimal = "" 188 | float = "" 189 | -------------------------------------------------------------------------------- /config/ranger/rc.conf: -------------------------------------------------------------------------------- 1 | # =================================================================== 2 | # This file contains the default startup commands for ranger. 3 | # To change them, it is recommended to create the file 4 | # ~/.config/ranger/rc.conf and add your custom commands there. 5 | # 6 | # If you copy this whole file there, you may want to set the environment 7 | # variable RANGER_LOAD_DEFAULT_RC to FALSE to avoid loading it twice. 8 | # 9 | # The purpose of this file is mainly to define keybindings and settings. 10 | # For running more complex python code, please create a plugin in "plugins/" or 11 | # a command in "commands.py". 12 | # 13 | # Each line is a command that will be run before the user interface 14 | # is initialized. As a result, you can not use commands which rely 15 | # on the UI such as :delete or :mark. 16 | # =================================================================== 17 | 18 | # =================================================================== 19 | # == Options 20 | # =================================================================== 21 | 22 | # Which viewmode should be used? Possible values are: 23 | # miller: Use miller columns which show multiple levels of the hierarchy 24 | # multipane: Midnight-commander like multipane view showing all tabs next 25 | # to each other 26 | set viewmode miller 27 | #set viewmode multipane 28 | 29 | # How many columns are there, and what are their relative widths? 30 | set column_ratios 1,3,4 31 | 32 | # Which files should be hidden? (regular expression) 33 | set hidden_filter ^\.|\.(?:pyc|pyo|bak|swp)$|^lost\+found$|^__(py)?cache__$ 34 | 35 | # Show hidden files? You can toggle this by typing 'zh' 36 | set show_hidden true 37 | 38 | # Ask for a confirmation when running the "delete" command? 39 | # Valid values are "always", "never", "multiple" (default) 40 | # With "multiple", ranger will ask only if you delete multiple files at once. 41 | set confirm_on_delete multiple 42 | 43 | # Use non-default path for file preview script? 44 | # ranger ships with scope.sh, a script that calls external programs (see 45 | # README.md for dependencies) to preview images, archives, etc. 46 | #set preview_script ~/.config/ranger/scope.sh 47 | 48 | # Use the external preview script or display simple plain text or image previews? 49 | set use_preview_script true 50 | 51 | # Automatically count files in the directory, even before entering them? 52 | set automatically_count_files true 53 | 54 | # Open all images in this directory when running certain image viewers 55 | # like feh or sxiv? You can still open selected files by marking them. 56 | set open_all_images true 57 | 58 | # Be aware of version control systems and display information. 59 | set vcs_aware false 60 | 61 | # State of the four backends git, hg, bzr, svn. The possible states are 62 | # disabled, local (only show local info), enabled (show local and remote 63 | # information). 64 | set vcs_backend_git enabled 65 | set vcs_backend_hg disabled 66 | set vcs_backend_bzr disabled 67 | set vcs_backend_svn disabled 68 | 69 | # Use one of the supported image preview protocols 70 | set preview_images false 71 | 72 | # Set the preview image method. Supported methods: 73 | set preview_images_method w3m 74 | 75 | # Use a unicode "..." character to mark cut-off filenames? 76 | set unicode_ellipsis false 77 | 78 | # Show dotfiles in the bookmark preview box? 79 | set show_hidden_bookmarks true 80 | 81 | # Which colorscheme to use? These colorschemes are available by default: 82 | # default, jungle, snow, solarized, ls_colors 83 | set colorscheme snow 84 | 85 | # Preview files on the rightmost column? 86 | # And collapse (shrink) the last column if there is nothing to preview? 87 | set preview_files true 88 | set preview_directories true 89 | set collapse_preview true 90 | 91 | # Save the console history on exit? 92 | set save_console_history true 93 | 94 | # Draw the status bar on top of the browser window (default: bottom) 95 | set status_bar_on_top false 96 | 97 | # Draw a progress bar in the status bar which displays the average state of all 98 | # currently running tasks which support progress bars? 99 | set draw_progress_bar_in_status_bar true 100 | 101 | # Draw borders around columns? 102 | set draw_borders false 103 | 104 | # Display the directory name in tabs? 105 | set dirname_in_tabs false 106 | 107 | # Enable the mouse support? 108 | set mouse_enabled true 109 | 110 | # Display the file size in the main column or status bar? 111 | set display_size_in_main_column true 112 | set display_size_in_status_bar true 113 | 114 | # Display files tags in all columns or only in main column? 115 | set display_tags_in_all_columns true 116 | 117 | # Set a title for the window? 118 | set update_title false 119 | 120 | # Set the title to "ranger" in the tmux program? 121 | set update_tmux_title false 122 | 123 | # Shorten the title if it gets long? The number defines how many 124 | # directories are displayed at once, 0 turns off this feature. 125 | set shorten_title 3 126 | 127 | # Show hostname in titlebar? 128 | set hostname_in_titlebar true 129 | 130 | # Abbreviate $HOME with ~ in the titlebar (first line) of ranger? 131 | set tilde_in_titlebar false 132 | 133 | # How many directory-changes or console-commands should be kept in history? 134 | set max_history_size 20 135 | set max_console_history_size 50 136 | 137 | # Try to keep so much space between the top/bottom border when scrolling: 138 | set scroll_offset 8 139 | 140 | # Flush the input after each key hit? (Noticeable when ranger lags) 141 | set flushinput true 142 | 143 | # Padding on the right when there's no preview? 144 | # This allows you to click into the space to run the file. 145 | set padding_right true 146 | 147 | # Save bookmarks (used with mX and `X) instantly? 148 | # This helps to synchronize bookmarks between multiple ranger 149 | # instances but leads to *slight* performance loss. 150 | # When false, bookmarks are saved when ranger is exited. 151 | set autosave_bookmarks true 152 | 153 | # Save the "`" bookmark to disk. This can be used to switch to the last 154 | # directory by typing "``". 155 | set save_backtick_bookmark true 156 | 157 | # You can display the "real" cumulative size of directories by using the 158 | # command :get_cumulative_size or typing "dc". The size is expensive to 159 | # calculate and will not be updated automatically. You can choose 160 | # to update it automatically though by turning on this option: 161 | set autoupdate_cumulative_size false 162 | 163 | # Turning this on makes sense for screen readers: 164 | set show_cursor false 165 | 166 | # One of: size, natural, basename, atime, ctime, mtime, type, random 167 | set sort natural 168 | 169 | # Additional sorting options 170 | set sort_reverse false 171 | set sort_case_insensitive true 172 | set sort_directories_first true 173 | set sort_unicode false 174 | 175 | # Enable this if key combinations with the Alt Key don't work for you. 176 | # (Especially on xterm) 177 | set xterm_alt_key false 178 | 179 | # Whether to include bookmarks in cd command 180 | set cd_bookmarks true 181 | 182 | # Changes case sensitivity for the cd command tab completion 183 | set cd_tab_case sensitive 184 | 185 | # Use fuzzy tab completion with the "cd" command. For example, 186 | # ":cd /u/lo/b" expands to ":cd /usr/local/bin". 187 | set cd_tab_fuzzy false 188 | 189 | # Avoid previewing files larger than this size, in bytes. Use a value of 0 to 190 | # disable this feature. 191 | set preview_max_size 0 192 | 193 | # Add the highlighted file to the path in the titlebar 194 | set show_selection_in_titlebar true 195 | 196 | # The delay that ranger idly waits for user input, in milliseconds, with a 197 | # resolution of 100ms. Lower delay reduces lag between directory updates but 198 | # increases CPU load. 199 | set idle_delay 2000 200 | 201 | # When the metadata manager module looks for metadata, should it only look for 202 | # a ".metadata.json" file in the current directory, or do a deep search and 203 | # check all directories above the current one as well? 204 | set metadata_deep_search false 205 | 206 | # Clear all existing filters when leaving a directory 207 | set clear_filters_on_dir_change false 208 | 209 | # Disable displaying line numbers in main column 210 | set line_numbers false 211 | 212 | # Start line numbers from 1 instead of 0 213 | set one_indexed false 214 | 215 | # Save tabs on exit 216 | set save_tabs_on_exit false 217 | 218 | # Enable scroll wrapping - moving down while on the last item will wrap around to 219 | # the top and vice versa. 220 | set wrap_scroll false 221 | 222 | # Set the global_inode_type_filter to nothing. Possible options: d, f and l for 223 | # directories, files and symlinks respectively. 224 | set global_inode_type_filter 225 | 226 | # =================================================================== 227 | # == Local Options 228 | # =================================================================== 229 | # You can set local options that only affect a single directory. 230 | 231 | # Examples: 232 | # setlocal path=~/downloads sort mtime 233 | 234 | # =================================================================== 235 | # == Command Aliases in the Console 236 | # =================================================================== 237 | 238 | alias e edit 239 | alias q quit 240 | alias q! quit! 241 | alias qa quitall 242 | alias qa! quitall! 243 | alias qall quitall 244 | alias qall! quitall! 245 | alias setl setlocal 246 | 247 | alias filter scout -prt 248 | alias find scout -aeit 249 | alias mark scout -mr 250 | alias unmark scout -Mr 251 | alias search scout -rs 252 | alias search_inc scout -rts 253 | alias travel scout -aefklst 254 | 255 | # =================================================================== 256 | # == Define keys for the browser 257 | # =================================================================== 258 | 259 | # Basic 260 | map Q quitall 261 | map q quit 262 | copymap q ZZ ZQ 263 | 264 | map R reload_cwd 265 | map F set freeze_files! 266 | map reset 267 | map redraw_window 268 | map abort 269 | map change_mode normal 270 | map ~ set viewmode! 271 | 272 | map i display_file 273 | map ? help 274 | map W display_log 275 | map w taskview_open 276 | map S shell $SHELL 277 | 278 | map : console 279 | map ; console 280 | map ! console shell%space 281 | map @ console -p6 shell %%s 282 | map # console shell -p%space 283 | map s console shell%space 284 | map r chain draw_possible_programs; console open_with%%space 285 | map f console find%space 286 | map cd console cd%space 287 | 288 | # Change the line mode 289 | map Mf linemode filename 290 | map Mi linemode fileinfo 291 | map Mm linemode mtime 292 | map Mp linemode permissions 293 | map Ms linemode sizemtime 294 | map Mt linemode metatitle 295 | 296 | # Tagging / Marking 297 | map t tag_toggle 298 | map ut tag_remove 299 | map " tag_toggle tag=%any 300 | map mark_files toggle=True 301 | map v mark_files all=True toggle=True 302 | map uv mark_files all=True val=False 303 | map V toggle_visual_mode 304 | map uV toggle_visual_mode reverse=True 305 | 306 | # For the nostalgics: Midnight Commander bindings 307 | map help 308 | map rename_append 309 | map display_file 310 | map edit 311 | map copy 312 | map cut 313 | map console mkdir%space 314 | map console delete 315 | map exit 316 | 317 | # In case you work on a keyboard with dvorak layout 318 | map move up=1 319 | map move down=1 320 | map move left=1 321 | map move right=1 322 | map move to=0 323 | map move to=-1 324 | map move down=1 pages=True 325 | map move up=1 pages=True 326 | map move right=1 327 | #map console delete 328 | map console touch%space 329 | 330 | # VIM-like 331 | copymap k 332 | copymap j 333 | copymap h 334 | copymap l 335 | copymap gg 336 | copymap G 337 | copymap 338 | copymap 339 | 340 | map J move down=0.5 pages=True 341 | map K move up=0.5 pages=True 342 | copymap J 343 | copymap K 344 | 345 | # Jumping around 346 | map H history_go -1 347 | map L history_go 1 348 | map ] move_parent 1 349 | map [ move_parent -1 350 | map } traverse 351 | map ) jump_non 352 | 353 | map gh cd ~ 354 | map ge cd /etc 355 | map gu cd /usr 356 | map gd cd /dev 357 | map gl cd -r . 358 | map gL cd -r %f 359 | map go cd /opt 360 | map gv cd /var 361 | map gm cd /media 362 | map gM cd /mnt 363 | map gs cd /srv 364 | map gp cd /tmp 365 | map gr cd / 366 | map gR eval fm.cd(ranger.RANGERDIR) 367 | map g/ cd / 368 | map g? cd /usr/share/doc/ranger 369 | 370 | # External Programs 371 | map E edit 372 | map du shell -p du --max-depth=1 -h --apparent-size 373 | map dU shell -p du --max-depth=1 -h --apparent-size | sort -rh 374 | map yp yank path 375 | map yd yank dir 376 | map yn yank name 377 | 378 | # Filesystem Operations 379 | map = chmod 380 | 381 | map cw console rename%space 382 | map a rename_append 383 | map A eval fm.open_console('rename ' + fm.thisfile.relative_path.replace("%", "%%")) 384 | map I eval fm.open_console('rename ' + fm.thisfile.relative_path.replace("%", "%%"), position=7) 385 | 386 | map pp paste 387 | map po paste overwrite=True 388 | map pP paste append=True 389 | map pO paste overwrite=True append=True 390 | map pl paste_symlink relative=False 391 | map pL paste_symlink relative=True 392 | map phl paste_hardlink 393 | map pht paste_hardlinked_subtree 394 | 395 | map dD console delete 396 | 397 | map dd cut 398 | map ud uncut 399 | map da cut mode=add 400 | map dr cut mode=remove 401 | map dt cut mode=toggle 402 | 403 | map yy copy 404 | map uy uncut 405 | map ya copy mode=add 406 | map yr copy mode=remove 407 | map yt copy mode=toggle 408 | 409 | # Temporary workarounds 410 | map dgg eval fm.cut(dirarg=dict(to=0), narg=quantifier) 411 | map dG eval fm.cut(dirarg=dict(to=-1), narg=quantifier) 412 | map dj eval fm.cut(dirarg=dict(down=1), narg=quantifier) 413 | map dk eval fm.cut(dirarg=dict(up=1), narg=quantifier) 414 | map ygg eval fm.copy(dirarg=dict(to=0), narg=quantifier) 415 | map yG eval fm.copy(dirarg=dict(to=-1), narg=quantifier) 416 | map yj eval fm.copy(dirarg=dict(down=1), narg=quantifier) 417 | map yk eval fm.copy(dirarg=dict(up=1), narg=quantifier) 418 | 419 | # Searching 420 | map / console search%space 421 | map n search_next 422 | map N search_next forward=False 423 | map ct search_next order=tag 424 | map cs search_next order=size 425 | map ci search_next order=mimetype 426 | map cc search_next order=ctime 427 | map cm search_next order=mtime 428 | map ca search_next order=atime 429 | 430 | # Tabs 431 | map tab_new 432 | map tab_close 433 | map tab_move 1 434 | map tab_move -1 435 | map tab_move 1 436 | map tab_move -1 437 | map gt tab_move 1 438 | map gT tab_move -1 439 | map gn tab_new 440 | map gc tab_close 441 | map uq tab_restore 442 | map tab_open 1 443 | map tab_open 2 444 | map tab_open 3 445 | map tab_open 4 446 | map tab_open 5 447 | map tab_open 6 448 | map tab_open 7 449 | map tab_open 8 450 | map tab_open 9 451 | 452 | # Sorting 453 | map or set sort_reverse! 454 | map oz set sort=random 455 | map os chain set sort=size; set sort_reverse=False 456 | map ob chain set sort=basename; set sort_reverse=False 457 | map on chain set sort=natural; set sort_reverse=False 458 | map om chain set sort=mtime; set sort_reverse=False 459 | map oc chain set sort=ctime; set sort_reverse=False 460 | map oa chain set sort=atime; set sort_reverse=False 461 | map ot chain set sort=type; set sort_reverse=False 462 | map oe chain set sort=extension; set sort_reverse=False 463 | 464 | map oS chain set sort=size; set sort_reverse=True 465 | map oB chain set sort=basename; set sort_reverse=True 466 | map oN chain set sort=natural; set sort_reverse=True 467 | map oM chain set sort=mtime; set sort_reverse=True 468 | map oC chain set sort=ctime; set sort_reverse=True 469 | map oA chain set sort=atime; set sort_reverse=True 470 | map oT chain set sort=type; set sort_reverse=True 471 | map oE chain set sort=extension; set sort_reverse=True 472 | 473 | map dc get_cumulative_size 474 | 475 | # Settings 476 | map zc set collapse_preview! 477 | map zd set sort_directories_first! 478 | map zh set show_hidden! 479 | map set show_hidden! 480 | map zI set flushinput! 481 | map zi set preview_images! 482 | map zm set mouse_enabled! 483 | map zp set preview_files! 484 | map zP set preview_directories! 485 | map zs set sort_case_insensitive! 486 | map zu set autoupdate_cumulative_size! 487 | map zv set use_preview_script! 488 | map zf console filter%space 489 | copymap zf zz 490 | 491 | # Bookmarks 492 | map ` enter_bookmark %any 493 | map ' enter_bookmark %any 494 | map m set_bookmark %any 495 | map um unset_bookmark %any 496 | 497 | map m draw_bookmarks 498 | copymap m um ` ' 499 | 500 | # Generate all the chmod bindings with some python help: 501 | eval for arg in "rwxXst": cmd("map +u{0} shell -f chmod u+{0} %s".format(arg)) 502 | eval for arg in "rwxXst": cmd("map +g{0} shell -f chmod g+{0} %s".format(arg)) 503 | eval for arg in "rwxXst": cmd("map +o{0} shell -f chmod o+{0} %s".format(arg)) 504 | eval for arg in "rwxXst": cmd("map +a{0} shell -f chmod a+{0} %s".format(arg)) 505 | eval for arg in "rwxXst": cmd("map +{0} shell -f chmod u+{0} %s".format(arg)) 506 | 507 | eval for arg in "rwxXst": cmd("map -u{0} shell -f chmod u-{0} %s".format(arg)) 508 | eval for arg in "rwxXst": cmd("map -g{0} shell -f chmod g-{0} %s".format(arg)) 509 | eval for arg in "rwxXst": cmd("map -o{0} shell -f chmod o-{0} %s".format(arg)) 510 | eval for arg in "rwxXst": cmd("map -a{0} shell -f chmod a-{0} %s".format(arg)) 511 | eval for arg in "rwxXst": cmd("map -{0} shell -f chmod u-{0} %s".format(arg)) 512 | 513 | # =================================================================== 514 | # == Define keys for the console 515 | # =================================================================== 516 | # Note: Unmapped keys are passed directly to the console. 517 | 518 | # Basic 519 | cmap eval fm.ui.console.tab() 520 | cmap eval fm.ui.console.tab(-1) 521 | cmap eval fm.ui.console.close() 522 | cmap eval fm.ui.console.execute() 523 | cmap redraw_window 524 | 525 | copycmap 526 | copycmap 527 | 528 | # Move around 529 | cmap eval fm.ui.console.history_move(-1) 530 | cmap eval fm.ui.console.history_move(1) 531 | cmap eval fm.ui.console.move(left=1) 532 | cmap eval fm.ui.console.move(right=1) 533 | cmap eval fm.ui.console.move(right=0, absolute=True) 534 | cmap eval fm.ui.console.move(right=-1, absolute=True) 535 | cmap eval fm.ui.console.move_word(left=1) 536 | cmap eval fm.ui.console.move_word(right=1) 537 | 538 | # Line Editing 539 | cmap eval fm.ui.console.delete(-1) 540 | cmap eval fm.ui.console.delete(0) 541 | cmap eval fm.ui.console.delete_word() 542 | cmap eval fm.ui.console.delete_word(backward=False) 543 | cmap eval fm.ui.console.delete_rest(1) 544 | cmap eval fm.ui.console.delete_rest(-1) 545 | cmap eval fm.ui.console.paste() 546 | 547 | # And of course the emacs way 548 | copycmap 549 | copycmap 550 | copycmap 551 | copycmap 552 | copycmap 553 | copycmap 554 | copycmap 555 | copycmap 556 | 557 | # Note: There are multiple ways to express backspaces. (code 263) 558 | # and (code 127). To be sure, use both. 559 | copycmap 560 | 561 | # This special expression allows typing in numerals: 562 | cmap false 563 | 564 | # =================================================================== 565 | # == Pager Keybindings 566 | # =================================================================== 567 | 568 | # Movement 569 | pmap pager_move down=1 570 | pmap pager_move up=1 571 | pmap pager_move left=4 572 | pmap pager_move right=4 573 | pmap pager_move to=0 574 | pmap pager_move to=-1 575 | pmap pager_move down=1.0 pages=True 576 | pmap pager_move up=1.0 pages=True 577 | pmap pager_move down=0.5 pages=True 578 | pmap pager_move up=0.5 pages=True 579 | 580 | copypmap k 581 | copypmap j 582 | copypmap h 583 | copypmap l 584 | copypmap g 585 | copypmap G 586 | copypmap d 587 | copypmap u 588 | copypmap n f 589 | copypmap p b 590 | 591 | # Basic 592 | pmap redraw_window 593 | pmap pager_close 594 | copypmap q Q i 595 | pmap E edit_file 596 | 597 | # =================================================================== 598 | # == Taskview Keybindings 599 | # =================================================================== 600 | 601 | # Movement 602 | tmap taskview_move up=1 603 | tmap taskview_move down=1 604 | tmap taskview_move to=0 605 | tmap taskview_move to=-1 606 | tmap taskview_move down=1.0 pages=True 607 | tmap taskview_move up=1.0 pages=True 608 | tmap taskview_move down=0.5 pages=True 609 | tmap taskview_move up=0.5 pages=True 610 | 611 | copytmap k 612 | copytmap j 613 | copytmap g 614 | copytmap G 615 | copytmap u 616 | copytmap n f 617 | copytmap p b 618 | 619 | # Changing priority and deleting tasks 620 | tmap J eval -q fm.ui.taskview.task_move(-1) 621 | tmap K eval -q fm.ui.taskview.task_move(0) 622 | tmap dd eval -q fm.ui.taskview.task_remove() 623 | tmap eval -q fm.ui.taskview.task_move(-1) 624 | tmap eval -q fm.ui.taskview.task_move(0) 625 | tmap eval -q fm.ui.taskview.task_remove() 626 | 627 | # Basic 628 | tmap redraw_window 629 | tmap taskview_close 630 | copytmap q Q w 631 | 632 | # a plugin that adds file glyphs / icon support to Ranger: 633 | # https://github.com/alexanderjeurissen/ranger_devicons 634 | default_linemode devicons 635 | -------------------------------------------------------------------------------- /config/wezterm/wezterm.lua: -------------------------------------------------------------------------------- 1 | -- Pull in the wezterm API 2 | local wezterm = require 'wezterm' 3 | local config = wezterm.config_builder() 4 | 5 | 6 | -- Define the leader key 7 | local leader = { key = 't', mods = 'CTRL' } 8 | 9 | -- Fix the right status bar 10 | wezterm.on('update-status', function(window) 11 | -- Minimal flat status bar inspired by OpenAI GPT aesthetics 12 | local date = wezterm.strftime('%I:%M %p') 13 | local hostname = wezterm.hostname():match('^[^.]+') 14 | local status = hostname .. ' | ' .. date 15 | 16 | window:set_right_status(wezterm.format({ 17 | { Foreground = { Color = '#ffffff' } }, 18 | { Background = { Color = '#000000' } }, 19 | { Text = ' ' .. status .. ' ' }, 20 | })) 21 | end) 22 | 23 | -- Format the tab title: bold for the active tab and omit the index 24 | wezterm.on('format-tab-title', function(tab) 25 | local title = tab.active_pane.title 26 | if tab.is_active then 27 | return wezterm.format({ 28 | { Attribute = { Intensity = 'Bold' } }, 29 | { Text = ' ' .. title .. ' ' }, 30 | }) 31 | end 32 | return ' ' .. title .. ' ' 33 | end) 34 | 35 | -- Configuration 36 | -- Set the font 37 | config.font = wezterm.font('BlexMono Nerd Font Mono') 38 | 39 | -- Set the font size 40 | config.font_size = 14.0 41 | 42 | -- Set the color scheme 43 | config.color_scheme = "Modus Operandi" 44 | -- config.color_scheme = "Modus Operandi" 45 | 46 | -- Set the window background opacity 47 | config.window_background_opacity = 1.0 48 | 49 | -- Use native full screen mode 50 | config.native_macos_fullscreen_mode = true 51 | 52 | -- Disable the title bar but retain resizable border 53 | config.window_decorations = "RESIZE" 54 | 55 | -- Enable tab bar and configure it 56 | config.enable_tab_bar = true 57 | -- hide_tab_bar_if_only_one_tab = true 58 | config.show_new_tab_button_in_tab_bar = false 59 | config.use_fancy_tab_bar = false 60 | config.tab_bar_at_bottom = false 61 | 62 | -- Don't prompt when closing windows 63 | config.window_close_confirmation = "NeverPrompt" 64 | 65 | -- Automatically reload Configuration 66 | -- automatically_reload_config = false, 67 | 68 | -- Define the leader key 69 | config.leader = leader 70 | 71 | -- Basic keybindings for tmux-like behavior 72 | config.keys = { 73 | -- Split horizontally 74 | { key = '"', mods = 'LEADER|SHIFT', action = wezterm.action { SplitHorizontal = { domain = 'CurrentPaneDomain' } } }, 75 | -- Split vertically 76 | { key = '%', mods = 'LEADER|SHIFT', action = wezterm.action { SplitVertical = { domain = 'CurrentPaneDomain' } } }, 77 | -- New tab 78 | { key = 'c', mods = 'LEADER', action = wezterm.action { SpawnTab = 'CurrentPaneDomain' } }, 79 | -- Close tab 80 | { key = 'x', mods = 'LEADER', action = wezterm.action { CloseCurrentTab = { confirm = true } } }, 81 | -- Navigate between panes 82 | { key = 'h', mods = 'LEADER', action = wezterm.action { ActivatePaneDirection = 'Left' } }, 83 | { key = 'j', mods = 'LEADER', action = wezterm.action { ActivatePaneDirection = 'Down' } }, 84 | { key = 'k', mods = 'LEADER', action = wezterm.action { ActivatePaneDirection = 'Up' } }, 85 | { key = 'l', mods = 'LEADER', action = wezterm.action { ActivatePaneDirection = 'Right' } }, 86 | -- Navigate between tabs 87 | { key = 'n', mods = 'LEADER', action = wezterm.action { ActivateTabRelative = 1 } }, 88 | { key = 'p', mods = 'LEADER', action = wezterm.action { ActivateTabRelative = -1 } }, 89 | -- Copy and paste 90 | { key = 'v', mods = 'CTRL|SHIFT', action = wezterm.action { PasteFrom = 'Clipboard' } }, 91 | { key = 'c', mods = 'CTRL|SHIFT', action = wezterm.action { CopyTo = 'Clipboard' } }, 92 | -- Zoom pane 93 | { key = 'z', mods = 'LEADER', action = wezterm.action.TogglePaneZoomState }, 94 | -- Toggle full screen 95 | { key = 'f', mods = 'CMD|CTRL', action = wezterm.action.ToggleFullScreen }, 96 | 97 | -- Enter Copy Mode (mimicking tmux visual mode) 98 | { key = 'v', mods = 'LEADER', action = wezterm.action.ActivateCopyMode }, 99 | } 100 | 101 | -- Scrollback lines 102 | config.scrollback_lines = 3500 103 | 104 | -- Enable ligatures 105 | config.harfbuzz_features = { "calt=1", "clig=1", "liga=1" } 106 | 107 | config.window_padding = { 108 | left = 4, 109 | right = 4, 110 | top = 0, 111 | bottom = 0, 112 | } 113 | 114 | return config 115 | -------------------------------------------------------------------------------- /config/zed/keymap.json: -------------------------------------------------------------------------------- 1 | // Zed keymap 2 | // 3 | // For information on binding keys, see the Zed 4 | // documentation: https://zed.dev/docs/key-bindings 5 | // 6 | // To see the default key bindings run `zed: open default keymap` 7 | // from the command palette. 8 | [ 9 | { 10 | "context": "Workspace", 11 | "bindings": { 12 | "cmd-k": "command_palette::Toggle", 13 | "cmd-b": "workspace::ToggleBottomDock", 14 | "cmd-r": "workspace::ToggleRightDock", 15 | "cmd-l": "workspace::ToggleLeftDock" 16 | } 17 | }, 18 | { 19 | "context": "Terminal", 20 | "bindings": { 21 | "ctrl-w z": "workspace::ToggleZoom", 22 | "ctrl-w k": "terminal_panel::ToggleFocus", 23 | "cmd-t": "workspace::NewTerminal" 24 | } 25 | }, 26 | { 27 | // Only applies when using Vim keybindings, and while you're in Vim control mode (not insert mode or waiting for input) 28 | "context": "Editor && VimControl && !VimWaiting && !VimInsert && !menu", 29 | "bindings": { 30 | "H": "pane::ActivateNextItem", 31 | "L": "pane::ActivatePreviousItem", 32 | // Add a keybinding for this 33 | // This allows spawning the nearest task, like running a spec using a keybinding 34 | "s t": ["editor::SpawnNearestTask", { "reveal": "no_focus" }], 35 | "g b": "tab_switcher::Toggle", 36 | 37 | // Necessary to prevent the default binding from being triggered 38 | "cmd-l": "workspace::ToggleLeftDock", 39 | "space =": "editor::Format", 40 | 41 | "ctrl-w z": "workspace::ToggleZoom", 42 | "ctrl-w w": "workspace::ActivatePreviousPane", 43 | "ctrl-w c": "pane::JoinIntoNext", 44 | "ctrl-w o": "pane::JoinAll", 45 | "ctrl-w O": "workspace::CloseInactiveTabsAndPanes" 46 | } 47 | } 48 | ] 49 | -------------------------------------------------------------------------------- /config/zed/settings.json: -------------------------------------------------------------------------------- 1 | // Zed settings 2 | // 3 | // For information on how to configure Zed, see the Zed 4 | // documentation: https://zed.dev/docs/configuring-zed 5 | // 6 | // To see all of Zed's default settings without changing your 7 | // custom settings, run `zed: open default settings` from the 8 | // command palette 9 | { 10 | "features": { 11 | "edit_prediction_provider": "copilot" 12 | }, 13 | "language_models": { 14 | "bedrock": { 15 | "profile": "default", 16 | "authentication_method": "sso", 17 | "endpoint_url": "https://d-926766230a.awsapps.com/start#", 18 | "region": "us-west-2" 19 | } 20 | }, 21 | "assistant": { 22 | "default_profile": "write", 23 | "always_allow_tool_actions": true, 24 | "profiles": { 25 | "h-1": { 26 | "name": "h1", 27 | "tools": {}, 28 | "enable_all_context_servers": false, 29 | "context_servers": {} 30 | }, 31 | "write": { 32 | "name": "Write", 33 | "tools": { 34 | "contents": true, 35 | "rename": true, 36 | "code_actions": true, 37 | "create_directory": true, 38 | "terminal": true, 39 | "batch_tool": true, 40 | "code_symbols": true, 41 | "copy_path": true, 42 | "create_file": true, 43 | "delete_path": true, 44 | "diagnostics": true, 45 | "edit_file": true, 46 | "fetch": true, 47 | "list_directory": true, 48 | "move_path": true, 49 | "now": true, 50 | "find_path": true, 51 | "read_file": true, 52 | "grep": true, 53 | "symbol_info": true, 54 | "thinking": true, 55 | "open": true 56 | }, 57 | "enable_all_context_servers": true, 58 | "context_servers": { 59 | "mcp-atlassian": { 60 | "tools": { 61 | "jira_add_comment": false, 62 | "jira_add_worklog": false, 63 | "jira_batch_create_issues": false, 64 | "jira_create_issue": false, 65 | "jira_create_issue_link": false, 66 | "jira_delete_issue": false, 67 | "jira_download_attachments": false, 68 | "jira_get_agile_boards": false, 69 | "jira_get_board_issues": false, 70 | "jira_get_epic_issues": false, 71 | "jira_get_issue": false, 72 | "jira_get_project_issues": false, 73 | "jira_get_sprint_issues": false, 74 | "jira_get_sprints_from_board": false, 75 | "jira_get_transitions": false, 76 | "jira_get_worklog": false, 77 | "jira_link_to_epic": false, 78 | "jira_search": false, 79 | "jira_remove_issue_link": false, 80 | "jira_search_fields": false, 81 | "jira_transition_issue": false, 82 | "jira_update_issue": false, 83 | "jira_update_sprint": false, 84 | "confluence_update_page": true, 85 | "confluence_search": true, 86 | "confluence_get_page_children": true, 87 | "confluence_get_page_ancestors": true, 88 | "confluence_get_page": true, 89 | "confluence_get_comments": true, 90 | "confluence_delete_page": false, 91 | "confluence_create_page": true 92 | } 93 | }, 94 | "mcp-server-sequential-thinking": { 95 | "tools": { 96 | "sequentialthinking": true 97 | } 98 | }, 99 | "postgres-context-server": { 100 | "tools": { 101 | "query": true, 102 | "pg-schema": true 103 | } 104 | }, 105 | "hackerone-dev-context-server": { 106 | "tools": { 107 | "issue": false, 108 | "merge-request": false 109 | } 110 | }, 111 | "mcp-server-git": { 112 | "tools": { 113 | "git_show": true, 114 | "git_diff_unstaged": true, 115 | "git_diff_staged": true, 116 | "git_create_branch": true, 117 | "git_status": true, 118 | "git_diff": true, 119 | "git_commit": true, 120 | "git_checkout": true, 121 | "git_add": true 122 | } 123 | } 124 | } 125 | } 126 | }, 127 | "default_model": { 128 | "provider": "zed.dev", 129 | "model": "claude-3-7-sonnet-latest" 130 | }, 131 | "version": "2", 132 | "enable_experimental_live_diffs": true 133 | }, 134 | "tab_bar": { 135 | "show_icons": false, 136 | "show_tab_bar_buttons": false, 137 | "show": true, 138 | "show_nav_history_buttons": false, 139 | "beta": true 140 | }, 141 | "terminal": { 142 | "dock": "bottom", 143 | "font_family": "BlexMono Nerd Font Mono" 144 | }, 145 | "vim_mode": true, 146 | "ui_font_size": 14, 147 | "buffer_font_size": 14.0, 148 | "theme": { 149 | "mode": "system", 150 | "light": "One Light", 151 | "dark": "One Dark" 152 | }, 153 | "double_click_in_multibuffer": "open", 154 | "use_autoclose": false, 155 | "tabs": { "file_icons": true }, 156 | "calls": { 157 | // Join calls with the microphone live by default 158 | "mute_on_join": true, 159 | // Share your project when you are the first to join a channel 160 | "share_on_join": false 161 | }, 162 | "active_pane_modifiers": { 163 | // "inactive_opacity": 0.6, 164 | // "active_opacity": 1.0 165 | // "magnification": 1.5 166 | }, 167 | "languages": { 168 | "Ruby": { 169 | // We enable rubocop because pull-based diagnostics within ruby-lsp are not supported yet in zed 170 | // "language_servers": ["ruby-lsp", "!solargraph", "rubocop"], 171 | "language_servers": ["ruby-lsp", "!solargraph", "rubocop"], 172 | "formatter": "auto" 173 | }, 174 | "TSX": { 175 | "code_actions_on_format": {} 176 | }, 177 | "JavaScript": { 178 | "code_actions_on_format": { 179 | "source.organizeImports": true 180 | } 181 | } 182 | }, 183 | "file_scan_exclusions": [ 184 | "**/.git", 185 | "**/.svn", 186 | "**/.hg", 187 | "**/CVS", 188 | "**/.DS_Store", 189 | "**/Thumbs.db", 190 | "**/.classpath", 191 | "**/.settings", 192 | "**/mimic/reports.json", 193 | "**/build/static", 194 | "**/node_modules" 195 | ], 196 | "lsp": { 197 | "ruby-lsp": { 198 | "initialization_options": { 199 | "enabledFeatures": { 200 | "codeActions": true, 201 | "codeLens": true, 202 | "completion": true, 203 | "definition": true, 204 | // "diagnostics": true, // pull based Diagnostics not supported yet in Zed 205 | "diagnostics": false, // pull based Diagnostics not supported yet in Zed 206 | "documentHighlights": true, 207 | "documentLink": true, 208 | "documentSymbols": true, 209 | "foldingRanges": true, 210 | "formatting": true, 211 | "hover": true, 212 | "inlayHint": true, 213 | "onTypeFormatting": true, 214 | "selectionRanges": true, 215 | "semanticHighlighting": true, 216 | "signatureHelp": true, 217 | "typeHierarchy": true, 218 | "workspaceSymbol": true 219 | }, 220 | "formatter": "auto", 221 | "linters": ["rubocop", "standard"] 222 | } 223 | } 224 | } 225 | } 226 | -------------------------------------------------------------------------------- /config/zed/tasks.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "label": "Run bin/restart core-frontend", 4 | "command": "bin/restart", 5 | "args": ["core-frontend"], 6 | "use_new_terminal": true, 7 | "allow_concurrent_runs": false, 8 | "reveal": "always", 9 | "hide": "on_success" 10 | }, 11 | { 12 | "label": "Open All Staged Files", 13 | "command": "git", 14 | "args": ["diff --cached --name-only | xargs -n 1 zed"], 15 | "reveal": "never", 16 | "hide": "always" 17 | }, 18 | { 19 | "label": "Open all feature branch files", 20 | "command": "git", 21 | "args": [ 22 | "diff $(git merge-base HEAD origin/develop) HEAD --name-only| xargs -n 1 zed" 23 | ], 24 | "reveal": "never", 25 | "hide": "always" 26 | }, 27 | { 28 | "label": "Open all files with merge conflicts", 29 | "command": "git", 30 | "args": ["diff --name-only --diff-filter=U | xargs -n 1 zed"], 31 | "reveal": "never", 32 | "hide": "always" 33 | }, 34 | { 35 | "label": "Run bin/start", 36 | "command": "bin/start", 37 | "use_new_terminal": true, 38 | "allow_concurrent_runs": false, 39 | "reveal": "never", 40 | "hide": "always", 41 | "pin": true 42 | }, 43 | { 44 | "label": "rspec $ZED_RELATIVE_FILE:$ZED_ROW", 45 | "command": "docker", 46 | "args": [ 47 | "compose", 48 | "exec", 49 | "core-specs", 50 | "bin/rspec", 51 | "\"$ZED_RELATIVE_FILE:$ZED_ROW\"" 52 | ], 53 | "tags": ["ruby-test"] 54 | }, 55 | { 56 | "label": "vitest $ZED_RELATIVE_FILE", 57 | "command": "docker", 58 | "args": [ 59 | "compose", 60 | "exec", 61 | "core-frontend", 62 | "yarn", 63 | "test", 64 | "\"$(echo $ZED_RELATIVE_FILE | sed 's|^frontend/||')\"" 65 | ], 66 | "tags": ["js-test", "ts-test", "tsx-test", "jsx-test"] 67 | } 68 | ] 69 | -------------------------------------------------------------------------------- /dircolors/dircolors.ansi-dark: -------------------------------------------------------------------------------- 1 | # Exact Solarized Dark color theme for the color GNU ls utility. 2 | # Designed for dircolors (GNU coreutils) 5.97 3 | # 4 | # This simple theme was simultaneously designed for these terminal color schemes: 5 | # - Solarized dark (best) 6 | # - Solarized light 7 | # - default dark 8 | # - default light 9 | # with a slight optimization for Solarized Dark. 10 | # 11 | # How the colors were selected: 12 | # - Terminal emulators often have an option typically enabled by default that makes 13 | # bold a different color. It is important to leave this option enabled so that 14 | # you can access the entire 16-color Solarized palette, and not just 8 colors. 15 | # - We favor universality over a greater number of colors. So we limit the number 16 | # of colors so that this theme will work out of the box in all terminals, 17 | # Solarized or not, dark or light. 18 | # - We choose to have the following category of files: 19 | # NORMAL & FILE, DIR, LINK, EXEC and 20 | # editable text including source, unimportant text, binary docs & multimedia source 21 | # files, viewable multimedia, archived/compressed, and unimportant non-text 22 | # - For uniqueness, we stay away from the Solarized foreground colors are -- either 23 | # base00 (brightyellow) or base0 (brightblue). However, they can be used if 24 | # you know what the bg/fg colors of your terminal are, in order to optimize the display. 25 | # - 3 different options are provided: universal, solarized dark, and solarized light. 26 | # The only difference between the universal scheme and one that's optimized for 27 | # dark/light is the color of "unimportant" files, which should blend more with the 28 | # background 29 | # - We note that blue is the hardest color to see on dark bg and yellow is the hardest 30 | # color to see on light bg (with blue being particularly bad). So we choose yellow 31 | # for multimedia files which are usually accessed in a GUI folder browser anyway. 32 | # And blue is kept for custom use of this scheme's user. 33 | # - See table below to see the assignments. 34 | 35 | 36 | # Installation instructions: 37 | # This file goes in the /etc directory, and must be world readable. 38 | # You can copy this file to .dir_colors in your $HOME directory to override 39 | # the system defaults. 40 | 41 | # COLOR needs one of these arguments: 'tty' colorizes output to ttys, but not 42 | # pipes. 'all' adds color characters to all output. 'none' shuts colorization 43 | # off. 44 | COLOR tty 45 | 46 | # Below, there should be one TERM entry for each termtype that is colorizable 47 | TERM ansi 48 | TERM color_xterm 49 | TERM color-xterm 50 | TERM con132x25 51 | TERM con132x30 52 | TERM con132x43 53 | TERM con132x60 54 | TERM con80x25 55 | TERM con80x28 56 | TERM con80x30 57 | TERM con80x43 58 | TERM con80x50 59 | TERM con80x60 60 | TERM cons25 61 | TERM console 62 | TERM cygwin 63 | TERM dtterm 64 | TERM dvtm 65 | TERM dvtm-256color 66 | TERM Eterm 67 | TERM eterm-color 68 | TERM fbterm 69 | TERM gnome 70 | TERM gnome-256color 71 | TERM jfbterm 72 | TERM konsole 73 | TERM konsole-256color 74 | TERM kterm 75 | TERM linux 76 | TERM linux-c 77 | TERM mach-color 78 | TERM mlterm 79 | TERM nxterm 80 | TERM putty 81 | TERM putty-256color 82 | TERM rxvt 83 | TERM rxvt-256color 84 | TERM rxvt-cygwin 85 | TERM rxvt-cygwin-native 86 | TERM rxvt-unicode 87 | TERM rxvt-unicode256 88 | TERM rxvt-unicode-256color 89 | TERM screen 90 | TERM screen-16color 91 | TERM screen-16color-bce 92 | TERM screen-16color-s 93 | TERM screen-16color-bce-s 94 | TERM screen-256color 95 | TERM screen-256color-bce 96 | TERM screen-256color-s 97 | TERM screen-256color-bce-s 98 | TERM screen-256color-italic 99 | TERM screen-bce 100 | TERM screen-w 101 | TERM screen.linux 102 | TERM screen.xterm-256color 103 | TERM screen.xterm-new 104 | TERM st 105 | TERM st-meta 106 | TERM st-256color 107 | TERM st-meta-256color 108 | TERM tmux 109 | TERM tmux-256color 110 | TERM vt100 111 | TERM xterm 112 | TERM xterm-new 113 | TERM xterm-16color 114 | TERM xterm-256color 115 | TERM xterm-256color-italic 116 | TERM xterm-88color 117 | TERM xterm-color 118 | TERM xterm-debian 119 | TERM xterm-termite 120 | 121 | # EIGHTBIT, followed by '1' for on, '0' for off. (8-bit output) 122 | EIGHTBIT 1 123 | 124 | ############################################################################# 125 | # Below are the color init strings for the basic file types. A color init 126 | # string consists of one or more of the following numeric codes: 127 | # 128 | # Attribute codes: 129 | # 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed 130 | # Text color codes: 131 | # 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white 132 | # Background color codes: 133 | # 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white 134 | # 135 | # NOTES: 136 | # - See http://www.oreilly.com/catalog/wdnut/excerpt/color_names.html 137 | # - Color combinations 138 | # ANSI Color code Solarized Notes Universal SolDark SolLight 139 | # ~~~~~~~~~~~~~~~ ~~~~~~~~~ ~~~~~ ~~~~~~~~~ ~~~~~~~ ~~~~~~~~ 140 | # 00 none NORMAL, FILE 141 | # 30 black base02 142 | # 01;30 bright black base03 bg of SolDark 143 | # 31 red red docs & mm src 144 | # 01;31 bright red orange EXEC 145 | # 32 green green editable text 146 | # 01;32 bright green base01 unimportant text 147 | # 33 yellow yellow unclear in light bg multimedia 148 | # 01;33 bright yellow base00 fg of SolLight unimportant non-text 149 | # 34 blue blue unclear in dark bg user customized 150 | # 01;34 bright blue base0 fg in SolDark unimportant text 151 | # 35 magenta magenta LINK 152 | # 01;35 bright magenta violet archive/compressed 153 | # 36 cyan cyan DIR 154 | # 01;36 bright cyan base1 unimportant non-text 155 | # 37 white base2 156 | # 01;37 bright white base3 bg in SolLight 157 | # 05;37;41 unclear in Putty dark 158 | 159 | 160 | ### By file type 161 | 162 | # global default 163 | NORMAL 00 164 | # normal file 165 | FILE 00 166 | # directory 167 | DIR 34 168 | # 777 directory 169 | OTHER_WRITABLE 34;40 170 | # symbolic link 171 | LINK 35 172 | 173 | # pipe, socket, block device, character device (blue bg) 174 | FIFO 30;44 175 | SOCK 35;44 176 | DOOR 35;44 # Solaris 2.5 and later 177 | BLK 33;44 178 | CHR 37;44 179 | 180 | 181 | ############################################################################# 182 | ### By file attributes 183 | 184 | # Orphaned symlinks (blinking white on red) 185 | # Blink may or may not work (works on iTerm dark or light, and Putty dark) 186 | ORPHAN 05;37;41 187 | # ... and the files that orphaned symlinks point to (blinking white on red) 188 | MISSING 05;37;41 189 | 190 | # files with execute permission 191 | EXEC 01;31 # Unix 192 | .cmd 01;31 # Win 193 | .exe 01;31 # Win 194 | .com 01;31 # Win 195 | .bat 01;31 # Win 196 | .reg 01;31 # Win 197 | .app 01;31 # OSX 198 | 199 | ############################################################################# 200 | ### By extension 201 | 202 | # List any file extensions like '.gz' or '.tar' that you would like ls 203 | # to colorize below. Put the extension, a space, and the color init string. 204 | # (and any comments you want to add after a '#') 205 | 206 | ### Text formats 207 | 208 | # Text that we can edit with a regular editor 209 | .txt 32 210 | .org 32 211 | .md 32 212 | .mkd 32 213 | 214 | # Source text 215 | .h 32 216 | .hpp 32 217 | .c 32 218 | .C 32 219 | .cc 32 220 | .cpp 32 221 | .cxx 32 222 | .objc 32 223 | .cl 32 224 | .sh 32 225 | .bash 32 226 | .csh 32 227 | .zsh 32 228 | .el 32 229 | .vim 32 230 | .java 32 231 | .pl 32 232 | .pm 32 233 | .py 32 234 | .rb 32 235 | .hs 32 236 | .php 32 237 | .htm 32 238 | .html 32 239 | .shtml 32 240 | .erb 32 241 | .haml 32 242 | .xml 32 243 | .rdf 32 244 | .css 32 245 | .sass 32 246 | .scss 32 247 | .less 32 248 | .js 32 249 | .coffee 32 250 | .man 32 251 | .0 32 252 | .1 32 253 | .2 32 254 | .3 32 255 | .4 32 256 | .5 32 257 | .6 32 258 | .7 32 259 | .8 32 260 | .9 32 261 | .l 32 262 | .n 32 263 | .p 32 264 | .pod 32 265 | .tex 32 266 | .go 32 267 | .sql 32 268 | .csv 32 269 | .sv 32 270 | .svh 32 271 | .v 32 272 | .vh 32 273 | .vhd 32 274 | 275 | ### Multimedia formats 276 | 277 | # Image 278 | .bmp 33 279 | .cgm 33 280 | .dl 33 281 | .dvi 33 282 | .emf 33 283 | .eps 33 284 | .gif 33 285 | .jpeg 33 286 | .jpg 33 287 | .JPG 33 288 | .mng 33 289 | .pbm 33 290 | .pcx 33 291 | .pdf 33 292 | .pgm 33 293 | .png 33 294 | .PNG 33 295 | .ppm 33 296 | .pps 33 297 | .ppsx 33 298 | .ps 33 299 | .svg 33 300 | .svgz 33 301 | .tga 33 302 | .tif 33 303 | .tiff 33 304 | .xbm 33 305 | .xcf 33 306 | .xpm 33 307 | .xwd 33 308 | .xwd 33 309 | .yuv 33 310 | .nef 33 # Nikon RAW format 311 | .NEF 33 312 | 313 | # Audio 314 | .aac 33 315 | .au 33 316 | .flac 33 317 | .m4a 33 318 | .mid 33 319 | .midi 33 320 | .mka 33 321 | .mp3 33 322 | .mpa 33 323 | .mpeg 33 324 | .mpg 33 325 | .ogg 33 326 | .opus 33 327 | .ra 33 328 | .wav 33 329 | 330 | # Video 331 | .anx 33 332 | .asf 33 333 | .avi 33 334 | .axv 33 335 | .flc 33 336 | .fli 33 337 | .flv 33 338 | .gl 33 339 | .m2v 33 340 | .m4v 33 341 | .mkv 33 342 | .mov 33 343 | .MOV 33 344 | .mp4 33 345 | .mp4v 33 346 | .mpeg 33 347 | .mpg 33 348 | .nuv 33 349 | .ogm 33 350 | .ogv 33 351 | .ogx 33 352 | .qt 33 353 | .rm 33 354 | .rmvb 33 355 | .swf 33 356 | .vob 33 357 | .webm 33 358 | .wmv 33 359 | 360 | ### Misc 361 | 362 | # Binary document formats and multimedia source 363 | .doc 31 364 | .docx 31 365 | .rtf 31 366 | .odt 31 367 | .dot 31 368 | .dotx 31 369 | .ott 31 370 | .xls 31 371 | .xlsx 31 372 | .ods 31 373 | .ots 31 374 | .ppt 31 375 | .pptx 31 376 | .odp 31 377 | .otp 31 378 | .fla 31 379 | .psd 31 380 | 381 | # Archives, compressed 382 | .7z 1;35 383 | .apk 1;35 384 | .arj 1;35 385 | .bin 1;35 386 | .bz 1;35 387 | .bz2 1;35 388 | .cab 1;35 # Win 389 | .deb 1;35 390 | .dmg 1;35 # OSX 391 | .gem 1;35 392 | .gz 1;35 393 | .iso 1;35 394 | .jar 1;35 395 | .msi 1;35 # Win 396 | .rar 1;35 397 | .rpm 1;35 398 | .tar 1;35 399 | .tbz 1;35 400 | .tbz2 1;35 401 | .tgz 1;35 402 | .tx 1;35 403 | .war 1;35 404 | .xpi 1;35 405 | .xz 1;35 406 | .z 1;35 407 | .Z 1;35 408 | .zip 1;35 409 | .zst 1;35 410 | 411 | # For testing 412 | .ANSI-30-black 30 413 | .ANSI-01;30-brblack 01;30 414 | .ANSI-31-red 31 415 | .ANSI-01;31-brred 01;31 416 | .ANSI-32-green 32 417 | .ANSI-01;32-brgreen 01;32 418 | .ANSI-33-yellow 33 419 | .ANSI-01;33-bryellow 01;33 420 | .ANSI-34-blue 34 421 | .ANSI-01;34-brblue 01;34 422 | .ANSI-35-magenta 35 423 | .ANSI-01;35-brmagenta 01;35 424 | .ANSI-36-cyan 36 425 | .ANSI-01;36-brcyan 01;36 426 | .ANSI-37-white 37 427 | .ANSI-01;37-brwhite 01;37 428 | 429 | ############################################################################# 430 | # Your customizations 431 | 432 | # Unimportant text files 433 | # For universal scheme, use brightgreen 01;32 434 | # For optimal on light bg (but too prominent on dark bg), use white 01;34 435 | .log 01;32 436 | *~ 01;32 437 | *# 01;32 438 | #.log 01;34 439 | #*~ 01;34 440 | #*# 01;34 441 | 442 | # Unimportant non-text files 443 | # For universal scheme, use brightcyan 01;36 444 | # For optimal on dark bg (but too prominent on light bg), change to 01;33 445 | #.bak 01;36 446 | #.BAK 01;36 447 | #.old 01;36 448 | #.OLD 01;36 449 | #.org_archive 01;36 450 | #.off 01;36 451 | #.OFF 01;36 452 | #.dist 01;36 453 | #.DIST 01;36 454 | #.orig 01;36 455 | #.ORIG 01;36 456 | #.swp 01;36 457 | #.swo 01;36 458 | #*.v 01;36 459 | .bak 01;33 460 | .BAK 01;33 461 | .old 01;33 462 | .OLD 01;33 463 | .org_archive 01;33 464 | .off 01;33 465 | .OFF 01;33 466 | .dist 01;33 467 | .DIST 01;33 468 | .orig 01;33 469 | .ORIG 01;33 470 | .swp 01;33 471 | .swo 01;33 472 | *.v 01;33 473 | 474 | # The brightmagenta (Solarized: purple) color is free for you to use for your 475 | # custom file type 476 | .gpg 34 477 | .gpg 34 478 | .pgp 34 479 | .asc 34 480 | .3des 34 481 | .aes 34 482 | .enc 34 483 | .sqlite 34 484 | -------------------------------------------------------------------------------- /dircolors/dircolors.bw: -------------------------------------------------------------------------------- 1 | # Black and white theme for the color GNU ls utility. 2 | # Derived from the ansi-dark theme with no color codes. 3 | # 4 | # This simple theme was designed to work with a variety of terminal color schemes 5 | # including both dark and light backgrounds. 6 | # 7 | # How the colors were selected: 8 | # - Terminal emulators often have an option typically enabled by default that makes 9 | # bold a different color. It is important to leave this option enabled so that 10 | # you can access the entire 16-color palette, and not just 8 colors. 11 | # - We favor universality over a greater number of colors. So we limit the number 12 | # of colors so that this theme will work out of the box in all terminals, 13 | # regardless of whether the terminal is dark or light. 14 | # - We choose to have the following category of files: 15 | # NORMAL & FILE, DIR, LINK, EXEC and 16 | # editable text including source, unimportant text, binary docs & multimedia source 17 | # files, viewable multimedia, archived/compressed, and unimportant non-text 18 | # - 3 different options are provided for dark and light terminals. 19 | # The only difference between them is how "unimportant" files blend with the 20 | # background 21 | # - We note that blue is the hardest color to see on dark bg and yellow is the hardest 22 | # color to see on light bg (with blue being particularly bad). So we choose yellow 23 | # for multimedia files which are usually accessed in a GUI folder browser anyway. 24 | # And blue is kept for custom use of this scheme's user. 25 | # - See table below to see the assignments. 26 | 27 | 28 | # Installation instructions: 29 | # This file goes in the /etc directory, and must be world readable. 30 | # You can copy this file to .dir_colors in your $HOME directory to override 31 | # the system defaults. 32 | 33 | # COLOR needs one of these arguments: 'tty' colorizes output to ttys, but not 34 | # pipes. 'all' adds color characters to all output. 'none' shuts colorization 35 | # off. 36 | COLOR tty 37 | 38 | # Below, there should be one TERM entry for each termtype that is colorizable 39 | TERM ansi 40 | TERM color_xterm 41 | TERM color-xterm 42 | TERM con132x25 43 | TERM con132x30 44 | TERM con132x43 45 | TERM con132x60 46 | TERM con80x25 47 | TERM con80x28 48 | TERM con80x30 49 | TERM con80x43 50 | TERM con80x50 51 | TERM con80x60 52 | TERM cons25 53 | TERM console 54 | TERM cygwin 55 | TERM dtterm 56 | TERM dvtm 57 | TERM dvtm-256color 58 | TERM Eterm 59 | TERM eterm-color 60 | TERM fbterm 61 | TERM gnome 62 | TERM gnome-256color 63 | TERM jfbterm 64 | TERM konsole 65 | TERM konsole-256color 66 | TERM kterm 67 | TERM linux 68 | TERM linux-c 69 | TERM mach-color 70 | TERM mlterm 71 | TERM nxterm 72 | TERM putty 73 | TERM putty-256color 74 | TERM rxvt 75 | TERM rxvt-256color 76 | TERM rxvt-cygwin 77 | TERM rxvt-cygwin-native 78 | TERM rxvt-unicode 79 | TERM rxvt-unicode256 80 | TERM rxvt-unicode-256color 81 | TERM screen 82 | TERM screen-16color 83 | TERM screen-16color-bce 84 | TERM screen-16color-s 85 | TERM screen-16color-bce-s 86 | TERM screen-256color 87 | TERM screen-256color-bce 88 | TERM screen-256color-s 89 | TERM screen-256color-bce-s 90 | TERM screen-256color-italic 91 | TERM screen-bce 92 | TERM screen-w 93 | TERM screen.linux 94 | TERM screen.xterm-256color 95 | TERM screen.xterm-new 96 | TERM st 97 | TERM st-meta 98 | TERM st-256color 99 | TERM st-meta-256color 100 | TERM tmux 101 | TERM tmux-256color 102 | TERM vt100 103 | TERM xterm 104 | TERM xterm-new 105 | TERM xterm-16color 106 | TERM xterm-256color 107 | TERM xterm-256color-italic 108 | TERM xterm-88color 109 | TERM xterm-color 110 | TERM xterm-debian 111 | TERM xterm-termite 112 | 113 | # EIGHTBIT, followed by '1' for on, '0' for off. (8-bit output) 114 | EIGHTBIT 1 115 | 116 | ############################################################################# 117 | # Below are the color init strings for the basic file types. A color init 118 | # string consists of one or more of the following numeric codes: 119 | # 120 | # Attribute codes: 121 | # 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed 122 | # Text color codes: 123 | # 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white 124 | # Background color codes: 125 | # 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white 126 | # 127 | # NOTES: 128 | # - See http://www.oreilly.com/catalog/wdnut/excerpt/color_names.html 129 | 130 | 131 | ### By file type 132 | 133 | # global default 134 | NORMAL 00 135 | # normal file 136 | FILE 00 137 | # directory 138 | DIR 01 139 | # 777 directory 140 | OTHER_WRITABLE 01 141 | # symbolic link 142 | LINK 04 143 | 144 | # pipe, socket, block device, character device (blue bg) 145 | FIFO 04 146 | SOCK 04 147 | DOOR 04 # Solaris 2.5 and later 148 | BLK 04 149 | CHR 04 150 | 151 | 152 | ############################################################################# 153 | ### By file attributes 154 | 155 | # Orphaned symlinks (blinking white on red) 156 | # Blink may or may not work (works on iTerm dark or light, and Putty dark) 157 | ORPHAN 05 158 | # ... and the files that orphaned symlinks point to (blinking white on red) 159 | MISSING 05 160 | 161 | # files with execute permission 162 | EXEC 01 # Unix 163 | .cmd 01 # Win 164 | .exe 01 # Win 165 | .com 01 # Win 166 | .bat 01 # Win 167 | .reg 01 # Win 168 | .app 01 # OSX 169 | 170 | ############################################################################# 171 | ### By extension 172 | 173 | # List any file extensions like '.gz' or '.tar' that you would like ls 174 | # to colorize below. Put the extension, a space, and the color init string. 175 | # (and any comments you want to add after a '#') 176 | 177 | ### Text formats 178 | 179 | # Text that we can edit with a regular editor 180 | .txt 03 181 | .org 03 182 | .md 03 183 | .mkd 03 184 | 185 | # Source text 186 | .h 03 187 | .hpp 03 188 | .c 03 189 | .C 03 190 | .cc 03 191 | .cpp 03 192 | .cxx 03 193 | .objc 03 194 | .cl 03 195 | .sh 03 196 | .bash 03 197 | .csh 03 198 | .zsh 03 199 | .el 03 200 | .vim 03 201 | .java 03 202 | .pl 03 203 | .pm 03 204 | .py 03 205 | .rb 03 206 | .hs 03 207 | .php 03 208 | .htm 03 209 | .html 03 210 | .shtml 03 211 | .erb 03 212 | .haml 03 213 | .xml 03 214 | .rdf 03 215 | .css 03 216 | .sass 03 217 | .scss 03 218 | .less 03 219 | .js 03 220 | .coffee 03 221 | .man 03 222 | .0 03 223 | .1 03 224 | .2 03 225 | .3 03 226 | .4 03 227 | .5 03 228 | .6 03 229 | .7 03 230 | .8 03 231 | .9 03 232 | .l 00 233 | .n 00 234 | .p 00 235 | .pod 00 236 | .tex 00 237 | .go 00 238 | .sql 00 239 | .csv 00 240 | .sv 00 241 | .svh 00 242 | .v 00 243 | .vh 00 244 | .vhd 00 245 | 246 | ### Multimedia formats 247 | 248 | # Image 249 | .bmp 00 250 | .cgm 00 251 | .dl 00 252 | .dvi 00 253 | .emf 00 254 | .eps 00 255 | .gif 00 256 | .jpeg 00 257 | .jpg 00 258 | .JPG 00 259 | .mng 00 260 | .pbm 00 261 | .pcx 00 262 | .pdf 00 263 | .pgm 00 264 | .png 00 265 | .PNG 00 266 | .ppm 00 267 | .pps 00 268 | .ppsx 00 269 | .ps 00 270 | .svg 00 271 | .svgz 00 272 | .tga 00 273 | .tif 00 274 | .tiff 00 275 | .xbm 00 276 | .xcf 00 277 | .xpm 00 278 | .xwd 00 279 | .xwd 00 280 | .yuv 00 281 | .nef 00 # Nikon RAW format 282 | .NEF 00 283 | 284 | # Audio 285 | .aac 00 286 | .au 00 287 | .flac 00 288 | .m4a 00 289 | .mid 00 290 | .midi 00 291 | .mka 00 292 | .mp3 00 293 | .mpa 00 294 | .mpeg 00 295 | .mpg 00 296 | .ogg 00 297 | .opus 00 298 | .ra 00 299 | .wav 00 300 | 301 | # Video 302 | .anx 00 303 | .asf 00 304 | .avi 00 305 | .axv 00 306 | .flc 00 307 | .fli 00 308 | .flv 00 309 | .gl 00 310 | .m2v 00 311 | .m4v 00 312 | .mkv 00 313 | .mov 00 314 | .MOV 00 315 | .mp4 00 316 | .mp4v 00 317 | .mpeg 00 318 | .mpg 00 319 | .nuv 00 320 | .ogm 00 321 | .ogv 00 322 | .ogx 00 323 | .qt 00 324 | .rm 00 325 | .rmvb 00 326 | .swf 00 327 | .vob 00 328 | .webm 00 329 | .wmv 00 330 | 331 | ### Misc 332 | 333 | # Binary document formats and multimedia source 334 | .doc 00 335 | .docx 00 336 | .rtf 00 337 | .odt 00 338 | .dot 00 339 | .dotx 00 340 | .ott 00 341 | .xls 00 342 | .xlsx 00 343 | .ods 00 344 | .ots 00 345 | .ppt 00 346 | .pptx 00 347 | .odp 00 348 | .otp 00 349 | .fla 00 350 | .psd 00 351 | 352 | # Archives, compressed 353 | .7z 1 354 | .apk 1 355 | .arj 1 356 | .bin 1 357 | .bz 1 358 | .bz2 1 359 | .cab 1 # Win 360 | .deb 1 361 | .dmg 1 # OSX 362 | .gem 1 363 | .gz 1 364 | .iso 1 365 | .jar 1 366 | .msi 1 # Win 367 | .rar 1 368 | .rpm 1 369 | .tar 1 370 | .tbz 1 371 | .tbz2 1 372 | .tgz 1 373 | .tx 1 374 | .war 1 375 | .xpi 1 376 | .xz 1 377 | .z 1 378 | .Z 1 379 | .zip 1 380 | .zst 1 381 | 382 | # For testing 383 | .ANSI-30-black 00 384 | .ANSI-01;30-brblack 01 385 | .ANSI-31-red 00 386 | .ANSI-01;31-brred 01 387 | .ANSI-32-green 00 388 | .ANSI-01;32-brgreen 01 389 | .ANSI-33-yellow 00 390 | .ANSI-01;33-bryellow 01 391 | .ANSI-34-blue 00 392 | .ANSI-01;34-brblue 01 393 | .ANSI-35-magenta 00 394 | .ANSI-01;35-brmagenta 01 395 | .ANSI-36-cyan 00 396 | .ANSI-01;36-brcyan 01 397 | .ANSI-37-white 00 398 | .ANSI-01;37-brwhite 01 399 | 400 | ############################################################################# 401 | # Your customizations 402 | 403 | # Unimportant text files 404 | # Shown in bold so they stand out without using color 405 | .log 01 406 | *~ 01 407 | *# 01 408 | #.log 01;34 409 | #*~ 01;34 410 | #*# 01;34 411 | 412 | # Unimportant non-text files 413 | # Also shown in bold for visibility 414 | #.bak 01;36 415 | #.BAK 01;36 416 | #.old 01;36 417 | #.OLD 01;36 418 | #.org_archive 01;36 419 | #.off 01;36 420 | #.OFF 01;36 421 | #.dist 01;36 422 | #.DIST 01;36 423 | #.orig 01;36 424 | #.ORIG 01;36 425 | #.swp 01;36 426 | #.swo 01;36 427 | #*.v 01;36 428 | .bak 01 429 | .BAK 01 430 | .old 01 431 | .OLD 01 432 | .org_archive 01 433 | .off 01 434 | .OFF 01 435 | .dist 01 436 | .DIST 01 437 | .orig 01 438 | .ORIG 01 439 | .swp 01 440 | .swo 01 441 | *.v 01 442 | 443 | # You may use brightmagenta for any custom file types 444 | .gpg 00 445 | .gpg 00 446 | .pgp 00 447 | .asc 00 448 | .3des 00 449 | .aes 00 450 | .enc 00 451 | .sqlite 00 452 | -------------------------------------------------------------------------------- /editorconfig: -------------------------------------------------------------------------------- 1 | ; .editorconfig 2 | 3 | root = true 4 | 5 | [**.js] 6 | brace_style = collapse, end-expand, expand-strict 7 | break_chained_methods = false 8 | e4x = false 9 | eval_code = false 10 | indent_style = space 11 | indent_level = 0 12 | indent_size = 2 13 | indent_with_tabs = false 14 | ; jslint_happy = true 15 | keep_array_indentation = false 16 | keep_function_indentation = false 17 | max_preserve_newlines = 10 18 | preserve_newlines = true 19 | space_before_conditional = true 20 | space_after_anon_function = false 21 | space_before_anon_function = false 22 | space_in_paren = false 23 | unescape_strings = false 24 | wrap_line_length = 0 25 | 26 | [**.css] 27 | indent_style = space 28 | indent_size = 4 29 | 30 | [**.html] 31 | brace_style = collapse 32 | indent_scripts = keep, normal 33 | indent_style = space 34 | indent_size = 4 35 | max_preserve_newlines = 10 36 | preserve_newlines = true 37 | unformatted = ["a", "sub", "sup", "b", "i", "u"] 38 | wrap_line_length = 0 39 | -------------------------------------------------------------------------------- /editrc: -------------------------------------------------------------------------------- 1 | bind -v 2 | -------------------------------------------------------------------------------- /eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "commonjs": true, 4 | "browser": true 5 | }, 6 | "globals": { 7 | "constants": {}, 8 | "Set": {}, 9 | "Promise": {} 10 | }, 11 | "extends": [ 12 | "eslint:recommended", 13 | "plugin:prettier/recommended", 14 | "prettier", 15 | ], 16 | "settings": { 17 | "propWrapperFunctions": ["forbidExtraProps"] 18 | }, 19 | "parser": "babel-eslint", 20 | "parserOptions": { 21 | "ecmaVersion": 6, 22 | "sourceType": "module", 23 | "ecmaFeatures": { 24 | "jsx": true 25 | } 26 | }, 27 | 28 | "rules": { 29 | "no-useless-escape":"warn", 30 | "no-else-return":"warn", 31 | "spaced-comment":"warn", 32 | "no-useless-concat":"warn", 33 | "no-self-assign":"warn", 34 | "node/no-unpublished-require": "disable", 35 | 36 | "prettier/prettier": 2, 37 | "accessor-pairs": 0, 38 | "block-scoped-var": 0, 39 | "callback-return": 0, 40 | "camelcase": 0, 41 | "complexity": 0, 42 | "consistent-return": 0, 43 | "consistent-this": 0, 44 | "default-case": 2, 45 | "dot-notation": 0, 46 | "eqeqeq": [2, "allow-null"], 47 | "func-names": 0, 48 | "func-style": [ 49 | 2, 50 | "expression", 51 | { 52 | "allowArrowFunctions": true 53 | } 54 | ], 55 | "global-require": 0, 56 | "guard-for-in": 2, 57 | "handle-callback-err": 0, 58 | "id-length": 0, 59 | "id-match": 0, 60 | "init-declarations": 0, 61 | "linebreak-style": [2, "unix"], 62 | "lines-around-comment": 0, 63 | "max-depth": [1, 4], 64 | "max-nested-callbacks": 2, 65 | "max-params": 0, 66 | "max-statements": 0, 67 | "new-cap": [ 68 | 2, 69 | { 70 | "capIsNew": false 71 | } 72 | ], 73 | "newline-after-var": 0, 74 | "no-alert": 0, 75 | "no-array-constructor": 0, 76 | "no-bitwise": 0, 77 | "no-caller": 2, 78 | "no-case-declarations": 2, 79 | "no-catch-shadow": 2, 80 | "no-cond-assign": 2, 81 | "no-console": [ 82 | 2, 83 | { 84 | "allow": ["warn", "error"] 85 | } 86 | ], 87 | "no-constant-condition": 2, 88 | "no-continue": 0, 89 | "no-control-regex": 2, 90 | "no-debugger": 2, 91 | "no-delete-var": 2, 92 | "no-div-regex": 0, 93 | "no-dupe-args": 2, 94 | "no-dupe-keys": 2, 95 | "no-duplicate-case": 2, 96 | "no-empty": 2, 97 | "no-empty-character-class": 2, 98 | "no-empty-pattern": 2, 99 | "no-eq-null": 2, 100 | "no-eval": 2, 101 | "no-ex-assign": 2, 102 | "no-extend-native": 2, 103 | "no-extra-bind": 2, 104 | "no-extra-boolean-cast": 2, 105 | "no-fallthrough": 2, 106 | "no-floating-decimal": 2, 107 | "no-func-assign": 2, 108 | "no-implicit-coercion": [ 109 | 1, 110 | { 111 | "boolean": true, 112 | "number": true, 113 | "string": true 114 | } 115 | ], 116 | "no-implied-eval": 2, 117 | "no-inline-comments": 0, 118 | "no-inner-declarations": [1, "functions"], 119 | "no-invalid-regexp": 2, 120 | "no-invalid-this": 0, 121 | "no-irregular-whitespace": 2, 122 | "no-iterator": 2, 123 | "no-label-var": 2, 124 | "no-labels": 2, 125 | "no-lone-blocks": 2, 126 | "no-lonely-if": 2, 127 | "no-loop-func": 2, 128 | "no-magic-numbers": 0, 129 | "no-mixed-requires": 0, 130 | "no-multi-str": 2, 131 | "no-native-reassign": 2, 132 | "no-negated-condition": 2, 133 | "no-negated-in-lhs": 2, 134 | "no-nested-ternary": 2, 135 | "no-new": 0, 136 | "no-new-func": 2, 137 | "no-new-object": 2, 138 | "no-new-require": 2, 139 | "no-new-wrappers": 2, 140 | "no-obj-calls": 2, 141 | "no-octal": 2, 142 | "no-octal-escape": 2, 143 | "no-param-reassign": 2, 144 | "no-path-concat": 2, 145 | "no-plusplus": 0, 146 | "no-process-env": 0, 147 | "no-process-exit": 0, 148 | "no-proto": 2, 149 | "no-redeclare": 2, 150 | "no-regex-spaces": 2, 151 | "no-restricted-modules": 2, 152 | "no-restricted-syntax": 0, 153 | "no-return-assign": 2, 154 | "no-script-url": 2, 155 | "no-self-compare": 2, 156 | "no-sequences": 2, 157 | "no-shadow": 2, 158 | "no-shadow-restricted-names": 2, 159 | "no-sparse-arrays": 2, 160 | "no-sync": 0, 161 | "no-ternary": 0, 162 | "no-throw-literal": 2, 163 | "no-undef": 2, 164 | "no-undef-init": 0, 165 | "no-undefined": 0, 166 | "no-underscore-dangle": [ 167 | 2, 168 | { 169 | "allowAfterThis": true 170 | } 171 | ], 172 | "no-unexpected-multiline": 2, 173 | "no-unneeded-ternary": 2, 174 | "no-unreachable": 2, 175 | "no-unused-expressions": 0, 176 | "no-unused-vars": 2, 177 | "no-use-before-define": 2, 178 | "no-useless-call": 2, 179 | "no-void": 2, 180 | "no-warning-comments": 0, 181 | "no-with": 2, 182 | "one-var": [1, "never"], 183 | "operator-assignment": [2, "always"], 184 | "radix": [2, "always"], 185 | "require-jsdoc": 0, 186 | "sort-vars": 0, 187 | "strict": 0, 188 | "use-isnan": 2, 189 | "valid-jsdoc": 0, 190 | "valid-typeof": 2, 191 | "vars-on-top": 0, 192 | "yoda": 2 193 | } 194 | } 195 | -------------------------------------------------------------------------------- /gitattributes: -------------------------------------------------------------------------------- 1 | structure.sql merge=merge-structure-sql 2 | -------------------------------------------------------------------------------- /gitconfig: -------------------------------------------------------------------------------- 1 | [alias] 2 | ctags = !.git/hooks/ctags 3 | up = pull --rebase --autostash 4 | 5 | [color] 6 | ui = auto 7 | 8 | [color "status"] 9 | branch = bold default 10 | localBranch = bold default 11 | remoteBranch = bold blue 12 | 13 | [core] 14 | excludesfile = ~/.gitignore 15 | editor = nvim 16 | pager = cat 17 | attributesfile = ~/.gitattributes 18 | 19 | [pager] 20 | difftool = false 21 | diff = false 22 | branch = false 23 | commit = false 24 | 25 | ; [credential] 26 | ; helper = osxkeychain 27 | 28 | [delta] 29 | line-numbers = true 30 | line-numbers-minus-style = "red" 31 | line-numbers-plus-style = "green" 32 | line-numbers-zero-style = "brightred" 33 | file-style = "bold blue" 34 | syntax-theme = "Solarized (dark)" 35 | 36 | [difftool "zed"] 37 | cmd = zed --wait $LOCAL $REMOTE 38 | 39 | [difftool] 40 | prompt = 1 41 | 42 | [filter "lfs"] 43 | clean = git-lfs clean -- %f 44 | smudge = git-lfs smudge -- %f 45 | process = git-lfs filter-process 46 | required = true 47 | 48 | [github] 49 | user = alexanderjeurissen 50 | 51 | [merge] 52 | tool = nvim 53 | conflictstyle = diff3 54 | 55 | [mergetool "nvim"] 56 | cmd = nvim -d -u ~/.config/nvim/init.lua $BASE $REMOTE $LOCAL $MERGED -c '$wincmd w' -c 'wincmd J' -c '$wincmd w' -c 'wincmd k' 57 | 58 | [mergetool "nvr"] 59 | cmd = nvr -cc tabnew -s -d $LOCAL $BASE $REMOTE $MERGED -c 'wincmd J | wincmd =' 60 | 61 | [mergetool] 62 | prompt = 0 63 | 64 | [pull] 65 | rebase = false 66 | 67 | [push] 68 | default = current 69 | autoSetupRemote = true 70 | 71 | [user] 72 | name = Alexander Jeurissen 73 | email = alexander@jeurissen.email 74 | 75 | [gitlab] 76 | user = alexander@hackerone.com 77 | 78 | [color "diff-highlight"] 79 | oldNormal = red bold 80 | oldHighlight = red bold 52 81 | newNormal = green bold 82 | newHighlight = green bold 22 83 | [color "diff"] 84 | meta = bold blue 85 | frag = magenta bold 86 | func = 146 bold 87 | ;commit = blue bold 88 | old = red bold 89 | new = green bold 90 | whitespace = red reverse 91 | [rerere] 92 | autoupdate = true 93 | [http] 94 | sslVerify = false 95 | [init] 96 | defaultBranch = main 97 | -------------------------------------------------------------------------------- /gitignore: -------------------------------------------------------------------------------- 1 | # javascript 2 | node_modules 3 | jspm_packages/ 4 | bower_components 5 | coverage 6 | # dist 7 | .grunt 8 | .tmp 9 | app/bower_components 10 | .tern-project 11 | .lock-wscript 12 | build/Release 13 | .yarn-integrity 14 | 15 | # Compressed files 16 | *.tgz 17 | *.zip 18 | *.tar.gz 19 | 20 | # ruby 21 | # *.ruby-version 22 | .bundle 23 | 24 | #temp json output of yaml translations 25 | app/languages/*.json 26 | 27 | # Webstorm files 28 | .idea/* 29 | 30 | # vim swap files 31 | *.swp 32 | *.swo 33 | swoopBuf 34 | .tern-port 35 | *.orig 36 | 37 | # apple temp files and code unrelated directories 38 | .DS_Store 39 | /Library 40 | ~/Library 41 | 42 | # vim sessions and log files 43 | *.session 44 | logfile.log 45 | 46 | # Intheam config files 47 | *.pem 48 | .intheam/* 49 | 50 | # Visual studio code 51 | .vscode/* 52 | 53 | # Gitlab cli config 54 | ~/.config/gitlab-cli/default.js 55 | 56 | # cache directories 57 | Caches 58 | .CACHES 59 | .cache 60 | .yarn-cache 61 | .sass-cache 62 | .npm 63 | .eslintcache 64 | 65 | # Logs 66 | logs 67 | *.log 68 | npm-debug.log* 69 | yarn-debug.log* 70 | yarn-error.log* 71 | 72 | # Runtime data 73 | pids 74 | *.pid 75 | *.seed 76 | *.pid.lock 77 | 78 | # misc 79 | .byebug_history 80 | bin/pretty 81 | 82 | # dotenv environment variable files 83 | .env* 84 | 85 | # fzf / RG 86 | .git 87 | 88 | # H1 specific 89 | Procfile.local 90 | *.patch 91 | 92 | .stylelintrc 93 | 94 | -------------------------------------------------------------------------------- /gnupg/gpg-agent.conf: -------------------------------------------------------------------------------- 1 | pinentry-program /usr/local/bin/pinentry-mac 2 | # pinentry-program /usr/local/bin/pinentry-tty 3 | default-cache-ttl 600 4 | max-cache-ttl 7200 5 | enable-ssh-support 6 | 7 | -------------------------------------------------------------------------------- /gnupg/gpg.conf: -------------------------------------------------------------------------------- 1 | auto-key-retrieve 2 | 3 | # Use AES256, 192, or 128 as cipher 4 | personal-cipher-preferences AES256 AES192 AES 5 | # Use SHA512, 384, or 256 as digest 6 | personal-digest-preferences SHA512 SHA384 SHA256 7 | # Use ZLIB, BZIP2, ZIP, or no compression 8 | personal-compress-preferences ZLIB BZIP2 ZIP Uncompressed 9 | # Default preferences for new keys 10 | default-preference-list SHA512 SHA384 SHA256 AES256 AES192 AES ZLIB BZIP2 ZIP Uncompressed 11 | # SHA512 as digest to sign keys 12 | cert-digest-algo SHA512 13 | # SHA512 as digest for symmetric ops 14 | s2k-digest-algo SHA512 15 | # AES256 as cipher for symmetric ops 16 | s2k-cipher-algo AES256 17 | # UTF-8 support for compatibility 18 | charset utf-8 19 | # Show Unix timestamps 20 | fixed-list-mode 21 | # No comments in signature 22 | no-comments 23 | # No version in signature 24 | no-emit-version 25 | # Disable banner 26 | no-greeting 27 | # Long hexidecimal key format 28 | keyid-format 0xlong 29 | # Display UID validity 30 | list-options show-uid-validity 31 | verify-options show-uid-validity 32 | # Display all keys and their fingerprints 33 | with-fingerprint 34 | # Display key origins and updates 35 | #with-key-origin 36 | # Cross-certify subkeys are present and valid 37 | require-cross-certification 38 | # Disable caching of passphrase for symmetrical ops 39 | no-symkey-cache 40 | # Enable smartcard 41 | use-agent 42 | # Verbose output 43 | #verbose 44 | # Show expired subkeys 45 | #list-options show-unusable-subkeys 46 | keyserver hkp://keys.gnupg.net 47 | ignore-time-conflict 48 | allow-freeform-uid 49 | -------------------------------------------------------------------------------- /gnupg/scdaemon.conf: -------------------------------------------------------------------------------- 1 | reader-port Yubico Yubi 2 | # debug-all 3 | # debug-level guru 4 | # disable-ccid 5 | # log-file /tmp/scd.log 6 | -------------------------------------------------------------------------------- /inputrc: -------------------------------------------------------------------------------- 1 | set editing-mode vi 2 | set keymap vi 3 | -------------------------------------------------------------------------------- /irbrc: -------------------------------------------------------------------------------- 1 | require "awesome_print" 2 | AwesomePrint.irb! 3 | 4 | def clear 5 | system('clear') 6 | end 7 | -------------------------------------------------------------------------------- /pryrc: -------------------------------------------------------------------------------- 1 | # vim: foldmethod=marker:sw=2:foldlevel=10:ft=ruby 2 | 3 | begin 4 | require 'pastel' 5 | rescue LoadError => err 6 | # Handle the case where the gem is not found 7 | puts "Gem 'pastel' not found! #{err}" 8 | end 9 | 10 | Pry.config.correct_indent = false if ENV['INSIDE_EMACS'] 11 | 12 | # NOTE: Add awesome print as a wrapper for all print operations {{{ 13 | begin 14 | require 'awesome_print' 15 | AwesomePrint.pry! 16 | rescue LoadError => err 17 | puts Pastel.new.black("LoadError: no awesome_print :(") 18 | end 19 | # }}} 20 | 21 | # NOTE: Use neovim as default editor 22 | Pry.editor = 'nvim' 23 | 24 | # NOTE: pry byebug aliases {{{ 25 | Pry.commands.alias_command('c', 'continue') if Pry::Commands["continue"] 26 | Pry.commands.alias_command('s', 'step') if Pry::Commands["step"] 27 | Pry.commands.alias_command('n', 'next') if Pry::Commands["next"] 28 | Pry.commands.alias_command 'e', 'exit' 29 | # }}} 30 | 31 | # NOTE: better colors {{{ 32 | Pry.color = true 33 | Pry.config.color = true 34 | Pry.config.theme = "solarized" 35 | Pry.config.ls.separator = "\n" # new lines between methods 36 | Pry.config.ls.heading_color = :magenta 37 | Pry.config.ls.public_method_color = :green 38 | Pry.config.ls.protected_method_color = :yellow 39 | Pry.config.ls.private_method_color = :bright_black 40 | # }}} 41 | 42 | # NOTE: make clear clear the actual parent terminal {{{ 43 | Pry::Commands.command /^clear$/, "clear console" do 44 | system('clear') 45 | end 46 | 47 | Pry::Commands.command /^clear!$/, "clear console including tmux scrollback buffer" do 48 | system('clear!') 49 | end 50 | # }}} 51 | 52 | # NOTE: prompt {{{ 53 | def _pry_indent(string, count, char = ' ') 54 | string.gsub(/([^\n]*)(\n|$)/) do |match| 55 | last_iteration = ($1 == "" && $2 == "") 56 | line = "" 57 | line << (char * count) unless last_iteration 58 | line << $1 59 | line << $2 60 | line 61 | end 62 | end 63 | 64 | def _pry_prompt(context, nesting, pry_instance, prompt_color = Pastel.new.bold.bright_blue.detach) 65 | prompt_char = prompt_color.('') 66 | prompt_name = Pastel.new.bold.bright_yellow(pry_instance.config.prompt_name) 67 | prompt_context = Pastel.new.bold.bright_cyan(Pry.view_clip(context)) 68 | prompt_separator = Pastel.new.bright_green(':') 69 | 70 | # NOTE: indent printed output so it lines up with nesting 71 | # fallback to regular colorPrinter 72 | pry_instance.config.print = proc do |output, value| 73 | next Pry::ColorPrinter.pp(value) unless defined?(value.ai) 74 | output.puts(_pry_indent(value.ai, nesting*2+1)) if defined?(value.ai) 75 | end 76 | 77 | _pry_indent(" #{prompt_char} #{prompt_name}#{prompt_separator}#{prompt_context} ", nesting*2) 78 | end 79 | 80 | _prompts = [ 81 | proc { |context, nesting, pry_instance, sep| _pry_prompt(context, nesting, pry_instance) }, 82 | proc { |context, nesting, pry_instance, sep| _pry_prompt(context, nesting, pry_instance, Pastel.new.bold.bright_green.detach) } 83 | ] 84 | 85 | # NOTE: we have a newer pry version that supports 86 | # Prompt.new 87 | if defined?(Pry::Prompt.new) 88 | Pry.config.prompt = Pry::Prompt.new( :snappy, 'a cleaner pry prompt', _prompts) 89 | else 90 | Pry.config.prompt = _prompts 91 | end 92 | -------------------------------------------------------------------------------- /rcrc: -------------------------------------------------------------------------------- 1 | COPY_ALWAYS="ssh/*" 2 | EXCLUDES="_assets bin terminfo .* README.md *:node_modules *:history *:cache Brewfile Brewfile.lock.json Yarnfile CargoFile" 3 | UNDOTTED="rubocop.yml tern-config" 4 | -------------------------------------------------------------------------------- /ripgreprc: -------------------------------------------------------------------------------- 1 | --ignore 2 | --smart-case 3 | --hidden 4 | --follow 5 | --no-messages 6 | --ignore-file 7 | ~/.gitignore 8 | -------------------------------------------------------------------------------- /rubocop.yml: -------------------------------------------------------------------------------- 1 | Bundler/OrderedGems: 2 | Enabled: true 3 | 4 | Metrics/CyclomaticComplexity: 5 | Enabled: false 6 | 7 | Metrics/AbcSize: 8 | Enabled: false 9 | 10 | Metrics/ClassLength: 11 | Enabled: false 12 | 13 | Metrics/ModuleLength: 14 | Enabled: false 15 | 16 | Metrics/MethodLength: 17 | Enabled: false 18 | 19 | Metrics/BlockLength: 20 | Enabled: false 21 | 22 | Metrics/PerceivedComplexity: 23 | Enabled: false 24 | 25 | # We want our code to document itself 26 | Style/Documentation: 27 | Enabled: false 28 | 29 | # Since v2.0, UTF-8 is the default encoding 30 | # http://www.ruby-doc.org/core-2.1.3/Encoding.html#class-Encoding-label-Script+encoding 31 | Style/Encoding: 32 | Enabled: false 33 | 34 | Layout/EndAlignment: 35 | EnforcedStyleAlignWith: variable 36 | 37 | Style/SignalException: 38 | EnforcedStyle: only_fail 39 | 40 | Style/Alias: 41 | EnforcedStyle: prefer_alias_method 42 | 43 | Style/SymbolArray: 44 | Enabled: false 45 | 46 | Layout/TrailingWhitespace: 47 | Enabled: false 48 | 49 | Style/WordArray: 50 | Enabled: false 51 | 52 | # This isn't always better 53 | # http://blog.rubybestpractices.com/posts/gregory/041-issue-10.5-uses-for-modules.html 54 | Style/ModuleFunction: 55 | Enabled: false 56 | 57 | Style/UnlessElse: 58 | Enabled: true 59 | 60 | # Alignment configuration. 61 | Layout/ArgumentAlignment: 62 | EnforcedStyle: with_fixed_indentation 63 | 64 | Layout/ParameterAlignment: 65 | EnforcedStyle: with_fixed_indentation 66 | 67 | Layout/FirstArrayElementIndentation: 68 | EnforcedStyle: consistent 69 | 70 | Layout/FirstHashElementIndentation: 71 | EnforcedStyle: consistent 72 | 73 | Layout/HashAlignment: 74 | Enabled: false 75 | 76 | Layout/MultilineMethodCallIndentation: 77 | EnforcedStyle: indented 78 | 79 | Layout/MultilineOperationIndentation: 80 | EnforcedStyle: indented 81 | 82 | Style/SingleLineBlockParams: 83 | Enabled: false 84 | 85 | Style/Lambda: 86 | Enabled: false 87 | 88 | Metrics/ParameterLists: 89 | Enabled: false 90 | 91 | Lint/AmbiguousBlockAssociation: 92 | Enabled: false 93 | -------------------------------------------------------------------------------- /scripts/check_migrations: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | 3 | # frozen_string_literal: true 4 | 5 | # Original author of this script: SiebeJan Stoker 6 | class Worker 7 | def initialize 8 | end 9 | 10 | def work 11 | puts remove_migrations_not_on_disk_sql 12 | end 13 | 14 | def migrations_on_disk 15 | `ls -1 db/migrate`.split("\n").map do |migration_file| 16 | "'#{migration_file.match(/\d{14}/)[0]}'" 17 | end 18 | end 19 | 20 | def remove_migrations_not_on_disk_sql 21 | 'delete from schema_migrations where version not in'\ 22 | "(#{migrations_on_disk.join ','});" 23 | end 24 | end 25 | 26 | Worker.new.work 27 | -------------------------------------------------------------------------------- /scripts/checkhosts: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | lines=$(cat /dev/stdin) 4 | for line in $lines; 5 | do 6 | ping -c 1 -t 1 -W 0.1 -s 5 $line > /dev/null 2>&1 7 | if [ $? -eq 0 ]; then 8 | echo "$line" 9 | fi 10 | done 11 | -------------------------------------------------------------------------------- /scripts/compile-zsh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -euo pipefail 3 | ROOT="$(cd "$(dirname "$0")/.." && pwd)" 4 | 5 | for file in zsh_prompt zsh_aliases zsh_keybindings; do 6 | if [ -f "$ROOT/$file" ]; then 7 | zsh -fc "zcompile $ROOT/$file" 8 | fi 9 | done 10 | -------------------------------------------------------------------------------- /scripts/exfat_clean: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexanderjeurissen/dotfiles/1c547f3a1b293a4d19ee6f35f01dbbde93fa29a9/scripts/exfat_clean -------------------------------------------------------------------------------- /scripts/generate-brew-env.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -euo pipefail 3 | 4 | : "${HOMEBREW_PREFIX:=/opt/homebrew}" 5 | mkdir -p "$HOME/.cache" 6 | "$HOMEBREW_PREFIX/bin/brew" shellenv > "$HOME/.cache/brew_env.zsh" 7 | 8 | -------------------------------------------------------------------------------- /scripts/install-terminfo.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | 5 | TERMDIR="$(dirname "$0")/../terminfo" 6 | 7 | for file in "$TERMDIR"/*.terminfo "$TERMDIR"/*.tic; do 8 | [ -e "$file" ] || continue 9 | tic -x -o "$HOME/.terminfo" "$file" 10 | done 11 | -------------------------------------------------------------------------------- /scripts/install-tmux-plugins.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | 5 | TPM_DIR="$HOME/.tmux/plugins/tpm" 6 | 7 | if [ ! -d "$TPM_DIR" ]; then 8 | git clone https://github.com/tmux-plugins/tpm "$TPM_DIR" 9 | fi 10 | 11 | "$TPM_DIR/bin/install_plugins" 12 | -------------------------------------------------------------------------------- /scripts/mermaid-ascii: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexanderjeurissen/dotfiles/1c547f3a1b293a4d19ee6f35f01dbbde93fa29a9/scripts/mermaid-ascii -------------------------------------------------------------------------------- /scripts/rmlink.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Removes the original file of a symbolic link 4 | rmlink() { 5 | local readlink_cmd 6 | readlink_cmd=$(command -v greadlink || command -v readlink) 7 | rm "$($readlink_cmd -f "$1")" 8 | unlink "$1" 9 | } 10 | 11 | rmlink "$1" 12 | -------------------------------------------------------------------------------- /scripts/santakiller: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | while true; do 3 | ps aux | grep com.google.santa.daemon | grep -v grep | awk '{print $2}' | xargs kill -9 4 | if [ $? -eq 0 ]; then 5 | echo "kill santa daemon" 6 | fi 7 | sleep 0.5 8 | done 9 | -------------------------------------------------------------------------------- /scripts/spec: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | file_path="$(cut -d ':' -f1 <<< "$1")" 4 | spec="$1" 5 | 6 | if [[ ! -f "$file_path" ]]; then 7 | echo "File does not exist" 8 | exit 1 9 | fi 10 | 11 | cucumber_command='bundle exec cucumber' 12 | rspec_command='bundle exec rspec --color' 13 | 14 | if [[ $file_path == *.feature ]]; then 15 | # FIVEMAT_PROFILE=1 $cucumber_command $spec --format Fivemat 16 | $cucumber_command $spec 17 | elif [[ $file_path == *_spec.rb ]]; then 18 | # FIVEMAT_PROFILE=1 $rspec_command $spec --format Fivemat 19 | $rspec_command $spec 20 | else 21 | echo "Invalid spec file given." 22 | exit 1 23 | fi 24 | -------------------------------------------------------------------------------- /scripts/theme: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | usage() { 6 | echo "Usage: $0 [light|dark]" >&2 7 | exit 1 8 | } 9 | 10 | if [ "$#" -ne 1 ]; then 11 | usage 12 | fi 13 | 14 | THEME="$1" 15 | 16 | case "$THEME" in 17 | light) 18 | FROM_BG="dark" 19 | TO_BG="light" 20 | FROM_SCHEME="modus_vivendi" 21 | TO_SCHEME="modus_operandi" 22 | WEZ_FROM="Modus Vivendi" 23 | WEZ_TO="Modus Operandi" 24 | ;; 25 | dark) 26 | FROM_BG="light" 27 | TO_BG="dark" 28 | FROM_SCHEME="modus_operandi" 29 | TO_SCHEME="modus_vivendi" 30 | WEZ_FROM="Modus Operandi" 31 | WEZ_TO="Modus Vivendi" 32 | ;; 33 | *) 34 | usage 35 | ;; 36 | esac 37 | 38 | NVIM_CONFIG=$(readlink -f ~/.config/nvim/lua/options.lua) 39 | WEZTERM_CONFIG=$(readlink -f ~/.config/wezterm/wezterm.lua) 40 | 41 | TEMP_NVIM=$(mktemp) 42 | TEMP_WEZTERM=$(mktemp) 43 | 44 | # Update Neovim background 45 | sed "s/o.background = ${FROM_BG}/o.background = ${TO_BG}/" "$NVIM_CONFIG" > "$TEMP_NVIM" && mv "$TEMP_NVIM" "$NVIM_CONFIG" 46 | 47 | # Update Neovim colorscheme 48 | sed "s/vim.cmd.colorscheme \"${FROM_SCHEME}\"/vim.cmd.colorscheme \"${TO_SCHEME}\"/" "$NVIM_CONFIG" > "$TEMP_NVIM" && mv "$TEMP_NVIM" "$NVIM_CONFIG" 49 | 50 | # Update WezTerm color scheme 51 | sed "s/config.color_scheme = \"${WEZ_FROM}\"/config.color_scheme = \"${WEZ_TO}\"/" "$WEZTERM_CONFIG" > "$TEMP_WEZTERM" && mv "$TEMP_WEZTERM" "$WEZTERM_CONFIG" 52 | 53 | rm -f "$TEMP_NVIM" "$TEMP_WEZTERM" 54 | -------------------------------------------------------------------------------- /ssh/config: -------------------------------------------------------------------------------- 1 | Host * 2 | AddKeysToAgent yes 3 | HashKnownHosts yes 4 | VisualHostKey yes 5 | ChallengeResponseAuthentication no 6 | StrictHostKeyChecking ask 7 | VerifyHostKeyDNS yes 8 | ForwardAgent no 9 | ForwardX11 no 10 | ForwardX11Trusted no 11 | IdentityAgent "~/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock" 12 | 13 | 14 | Host gitlab.inverselink.com 15 | HostName git.pdx1.inverselink.com 16 | ProxyCommand duoconnect -host=%h:%p -relay=https://engineering-ssh.inverselink.com 17 | 18 | Host github 19 | HostName github.com 20 | ControlMaster no 21 | -------------------------------------------------------------------------------- /terminfo/tmux-256color.terminfo: -------------------------------------------------------------------------------- 1 | # SOURCE: https://medium.com/@dubistkomisch/how-to-actually-get-italics-and-true-colour-to-work-in-iterm-tmux-vim-9ebe55ebc2be 2 | tmux-256color|tmux with 256 colors, 3 | ritm=\E[23m, rmso=\E[27m, sitm=\E[3m, smso=\E[7m, Ms@, 4 | khome=\E[1~, kend=\E[4~, 5 | use=screen-256color, 6 | # use=xterm-256color, use=screen-256color, 7 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /terminfo/xterm-256color-italic.tic: -------------------------------------------------------------------------------- 1 | # Reconstructed via infocmp from file: /Users/alexanderjeurissen/.terminfo/78/xterm-256color-italic 2 | xterm-256color-italic|xterm with 256 colors and italic, 3 | am, bce, ccc, km, mc5i, mir, msgr, npc, xenl, 4 | colors#256, cols#80, it#8, lines#24, pairs#32767, 5 | acsc=``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, 6 | bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, civis=\E[?25l, 7 | clear=\E[H\E[2J, cnorm=\E[?12l\E[?25h, cr=^M, 8 | csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, 9 | cud=\E[%p1%dB, cud1=^J, cuf=\E[%p1%dC, cuf1=\E[C, 10 | cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, 11 | cvvis=\E[?12;25h, dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, 12 | dl1=\E[M, ech=\E[%p1%dX, ed=\E[J, el=\E[K, el1=\E[1K, 13 | flash=\E[?5h$<100/>\E[?5l, home=\E[H, hpa=\E[%i%p1%dG, 14 | ht=^I, hts=\EH, ich=\E[%p1%d@, il=\E[%p1%dL, il1=\E[L, 15 | ind=^J, indn=\E[%p1%dS, 16 | initc=\E]4;%p1%d;rgb\:%p2%{255}%*%{1000}%/%2.2X/%p3%{255}%*%{1000}%/%2.2X/%p4%{255}%*%{1000}%/%2.2X\E\\, 17 | invis=\E[8m, is2=\E[!p\E[?3;4l\E[4l\E>, kDC=\E[3;2~, 18 | kEND=\E[1;2F, kHOM=\E[1;2H, kIC=\E[2;2~, kLFT=\E[1;2D, 19 | kNXT=\E[6;2~, kPRV=\E[5;2~, kRIT=\E[1;2C, kb2=\EOE, kbs=\177, 20 | kcbt=\E[Z, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, 21 | kdch1=\E[3~, kend=\EOF, kent=\EOM, kf1=\EOP, kf10=\E[21~, 22 | kf11=\E[23~, kf12=\E[24~, kf13=\E[1;2P, kf14=\E[1;2Q, 23 | kf15=\E[1;2R, kf16=\E[1;2S, kf17=\E[15;2~, kf18=\E[17;2~, 24 | kf19=\E[18;2~, kf2=\EOQ, kf20=\E[19;2~, kf21=\E[20;2~, 25 | kf22=\E[21;2~, kf23=\E[23;2~, kf24=\E[24;2~, 26 | kf25=\E[1;5P, kf26=\E[1;5Q, kf27=\E[1;5R, kf28=\E[1;5S, 27 | kf29=\E[15;5~, kf3=\EOR, kf30=\E[17;5~, kf31=\E[18;5~, 28 | kf32=\E[19;5~, kf33=\E[20;5~, kf34=\E[21;5~, 29 | kf35=\E[23;5~, kf36=\E[24;5~, kf37=\E[1;6P, kf38=\E[1;6Q, 30 | kf39=\E[1;6R, kf4=\EOS, kf40=\E[1;6S, kf41=\E[15;6~, 31 | kf42=\E[17;6~, kf43=\E[18;6~, kf44=\E[19;6~, 32 | kf45=\E[20;6~, kf46=\E[21;6~, kf47=\E[23;6~, 33 | kf48=\E[24;6~, kf49=\E[1;3P, kf5=\E[15~, kf50=\E[1;3Q, 34 | kf51=\E[1;3R, kf52=\E[1;3S, kf53=\E[15;3~, kf54=\E[17;3~, 35 | kf55=\E[18;3~, kf56=\E[19;3~, kf57=\E[20;3~, 36 | kf58=\E[21;3~, kf59=\E[23;3~, kf6=\E[17~, kf60=\E[24;3~, 37 | kf61=\E[1;4P, kf62=\E[1;4Q, kf63=\E[1;4R, kf7=\E[18~, 38 | kf8=\E[19~, kf9=\E[20~, khome=\EOH, kich1=\E[2~, 39 | kind=\E[1;2B, kmous=\E[M, knp=\E[6~, kpp=\E[5~, 40 | kri=\E[1;2A, mc0=\E[i, mc4=\E[4i, mc5=\E[5i, op=\E[39;49m, 41 | rc=\E8, rev=\E[7m, ri=\EM, rin=\E[%p1%dT, ritm=\E[23m, 42 | rmacs=\E(B, rmam=\E[?7l, rmcup=\E[?1049l, rmir=\E[4l, 43 | rmkx=\E[?1l\E>, rmm=\E[?1034l, rmso=\E[27m, rmul=\E[24m, 44 | rs1=\Ec, rs2=\E[!p\E[?3;4l\E[4l\E>, sc=\E7, 45 | setab=\E[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m, 46 | setaf=\E[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m, 47 | sgr=%?%p9%t\E(0%e\E(B%;\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m, 48 | sgr0=\E(B\E[m, sitm=\E[3m, smacs=\E(0, smam=\E[?7h, 49 | smcup=\E[?1049h, smir=\E[4h, smkx=\E[?1h\E=, 50 | smm=\E[?1034h, smso=\E[7m, smul=\E[4m, tbc=\E[3g, 51 | u6=\E[%i%d;%dR, u7=\E[6n, u8=\E[?1;2c, u9=\E[c, 52 | vpa=\E[%i%p1%dd, 53 | -------------------------------------------------------------------------------- /tmux.conf: -------------------------------------------------------------------------------- 1 | # ── General settings ────────────────────────────────────────────────────────── 2 | # Set a new keybinding to C-t {{{ 3 | unbind C-r 4 | unbind C-b 5 | set -g prefix C-t 6 | bind C-t send-prefix 7 | # }}} 8 | 9 | # Set a new keybinding for C-l {{{ 10 | bind C-l send-keys 'C-l' 11 | # }}} 12 | 13 | set-option -sg escape-time 0 # change the escape time in tmux to zero, improves vim responsiveness 14 | set-option -g history-limit 50000 # Increase scrollback history 15 | 16 | # smoother paste detection and focus tracking 17 | set-option -g assume-paste-time 1 # assume bracketed paste for 1ms 18 | set-option -g focus-events on # allow applications to detect terminal focus changes 19 | 20 | set -g default-terminal "tmux-256color" 21 | set -g default-shell ${SHELL} 22 | 23 | set -g default-command ${SHELL} 24 | if-shell "type 'reattach-to-user-namespace' >/dev/null" "set -g default-command 'reattach-to-user-namespace -l $SHELL'" 25 | # set -g default-command ${SHELL} 26 | 27 | # Enable true (24bit) colors for version >= 2.2 28 | # See https://deductivelabs.com/en/2016/03/using-true-color-vim-tmux/ 29 | # https://medium.com/@dubistkomisch/how-to-actually-get-italics-and-true-colour-to-work-in-iterm-tmux-vim-9ebe55ebc2be 30 | # set -ga terminal-overrides ',tmux-256color-italic:Tc:sitm=\E[3m' 31 | set -as terminal-overrides ',xterm*:Tc:sitm=\E[3m' 32 | set -g base-index 1 # start with window 1 (instead of 0) 33 | set -g pane-base-index 1 # start with pane 1 34 | setw -g mode-keys vi # enable vim mode 35 | 36 | # Undercurl 37 | set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm' # undercurl support 38 | set -as terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m' # underscore colours - needs tmux-3.0 39 | 40 | 41 | # vi-copy settings ( v) {{{ 42 | unbind v 43 | bind v copy-mode 44 | bind-key -Tcopy-mode-vi 'v' send -X begin-selection 45 | bind-key -Tcopy-mode-vi 'y' send -X copy-pipe-and-cancel "pbcopy" 46 | bind-key -Tcopy-mode-vi Escape send -X cancel 47 | bind-key -Tcopy-mode-vi V send -X rectangle-toggle 48 | # }}} 49 | 50 | # visual notification of activity in other windows {{{ 51 | setw -g monitor-activity on 52 | set -g visual-activity on 53 | # }}} 54 | 55 | # reload tmux.conf {{{ 56 | unbind r 57 | bind r source-file ~/.tmux.conf \; display '~/.tmux.conf sourced' 58 | # }}} 59 | 60 | # Tmux resurrect / continuum {{{ 61 | set -g @resurrect-strategy-nvim 'session' # restore neovim session if Session.vim file is present 62 | set -g @continuum-save-interval '5' # save every 5 minutes 63 | set -g @continuum-restore 'on' # auto restore on boot 64 | # }}} 65 | 66 | # ── Pane settings ─────────────────────────────────────────────────────────── 67 | 68 | # Pane resizing {{{ 69 | bind-key -r H resize-pane -L "5" 70 | bind-key -r L resize-pane -R "5" 71 | bind-key -r J resize-pane -D "5" 72 | bind-key -r K resize-pane -U "5" 73 | # }}} 74 | 75 | # switch between previous and next pane {{{ 76 | bind-key C-n next-window 77 | bind-key C-p previous-window 78 | # }}} 79 | 80 | # move panes (cycle) left and right {{{ 81 | bind-key -r "<" swap-window -t -1 82 | bind-key -r ">" swap-window -t +1 83 | # }}} 84 | 85 | # Panes options {{{ 86 | # set -g pane-border-style fg='black',bg='black' 87 | set -g pane-border-style fg='white',bg='default' # space 88 | set -g pane-active-border-style fg='white',bg='default' 89 | 90 | set -g display-panes-colour default 91 | set -g display-panes-active-colour yellow 92 | # }}} 93 | 94 | # set-option remain-on-exit on # keep new-window 'terminal command' open after the command exits 0 95 | 96 | # ── Status/Window settings ──────────────────────────────────────────────────────── 97 | 98 | setw -g clock-mode-colour brightblue 99 | 100 | # Status options {{{ 101 | set-option -g status on 102 | set-option -g status-interval 10 # redraw status line every 10 seconds. 103 | set-option -g status-justify "left" 104 | set-option -g status-left-length 100 105 | set-option -g status-right-length 100 106 | set-option -g status-position "top" 107 | set -g status-style bg='default',fg='default' # space 108 | set -g status-left "" 109 | set -g status-right "" 110 | set-option -g status-keys emacs # emacs key bindings in tmux command prompt (prefix + :) are better than vi keys. 111 | set -g pane-border-status "off" # add a empty line below statusline 112 | # }}} 113 | 114 | 115 | # Messages {{{ 116 | set -g message-style fg='#FFFFFF',bg='magenta' 117 | set -g message-command-style fg='#FFFFFF',bg='magenta' 118 | set -g display-time 4000 119 | # }}} 120 | 121 | 122 | # Window options {{{ 123 | # window is only constrained in size if a smaller client is actively looking at it. 124 | # setw -g aggressive-resize on 125 | setw -g automatic-rename on # rename window to reflect current program 126 | set -g renumber-windows on # renumber windows when a window is closed 127 | set -g set-titles on # set terminal title 128 | set -g set-titles-string '#h ❐ #S ● #I #W' 129 | 130 | # Format {{{ 131 | set -g window-status-separator " " 132 | set -g window-status-format "#I:#W" 133 | # set -g window-status-format "#{=1:#I,A,#I}" 134 | # }}} 135 | 136 | # Style {{{ 137 | set -g window-status-current-style fg='brightblue, bold' 138 | set -g window-status-activity-style fg='brightyellow' 139 | # }}} 140 | # }}} 141 | 142 | # Tmux plugins {{{ 143 | set -g @plugin "tmux-plugins/tpm" 144 | set -g @plugin "tmux-plugins/tmux-continuum" 145 | set -g @plugin "tmux-plugins/tmux-yank" 146 | set -g @plugin "tmux-plugins/tmux-copycat" 147 | set -g @plugin "tmux-plugins/tmux-open" 148 | set -g @plugin "tmux-plugins/tmux-pain-control" 149 | set -g @plugin "christoomey/vim-tmux-navigator" 150 | set -g @plugin "tmux-plugins/tmux-sessionist" 151 | # Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) 152 | run '~/.tmux/plugins/tpm/tpm' 153 | # }}} 154 | 155 | # vim: foldmethod=marker:sw=2:foldlevel=10 156 | -------------------------------------------------------------------------------- /zprofile: -------------------------------------------------------------------------------- 1 | BREW_ENV="$HOME/.cache/brew_env.zsh" 2 | if [ -r "$BREW_ENV" ]; then 3 | source "$BREW_ENV" 4 | else 5 | ~/.dotfiles/scripts/generate-brew-env.sh 6 | source "$BREW_ENV" 7 | fi 8 | 9 | # Added by OrbStack: command-line tools and integration 10 | source ~/.orbstack/shell/init.zsh 2>/dev/null || : 11 | 12 | # Set path {{{ 13 | # HOMEBREW_PREFIX/bin and sbin are added via brew shellenv 14 | path=( 15 | "$HOME/.bin" 16 | "$HOME/bin" 17 | "$HOME/.local/bin" 18 | "$HOME/.local/opt" 19 | "$HOME/.scripts" 20 | "$HOME/.yarn/bin" 21 | "$HOME/.cargo/bin" 22 | $path 23 | ) 24 | # }}} 25 | 26 | # Go path settings {[{ 27 | export GOPATH="$HOME/Development/go" 28 | path=("$GOPATH/bin" $path) 29 | # }}} 30 | 31 | # Ruby settings {{{ 32 | export ENABLE_SPRING=0 33 | export LDFLAGS="-L$HOMEBREW_PREFIX/opt/ruby@3.3/lib" 34 | export CPPFLAGS="-I$HOMEBREW_PREFIX/opt/ruby@3.3/include" 35 | path=("$HOMEBREW_PREFIX/opt/ruby@3.3/bin" $path) 36 | path=("$HOME/.gem/ruby/3.3.0/bin" $path) 37 | path=("$HOMEBREW_PREFIX/lib/ruby/gems/3.3.0/bin" $path) 38 | # }}} 39 | 40 | # Lua settings (derived from $ luarocks path) 41 | export LUA_PATH='/opt/homebrew/Cellar/luarocks/3.11.1/share/lua/5.4/?.lua;/opt/homebrew/Cellar/luarocks/3.9.1/share/lua/5.4/?.lua;/opt/homebrew/share/lua/5.4/?.lua;/opt/homebrew/share/lua/5.4/?/init.lua;/opt/homebrew/lib/lua/5.4/?.lua;/opt/homebrew/lib/lua/5.4/?/init.lua;./?.lua;./?/init.lua;/Users/alexander/.luarocks/share/lua/5.4/?.lua;/Users/alexander/.luarocks/share/lua/5.4/?/init.lua' 42 | export LUA_CPATH='/opt/homebrew/lib/lua/5.4/?.so;/opt/homebrew/lib/lua/5.4/loadall.so;./?.so;/Users/alexander/.luarocks/lib/lua/5.4/?.so' 43 | 44 | # Add default binaries /usr/bin etc at lowest prio {{{ 45 | path+=( 46 | "/usr/bin" 47 | "/bin" 48 | "/usr/sbin" 49 | "/sbin" 50 | ) 51 | # }}} 52 | 53 | typeset -U path PATH 54 | export PATH 55 | 56 | # Java settings 57 | # export JAVA_HOME="/usr/libexec/java_home" 58 | # export MAVENPATH="$HOME/.maven" 59 | # export PATH="$MAVENPATH/bin:$PATH" 60 | 61 | export FZF_DEFAULT_OPTS='--color=bw,border:0,info:2,prompt:12,fg:,bg+:0,fg+:,gutter:0 --height 40% --reverse --prompt="  " --border=none --no-separator --no-scrollbar' 62 | export _ZO_FZF_OPTS="--height 40% --reverse $FZF_DEFAULT_OPTS" 63 | export FZF_DEFAULT_COMMAND='rg --files' 64 | export FZF_CTRL_T_COMMAND='rg --files' 65 | 66 | # LS colors settings {{{ 67 | # retrieved using the following command: 68 | # gdircolors -c ~/.dircolors/dircolors.ansi-dark 69 | if command -v gdircolors >/dev/null 2>&1; then 70 | eval "$(gdircolors -b ~/.dircolors/dircolors.ansi-dark)" 71 | else 72 | eval "$(dircolors -b ~/.dircolors/dircolors.ansi-dark)" 73 | fi 74 | # }}} 75 | -------------------------------------------------------------------------------- /zsh_aliases: -------------------------------------------------------------------------------- 1 | # Git {{{ 2 | alias g='git' 3 | 4 | # Branch (b) 5 | alias gbx='git branch -d' 6 | alias gbl='git branch --list' 7 | alias gbX='git branch -D' 8 | alias gbm='git branch -m' 9 | alias gbM='git branch -M' 10 | alias gbs='git show-branch' 11 | alias gbS='git show-branch -a' 12 | 13 | # Commit (c) 14 | alias gc='git commit --verbose' 15 | alias gca='git commit --verbose --all' 16 | alias gcm='git commit --message "Commit on: $(date "+%Y-%m-%d %H:%M:%S")"' 17 | alias gcma='git add -A && gcm' 18 | alias gco='git checkout' 19 | alias gcO='git checkout --patch' 20 | alias gcA='git commit --verbose --amend' 21 | alias gcp='git cherry-pick --ff' 22 | alias gcP='git cherry-pick --no-commit' 23 | alias gcr='git revert' 24 | alias gcR='git reset "HEAD^"' 25 | alias gcs='git show' 26 | alias gcl='git-commit-lost' 27 | 28 | # Conflict (C) 29 | alias gCl='git status | sed -n "s/^.*both [a-z]*ed: *//p"' 30 | alias gCo='git checkout --ours --' 31 | alias gCt='git checkout --theirs --' 32 | 33 | # Data (d) 34 | alias gd='git ls-files' 35 | alias gdc='git ls-files --cached' 36 | alias gdx='git ls-files --deleted' 37 | alias gdm='git ls-files --modified' 38 | alias gdu='git ls-files --other --exclude-standard' 39 | alias gdk='git ls-files --killed' 40 | alias gdi='git status --porcelain --short --ignored | sed -n "s/^!! //p"' 41 | 42 | # Fetch (f) 43 | alias gf='git fetch' 44 | alias gfc='git clone' 45 | alias gfm='git pull' 46 | alias gfr='git pull --rebase' 47 | 48 | # Grep (g) 49 | alias gg='git grep' 50 | alias ggi='git grep --ignore-case' 51 | alias ggl='git grep --files-with-matches' 52 | alias ggL='git grep --files-without-matches' 53 | alias ggv='git grep --invert-match' 54 | alias ggw='git grep --word-regexp' 55 | 56 | # Index (i) 57 | alias gia='git add' 58 | alias giA='git add --patch' 59 | alias giu='git add --update' 60 | alias gid='git diff --no-ext-diff --cached' 61 | alias giD='git diff --no-ext-diff --cached --word-diff' 62 | alias gir='git reset' 63 | alias giR='git reset --patch' 64 | alias gix='git rm -r --cached' 65 | alias giX='git rm -rf --cached' 66 | 67 | # Log (l) 68 | alias gls='git log --topo-order --stat --pretty=format:"%C(bold)Commit:%C(reset) %C(green)%H%C(red)%d%n%C(bold)Author:%C(reset) %C(cyan)%an <%ae>%n%C(bold)Date:%C(reset) %C(blue)%ai (%ar)%C(reset)%n%+B" --show-signature' 69 | alias gld='git log --topo-order --stat --patch --full-diff --pretty=format:"%C(bold)Commit:%C(reset) %C(green)%H%C(red)%d%n%C(bold)Author:%C(reset) %C(cyan)%an <%ae>%n%C(bold)Date:%C(reset) %C(blue)%ai (%ar)%C(reset)%n%+B" --show-signature' 70 | alias glo='git log --topo-order --pretty=format:"%C(green)%h%C(reset) %s%C(red)%d%C(reset)%n" --show-signature' 71 | alias glg='git log --topo-order --all --graph --pretty=format:"%C(green)%h%C(reset) %s%C(red)%d%C(reset)%n" --show-signature' 72 | alias glb='git log --topo-order --pretty=format:"%C(green)%h%C(reset) %s%n%C(blue)(%ar by %an)%C(red)%d%C(reset)%n" --show-signature' 73 | alias glc='git shortlog --summary --numbered' 74 | 75 | # Merge (m) 76 | alias gm='git merge' 77 | alias gmc='git merge --continue' 78 | alias gmC='git merge --no-commit' 79 | alias gmF='git merge --no-ff' 80 | alias gma='git merge --abort' 81 | alias gmt='git mergetool' 82 | 83 | # Push (p) 84 | alias gp='git push' 85 | alias gpf='git push --force' 86 | alias gpa='git push --all' 87 | alias gpA='git push --all && git push --tags' 88 | alias gpt='git push --tags' 89 | 90 | # Rebase (r) 91 | alias gr='git rebase' 92 | alias gra='git rebase --abort' 93 | alias grc='git rebase --continue' 94 | alias gri='git rebase --interactive' 95 | alias grs='git rebase --skip' 96 | 97 | # Remote (R) 98 | alias gR='git remote' 99 | alias gRl='git remote --verbose' 100 | alias gRa='git remote add' 101 | alias gRx='git remote rm' 102 | alias gRm='git remote rename' 103 | alias gRu='git remote update' 104 | alias gRp='git remote prune' 105 | alias gRs='git remote show' 106 | alias gRb='git-hub-browse' 107 | 108 | # Stash (s) 109 | alias gs='git stash' 110 | alias gsa='git stash apply' 111 | alias gsx='git stash drop' 112 | alias gsX='git-stash-clear-interactive' 113 | alias gsl='git stash list' 114 | alias gsL='git-stash-dropped' 115 | alias gsd='git stash show --patch --stat' 116 | alias gsp='git stash pop' 117 | alias gsr='git-stash-recover' 118 | alias gss='git stash save --include-untracked' 119 | alias gsS='git stash save --patch --no-keep-index' 120 | alias gsw='git stash save --include-untracked --keep-index' 121 | 122 | # Submodule (S) 123 | alias gS='git submodule' 124 | alias gSa='git submodule add' 125 | alias gSf='git submodule foreach' 126 | alias gSi='git submodule init' 127 | alias gSI='git submodule update --init --recursive' 128 | alias gSl='git submodule status' 129 | alias gSm='git-submodule-move' 130 | alias gSs='git submodule sync' 131 | alias gSu='git submodule foreach git pull origin master' 132 | alias gSx='git-submodule-remove' 133 | 134 | # Working Copy (w) 135 | alias gdd='git diff develop --name-only' 136 | alias gdD='git diff develop' 137 | alias gws='git status --short' 138 | alias gwS='git status' 139 | alias gwd='git diff --no-ext-diff' 140 | alias gwD='git diff --no-ext-diff --word-diff' 141 | alias gwr='git reset --soft' 142 | alias gwR='git reset --hard' 143 | alias gwc='git clean -n' 144 | alias gwC='git clean -f' 145 | alias gwx='git rm -r' 146 | alias gwX='git rm -rf' 147 | # }}} 148 | 149 | 150 | alias l="exa -lah --time-style='long-iso' --group-directories-first" 151 | alias ls="exa --group-directories-first" 152 | # alias v="zed" 153 | alias v="nvim" 154 | alias v!="sudo nvim" 155 | alias v!!="nvim -u NONE" 156 | -------------------------------------------------------------------------------- /zsh_keybindings: -------------------------------------------------------------------------------- 1 | bindkey '^e' autosuggest-accept 2 | -------------------------------------------------------------------------------- /zsh_prompt: -------------------------------------------------------------------------------- 1 | vi-git-status() { 2 | local action="${hook_com[action]}" 3 | 4 | if [[ -n $action ]]; then 5 | if [[ "$action" == "rebase" ]]; then 6 | hook_com[misc]="" 7 | elif [[ "$action" == "rebase-i" ]]; then 8 | hook_com[misc]="" 9 | elif [[ "$action" == "merge" ]]; then 10 | hook_com[misc]="" 11 | fi 12 | else 13 | hook_com[misc]="" 14 | fi 15 | } 16 | 17 | _segment() { 18 | local bg=$1 fg=$2 text=$3 indent=$4 19 | local segment="%K{$bg}%F{$fg}%B $text %b%f%k" 20 | 21 | echo -ne $segment 22 | } 23 | 24 | _generate_prompt() { 25 | local prompt_content="${prompt_newline}" 26 | local working_tree="${vcs_info_msg_1_}" 27 | 28 | # • 29 | # ∼ 30 | # ✓ 31 | # ✕ 32 | #  33 | #  34 | #  35 | #  36 | #  37 | if [[ -n "$SSH_CONNECTION" ]]; then 38 | prompt_content+=$( _segment 'default' 'red' " %m" 0) 39 | fi 40 | 41 | # VCS info 42 | if [[ -n $working_tree ]]; then 43 | if [[ ${git_dirty:-0} -eq 0 ]]; then 44 | prompt_content+=$(_segment 'default' 'default' "${vcs_info_msg_0_}" $SSH_CONNECTION) 45 | else 46 | prompt_content+=$(_segment 'default' 'default' "${vcs_info_msg_0_}*" $SSH_CONNECTION) 47 | fi 48 | fi 49 | 50 | # prompt_content+="%(?.  .  )" 51 | # Add last exit code indicator 52 | 53 | # Add current directory indicator 54 | prompt_content+=$(_segment 'default' 'blue' '%(3~|%2~|%~)' $working_tree) 55 | 56 | PROMPT="${(j..)prompt_content} %B$%b " 57 | } 58 | 59 | _prompt_buffer_empty() { 60 | if [ -z "$BUFFER" ]; then 61 | if [ -n "${vcs_info_msg_1_}" ]; then 62 | echo -ne "\033[1m git status\033[0m \n" 63 | git -c color.status=always status --ignore-submodules=all | less -XFR 64 | # git -c color.status=always lg -3 | less -XFR 65 | else 66 | echo -ne "\033[1m--- FILES:\033[0m \n" 67 | CLICOLOR_FORCE=1 ls -C -G | less -XFR 68 | echo -n "\n" 69 | fi 70 | 71 | zle redisplay 72 | else 73 | zle accept-line 74 | fi 75 | } 76 | 77 | # Update vcs information only when inside a git repository 78 | _update_vcs_info() { 79 | if git rev-parse --is-inside-work-tree >/dev/null 2>&1; then 80 | vcs_info 81 | if git status --porcelain=2 --untracked-files=no --ignore-submodules | grep -q .; then 82 | git_dirty=1 83 | else 84 | git_dirty=0 85 | fi 86 | else 87 | unset vcs_info_msg_0_ vcs_info_msg_1_ vcs_info_msg_2_ 88 | unset git_dirty 89 | fi 90 | } 91 | 92 | 93 | prompt_setup() { 94 | # prevent percentage showing up 95 | # if output doesn't end with a newline 96 | export PROMPT_EOL_MARK='' 97 | setopt prompt_subst 98 | 99 | # Borrowwed from sindresorhus/pure 100 | if [[ -z $prompt_newline ]]; then 101 | # This variable needs to be set, usually set by promptinit. 102 | typeset -g prompt_newline=$'\n%{\r%}' 103 | fi 104 | 105 | zmodload zsh/datetime 106 | zmodload zsh/zle 107 | 108 | autoload -Uz add-zsh-hook 109 | autoload -Uz vcs_info 110 | 111 | zstyle ':vcs_info:*' enable git 112 | zstyle ':vcs_info:*' use-simple true 113 | zstyle ':vcs_info:*' max-exports 3 114 | zstyle ':vcs_info:git*' formats '%m %0.20b%f%u%%s' '%R' 115 | zstyle ':vcs_info:git*' actionformats '%m %0.20b %f%u%%s' '%0.20b|%a' '%R' 116 | zstyle ':vcs_info:git*+set-message:*' hooks git-status 117 | 118 | add-zsh-hook precmd _update_vcs_info 119 | add-zsh-hook precmd _generate_prompt # generate left side prompt 120 | 121 | # zle -N zle-line-init _ombre_line_init 122 | # zle -N zle-keymap-select _prompt_keymap_select 123 | zle -N buffer-empty _prompt_buffer_empty 124 | 125 | bindkey -M main "^M" buffer-empty 126 | bindkey -M vicmd "^M" buffer-empty 127 | bindkey -M viins "^M" buffer-empty 128 | } 129 | 130 | prompt_setup "$@" 131 | -------------------------------------------------------------------------------- /zshenv: -------------------------------------------------------------------------------- 1 | export DEFAULT_USER=$USER 2 | export EDITOR='nvim' 3 | export HSANDBOX_EDITOR='nvim' 4 | 5 | export HOMEBREW_PREFIX="/opt/homebrew" # lookup using (brew --prefix) 6 | # Export early so startup scripts can use the cached value without invoking brew 7 | 8 | # Misc env variables 9 | export TZ_LIST='Europe/Amsterdam,America/New_York,America/Los_Angeles' 10 | 11 | # H1 related env variables 12 | export SKIP_WAIT=1 13 | export LINT_STAGED=1 14 | export PULL_LOCK=1 15 | 16 | # export LIBRARY_PATH="/opt/homebrew/opt/gcc/lib/gcc/$(gcc -dumpversion)/" 17 | # export LD_LIBRARY_PATH="/opt/homebrew/opt/gcc/lib/gcc/$(gcc -dumpversion)/" 18 | 19 | # Set ripgrep rc file 20 | export RIPGREP_CONFIG_PATH="$HOME/.ripgreprc" 21 | 22 | [[ -f ~/.zshenv.local ]] && source ~/.zshenv.local 23 | 24 | -------------------------------------------------------------------------------- /zshrc: -------------------------------------------------------------------------------- 1 | # NOTE: zsh config profiling 2 | # zmodload zsh/zprof 3 | 4 | 5 | # Allow expanding commands using C-e 6 | # bindkey -e # Disabled in favor of vi mode 7 | bindkey "^E" forward-char 8 | 9 | # History settings {{{ 10 | # Reduce HISTSIZE or disable incappendhistory if history lag is noticeable 11 | SAVEHIST=100000 # total number of lines kept in history file 12 | HISTSIZE=5000 # limit in-memory history to improve responsiveness 13 | HISTFILE=~/.zsh_history 14 | setopt appendhistory 15 | setopt sharehistory 16 | setopt histignorealldups 17 | setopt incappendhistory # disable if history lag becomes noticeable 18 | setopt hist_reduce_blanks 19 | setopt hist_verify 20 | # }}} 21 | 22 | # Initialize completion system 23 | autoload -Uz compinit 24 | compinit -d ~/.cache/zcompdump-$ZSH_VERSION 25 | if [[ -f ~/.cache/zcompdump-$ZSH_VERSION ]]; then 26 | zcompile ~/.cache/zcompdump-$ZSH_VERSION 27 | fi 28 | 29 | # Disables greeting 30 | unsetopt correct_all 31 | 32 | # FZF settings {{{ 33 | if command -v fzf >/dev/null; then 34 | bindkey -r "^T" 35 | bindkey -M emacs '^F' fzf-file-widget 36 | bindkey -M vicmd '^F' fzf-file-widget 37 | bindkey -M viins '^F' fzf-file-widget 38 | 39 | __fsel_branch() { 40 | local branches=$(git branch --list) 41 | setopt localoptions pipefail no_aliases 2> /dev/null 42 | local branch_name 43 | echo "$branches" | FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} --ansi --tac --query=${LBUFFER} ${FZF_DEFAULT_OPTS-} ${FZF_BRANCH_OPTS-}" $(__fzfcmd) | awk '{print $1}' | while read -r branch_name; do 44 | echo "$branch_name" 45 | done 46 | local ret=$? 47 | echo 48 | return $ret 49 | } 50 | 51 | fzf-branch-widget() { 52 | LBUFFER="${LBUFFER}$(__fsel_branch)" 53 | local ret=$? 54 | zle reset-prompt 55 | return $ret 56 | } 57 | 58 | zle -N fzf-branch-widget 59 | bindkey -r "^B" 60 | bindkey -M emacs '^B' fzf-branch-widget 61 | bindkey -M vicmd '^B' fzf-branch-widget 62 | bindkey -M viins '^B' fzf-branch-widget 63 | else 64 | fzf-file-widget() { echo 'fzf not installed' >&2; } 65 | fzf-branch-widget() { echo 'fzf not installed' >&2; } 66 | fi 67 | # }}} 68 | 69 | 70 | # Plugins {{{ 71 | # Heavy plugins are loaded lazily to keep startup fast. See _lazy_init_plugins 72 | # below for details. 73 | # }}} 74 | 75 | # Lazy-load plugin initialization after the first prompt. Manual autoload via 76 | # add-zsh-hook delays sourcing of zsh-autosuggestions, zoxide and fzf shell 77 | # integration until the shell is ready, which keeps startup responsive. 78 | autoload -Uz add-zsh-hook 79 | _lazy_init_plugins() { 80 | if [[ -z ${_zsh_autosuggest_loaded-} ]] && command -v brew >/dev/null; then 81 | local dir="$HOMEBREW_PREFIX/share/zsh-autosuggestions" 82 | [[ -f $dir/zsh-autosuggestions.zsh ]] && source $dir/zsh-autosuggestions.zsh 83 | _zsh_autosuggest_loaded=1 84 | fi 85 | 86 | if [[ -z ${_zoxide_loaded-} ]] && command -v zoxide >/dev/null; then 87 | eval "$(zoxide init zsh)" 88 | _zoxide_loaded=1 89 | fi 90 | 91 | if [[ -z ${_fzf_shell_loaded-} ]] && command -v fzf >/dev/null; then 92 | eval "$(fzf --zsh)" 93 | _fzf_shell_loaded=1 94 | fi 95 | 96 | if [[ ${_zsh_autosuggest_loaded-0} -eq 1 && ${_zoxide_loaded-0} -eq 1 && ${_fzf_shell_loaded-0} -eq 1 ]]; then 97 | add-zsh-hook -d precmd _lazy_init_plugins 98 | fi 99 | } 100 | add-zsh-hook precmd _lazy_init_plugins 101 | 102 | # Vi settings {{{ 103 | bindkey -v 104 | # }} 105 | 106 | if [[ -f ~/.zsh_aliases.zwc ]]; then 107 | source ~/.zsh_aliases.zwc 108 | else 109 | source ~/.zsh_aliases 110 | fi 111 | if [[ -f ~/.zsh_prompt.zwc ]]; then 112 | builtin source ~/.zsh_prompt.zwc 113 | else 114 | builtin source ~/.zsh_prompt 115 | fi 116 | if [[ -f ~/.zsh_keybindings.zwc ]]; then 117 | source ~/.zsh_keybindings.zwc 118 | else 119 | source ~/.zsh_keybindings 120 | fi 121 | # vim: foldmethod=marker:sw=2:foldlevel=10 122 | # 123 | 124 | # NOTE: profile zsh config 125 | # zprof 126 | --------------------------------------------------------------------------------