├── .gitignore ├── editor └── .config │ └── nvim │ ├── LICENSE.md │ ├── README.md │ ├── doc │ ├── kickstart.txt │ └── tags │ ├── init.lua │ ├── lazy-lock.json │ └── lua │ ├── custom │ └── plugins │ │ └── init.lua │ └── kickstart │ ├── health.lua │ └── plugins │ ├── autopairs.lua │ ├── debug.lua │ ├── gitsigns.lua │ ├── indent_line.lua │ ├── lint.lua │ └── neo-tree.lua ├── gui ├── .config │ ├── alacritty │ │ └── alacritty.yml │ ├── fontconfig │ │ └── fonts.conf │ ├── i3status-rust │ │ └── config.toml │ └── sway │ │ └── config └── .xkb │ └── symbols │ └── mac └── shell ├── .config └── starship.toml ├── .gitconfig ├── .gnupg ├── gpg-agent.conf └── sshcontrol ├── .ssh └── config ├── .tmux.conf └── .zshrc /.gitignore: -------------------------------------------------------------------------------- 1 | shell/.gnupg 2 | shell/.ssh/known_hosts* 3 | !shell/.gnupg/gpg-agent.conf 4 | !shell/.gnupg/sshcontrol 5 | shell/.config/secrets.sh 6 | -------------------------------------------------------------------------------- /editor/.config/nvim/LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | SOFTWARE. 20 | -------------------------------------------------------------------------------- /editor/.config/nvim/README.md: -------------------------------------------------------------------------------- 1 | # kickstart.nvim 2 | 3 | ## Introduction 4 | 5 | A starting point for Neovim that is: 6 | 7 | * Small 8 | * Single-file 9 | * Completely Documented 10 | 11 | **NOT** a Neovim distribution, but instead a starting point for your configuration. 12 | 13 | ## Installation 14 | 15 | ### Install Neovim 16 | 17 | Kickstart.nvim targets *only* the latest 18 | ['stable'](https://github.com/neovim/neovim/releases/tag/stable) and latest 19 | ['nightly'](https://github.com/neovim/neovim/releases/tag/nightly) of Neovim. 20 | If you are experiencing issues, please make sure you have the latest versions. 21 | 22 | ### Install External Dependencies 23 | 24 | External Requirements: 25 | - Basic utils: `git`, `make`, `unzip`, C Compiler (`gcc`) 26 | - [ripgrep](https://github.com/BurntSushi/ripgrep#installation) 27 | - Clipboard tool (xclip/xsel/win32yank or other depending on the platform) 28 | - A [Nerd Font](https://www.nerdfonts.com/): optional, provides various icons 29 | - if you have it set `vim.g.have_nerd_font` in `init.lua` to true 30 | - Emoji fonts (Ubuntu only, and only if you want emoji!) `sudo apt install fonts-noto-color-emoji` 31 | - Language Setup: 32 | - If you want to write Typescript, you need `npm` 33 | - If you want to write Golang, you will need `go` 34 | - etc. 35 | 36 | > [!NOTE] 37 | > See [Install Recipes](#Install-Recipes) for additional Windows and Linux specific notes 38 | > and quick install snippets 39 | 40 | ### Install Kickstart 41 | 42 | > [!NOTE] 43 | > [Backup](#FAQ) your previous configuration (if any exists) 44 | 45 | Neovim's configurations are located under the following paths, depending on your OS: 46 | 47 | | OS | PATH | 48 | | :- | :--- | 49 | | Linux, MacOS | `$XDG_CONFIG_HOME/nvim`, `~/.config/nvim` | 50 | | Windows (cmd)| `%localappdata%\nvim\` | 51 | | Windows (powershell)| `$env:LOCALAPPDATA\nvim\` | 52 | 53 | #### Recommended Step 54 | 55 | [Fork](https://docs.github.com/en/get-started/quickstart/fork-a-repo) this repo 56 | so that you have your own copy that you can modify, then install by cloning the 57 | fork to your machine using one of the commands below, depending on your OS. 58 | 59 | > [!NOTE] 60 | > Your fork's URL will be something like this: 61 | > `https://github.com//kickstart.nvim.git` 62 | 63 | You likely want to remove `lazy-lock.json` from your fork's `.gitignore` file 64 | too - it's ignored in the kickstart repo to make maintenance easier, but it's 65 | [recommended to track it in version control](https://lazy.folke.io/usage/lockfile). 66 | 67 | #### Clone kickstart.nvim 68 | 69 | > [!NOTE] 70 | > If following the recommended step above (i.e., forking the repo), replace 71 | > `nvim-lua` with `` in the commands below 72 | 73 |
Linux and Mac 74 | 75 | ```sh 76 | git clone https://github.com/nvim-lua/kickstart.nvim.git "${XDG_CONFIG_HOME:-$HOME/.config}"/nvim 77 | ``` 78 | 79 |
80 | 81 |
Windows 82 | 83 | If you're using `cmd.exe`: 84 | 85 | ``` 86 | git clone https://github.com/nvim-lua/kickstart.nvim.git "%localappdata%\nvim" 87 | ``` 88 | 89 | If you're using `powershell.exe` 90 | 91 | ``` 92 | git clone https://github.com/nvim-lua/kickstart.nvim.git "${env:LOCALAPPDATA}\nvim" 93 | ``` 94 | 95 |
96 | 97 | ### Post Installation 98 | 99 | Start Neovim 100 | 101 | ```sh 102 | nvim 103 | ``` 104 | 105 | That's it! Lazy will install all the plugins you have. Use `:Lazy` to view 106 | the current plugin status. Hit `q` to close the window. 107 | 108 | #### Read The Friendly Documentation 109 | 110 | Read through the `init.lua` file in your configuration folder for more 111 | information about extending and exploring Neovim. That also includes 112 | examples of adding popularly requested plugins. 113 | 114 | > [!NOTE] 115 | > For more information about a particular plugin check its repository's documentation. 116 | 117 | 118 | ### Getting Started 119 | 120 | [The Only Video You Need to Get Started with Neovim](https://youtu.be/m8C0Cq9Uv9o) 121 | 122 | ### FAQ 123 | 124 | * What should I do if I already have a pre-existing Neovim configuration? 125 | * You should back it up and then delete all associated files. 126 | * This includes your existing init.lua and the Neovim files in `~/.local` 127 | which can be deleted with `rm -rf ~/.local/share/nvim/` 128 | * Can I keep my existing configuration in parallel to kickstart? 129 | * Yes! You can use [NVIM_APPNAME](https://neovim.io/doc/user/starting.html#%24NVIM_APPNAME)`=nvim-NAME` 130 | to maintain multiple configurations. For example, you can install the kickstart 131 | configuration in `~/.config/nvim-kickstart` and create an alias: 132 | ``` 133 | alias nvim-kickstart='NVIM_APPNAME="nvim-kickstart" nvim' 134 | ``` 135 | When you run Neovim using `nvim-kickstart` alias it will use the alternative 136 | config directory and the matching local directory 137 | `~/.local/share/nvim-kickstart`. You can apply this approach to any Neovim 138 | distribution that you would like to try out. 139 | * What if I want to "uninstall" this configuration: 140 | * See [lazy.nvim uninstall](https://lazy.folke.io/usage#-uninstalling) information 141 | * Why is the kickstart `init.lua` a single file? Wouldn't it make sense to split it into multiple files? 142 | * The main purpose of kickstart is to serve as a teaching tool and a reference 143 | configuration that someone can easily use to `git clone` as a basis for their own. 144 | As you progress in learning Neovim and Lua, you might consider splitting `init.lua` 145 | into smaller parts. A fork of kickstart that does this while maintaining the 146 | same functionality is available here: 147 | * [kickstart-modular.nvim](https://github.com/dam9000/kickstart-modular.nvim) 148 | * Discussions on this topic can be found here: 149 | * [Restructure the configuration](https://github.com/nvim-lua/kickstart.nvim/issues/218) 150 | * [Reorganize init.lua into a multi-file setup](https://github.com/nvim-lua/kickstart.nvim/pull/473) 151 | 152 | ### Install Recipes 153 | 154 | Below you can find OS specific install instructions for Neovim and dependencies. 155 | 156 | After installing all the dependencies continue with the [Install Kickstart](#Install-Kickstart) step. 157 | 158 | #### Windows Installation 159 | 160 |
Windows with Microsoft C++ Build Tools and CMake 161 | Installation may require installing build tools and updating the run command for `telescope-fzf-native` 162 | 163 | See `telescope-fzf-native` documentation for [more details](https://github.com/nvim-telescope/telescope-fzf-native.nvim#installation) 164 | 165 | This requires: 166 | 167 | - Install CMake and the Microsoft C++ Build Tools on Windows 168 | 169 | ```lua 170 | {'nvim-telescope/telescope-fzf-native.nvim', build = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build' } 171 | ``` 172 |
173 |
Windows with gcc/make using chocolatey 174 | Alternatively, one can install gcc and make which don't require changing the config, 175 | the easiest way is to use choco: 176 | 177 | 1. install [chocolatey](https://chocolatey.org/install) 178 | either follow the instructions on the page or use winget, 179 | run in cmd as **admin**: 180 | ``` 181 | winget install --accept-source-agreements chocolatey.chocolatey 182 | ``` 183 | 184 | 2. install all requirements using choco, exit the previous cmd and 185 | open a new one so that choco path is set, and run in cmd as **admin**: 186 | ``` 187 | choco install -y neovim git ripgrep wget fd unzip gzip mingw make 188 | ``` 189 |
190 |
WSL (Windows Subsystem for Linux) 191 | 192 | ``` 193 | wsl --install 194 | wsl 195 | sudo add-apt-repository ppa:neovim-ppa/unstable -y 196 | sudo apt update 197 | sudo apt install make gcc ripgrep unzip git xclip neovim 198 | ``` 199 |
200 | 201 | #### Linux Install 202 |
Ubuntu Install Steps 203 | 204 | ``` 205 | sudo add-apt-repository ppa:neovim-ppa/unstable -y 206 | sudo apt update 207 | sudo apt install make gcc ripgrep unzip git xclip neovim 208 | ``` 209 |
210 |
Debian Install Steps 211 | 212 | ``` 213 | sudo apt update 214 | sudo apt install make gcc ripgrep unzip git xclip curl 215 | 216 | # Now we install nvim 217 | curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux-x86_64.tar.gz 218 | sudo rm -rf /opt/nvim-linux-x86_64 219 | sudo mkdir -p /opt/nvim-linux-x86_64 220 | sudo chmod a+rX /opt/nvim-linux-x86_64 221 | sudo tar -C /opt -xzf nvim-linux-x86_64.tar.gz 222 | 223 | # make it available in /usr/local/bin, distro installs to /usr/bin 224 | sudo ln -sf /opt/nvim-linux-x86_64/bin/nvim /usr/local/bin/ 225 | ``` 226 |
227 |
Fedora Install Steps 228 | 229 | ``` 230 | sudo dnf install -y gcc make git ripgrep fd-find unzip neovim 231 | ``` 232 |
233 | 234 |
Arch Install Steps 235 | 236 | ``` 237 | sudo pacman -S --noconfirm --needed gcc make git ripgrep fd unzip neovim 238 | ``` 239 |
240 | 241 | -------------------------------------------------------------------------------- /editor/.config/nvim/doc/kickstart.txt: -------------------------------------------------------------------------------- 1 | ================================================================================ 2 | INTRODUCTION *kickstart.nvim* 3 | 4 | Kickstart.nvim is a project to help you get started on your neovim journey. 5 | 6 | *kickstart-is-not* 7 | It is not: 8 | - Complete framework for every plugin under the sun 9 | - Place to add every plugin that could ever be useful 10 | 11 | *kickstart-is* 12 | It is: 13 | - Somewhere that has a good start for the most common "IDE" type features: 14 | - autocompletion 15 | - goto-definition 16 | - find references 17 | - fuzzy finding 18 | - and hinting at what more can be done :) 19 | - A place to _kickstart_ your journey. 20 | - You should fork this project and use/modify it so that it matches your 21 | style and preferences. If you don't want to do that, there are probably 22 | other projects that would fit much better for you (and that's great!)! 23 | 24 | vim:tw=78:ts=8:ft=help:norl: 25 | -------------------------------------------------------------------------------- /editor/.config/nvim/doc/tags: -------------------------------------------------------------------------------- 1 | kickstart-is kickstart.txt /*kickstart-is* 2 | kickstart-is-not kickstart.txt /*kickstart-is-not* 3 | kickstart.nvim kickstart.txt /*kickstart.nvim* 4 | -------------------------------------------------------------------------------- /editor/.config/nvim/init.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | 3 | ===================================================================== 4 | ==================== READ THIS BEFORE CONTINUING ==================== 5 | ===================================================================== 6 | ======== .-----. ======== 7 | ======== .----------------------. | === | ======== 8 | ======== |.-""""""""""""""""""-.| |-----| ======== 9 | ======== || || | === | ======== 10 | ======== || KICKSTART.NVIM || |-----| ======== 11 | ======== || || | === | ======== 12 | ======== || || |-----| ======== 13 | ======== ||:Tutor || |:::::| ======== 14 | ======== |'-..................-'| |____o| ======== 15 | ======== `"")----------------(""` ___________ ======== 16 | ======== /::::::::::| |::::::::::\ \ no mouse \ ======== 17 | ======== /:::========| |==hjkl==:::\ \ required \ ======== 18 | ======== '""""""""""""' '""""""""""""' '""""""""""' ======== 19 | ======== ======== 20 | ===================================================================== 21 | ===================================================================== 22 | 23 | What is Kickstart? 24 | 25 | Kickstart.nvim is *not* a distribution. 26 | 27 | Kickstart.nvim is a starting point for your own configuration. 28 | The goal is that you can read every line of code, top-to-bottom, understand 29 | what your configuration is doing, and modify it to suit your needs. 30 | 31 | Once you've done that, you can start exploring, configuring and tinkering to 32 | make Neovim your own! That might mean leaving Kickstart just the way it is for a while 33 | or immediately breaking it into modular pieces. It's up to you! 34 | 35 | If you don't know anything about Lua, I recommend taking some time to read through 36 | a guide. One possible example which will only take 10-15 minutes: 37 | - https://learnxinyminutes.com/docs/lua/ 38 | 39 | After understanding a bit more about Lua, you can use `:help lua-guide` as a 40 | reference for how Neovim integrates Lua. 41 | - :help lua-guide 42 | - (or HTML version): https://neovim.io/doc/user/lua-guide.html 43 | 44 | Kickstart Guide: 45 | 46 | TODO: The very first thing you should do is to run the command `:Tutor` in Neovim. 47 | 48 | If you don't know what this means, type the following: 49 | - 50 | - : 51 | - Tutor 52 | - 53 | 54 | (If you already know the Neovim basics, you can skip this step.) 55 | 56 | Once you've completed that, you can continue working through **AND READING** the rest 57 | of the kickstart init.lua. 58 | 59 | Next, run AND READ `:help`. 60 | This will open up a help window with some basic information 61 | about reading, navigating and searching the builtin help documentation. 62 | 63 | This should be the first place you go to look when you're stuck or confused 64 | with something. It's one of my favorite Neovim features. 65 | 66 | MOST IMPORTANTLY, we provide a keymap "sh" to [s]earch the [h]elp documentation, 67 | which is very useful when you're not exactly sure of what you're looking for. 68 | 69 | I have left several `:help X` comments throughout the init.lua 70 | These are hints about where to find more information about the relevant settings, 71 | plugins or Neovim features used in Kickstart. 72 | 73 | NOTE: Look for lines like this 74 | 75 | Throughout the file. These are for you, the reader, to help you understand what is happening. 76 | Feel free to delete them once you know what you're doing, but they should serve as a guide 77 | for when you are first encountering a few different constructs in your Neovim config. 78 | 79 | If you experience any errors while trying to install kickstart, run `:checkhealth` for more info. 80 | 81 | I hope you enjoy your Neovim journey, 82 | - TJ 83 | 84 | P.S. You can delete this when you're done too. It's your config now! :) 85 | --]] 86 | 87 | -- Set as the leader key 88 | -- See `:help mapleader` 89 | -- NOTE: Must happen before plugins are loaded (otherwise wrong leader will be used) 90 | vim.g.mapleader = " " 91 | vim.g.maplocalleader = " " 92 | 93 | -- Set to true if you have a Nerd Font installed and selected in the terminal 94 | vim.g.have_nerd_font = false 95 | 96 | -- [[ Setting options ]] 97 | -- See `:help vim.opt` 98 | -- NOTE: You can change these options as you wish! 99 | -- For more options, you can see `:help option-list` 100 | 101 | -- Make line numbers default 102 | vim.opt.number = true 103 | -- You can also add relative line numbers, to help with jumping. 104 | -- Experiment for yourself to see if you like it! 105 | -- vim.opt.relativenumber = true 106 | 107 | -- Enable mouse mode, can be useful for resizing splits for example! 108 | vim.opt.mouse = "a" 109 | 110 | -- Don't show the mode, since it's already in the status line 111 | vim.opt.showmode = false 112 | 113 | -- Sync clipboard between OS and Neovim. 114 | -- Schedule the setting after `UiEnter` because it can increase startup-time. 115 | -- Remove this option if you want your OS clipboard to remain independent. 116 | -- See `:help 'clipboard'` 117 | vim.schedule(function() 118 | vim.opt.clipboard = "unnamedplus" 119 | end) 120 | 121 | -- Enable break indent 122 | vim.opt.breakindent = true 123 | 124 | -- Save undo history 125 | vim.opt.undofile = true 126 | 127 | -- Case-insensitive searching UNLESS \C or one or more capital letters in the search term 128 | vim.opt.ignorecase = true 129 | vim.opt.smartcase = true 130 | 131 | -- Keep signcolumn on by default 132 | vim.opt.signcolumn = "yes" 133 | 134 | -- Decrease update time 135 | vim.opt.updatetime = 250 136 | 137 | -- Decrease mapped sequence wait time 138 | vim.opt.timeoutlen = 300 139 | 140 | -- Configure how new splits should be opened 141 | vim.opt.splitright = true 142 | vim.opt.splitbelow = true 143 | 144 | -- Sets how neovim will display certain whitespace characters in the editor. 145 | -- See `:help 'list'` 146 | -- and `:help 'listchars'` 147 | vim.opt.list = true 148 | vim.opt.listchars = { tab = "» ", trail = "·", nbsp = "␣" } 149 | 150 | -- Preview substitutions live, as you type! 151 | vim.opt.inccommand = "split" 152 | 153 | -- Show which line your cursor is on 154 | vim.opt.cursorline = true 155 | 156 | -- Minimal number of screen lines to keep above and below the cursor. 157 | vim.opt.scrolloff = 10 158 | 159 | -- if performing an operation that would fail due to unsaved changes in the buffer (like `:q`), 160 | -- instead raise a dialog asking if you wish to save the current file(s) 161 | -- See `:help 'confirm'` 162 | vim.opt.confirm = true 163 | 164 | vim.opt.expandtab = true -- convert tabs to spaces 165 | vim.opt.shiftwidth = 2 -- the number of spaces inserted for each indentation 166 | vim.opt.tabstop = 2 167 | 168 | vim.opt.textwidth = 80 169 | vim.opt.linebreak = true 170 | 171 | -- [[ Basic Keymaps ]] 172 | -- See `:help vim.keymap.set()` 173 | 174 | -- Press jk fast to ESC 175 | vim.keymap.set("i", "jk", "") 176 | 177 | -- Clear highlights on search when pressing in normal mode 178 | -- See `:help hlsearch` 179 | vim.keymap.set("n", "", "nohlsearch") 180 | 181 | -- Diagnostic keymaps 182 | vim.keymap.set("n", "q", vim.diagnostic.setloclist, { desc = "Open diagnostic [Q]uickfix list" }) 183 | 184 | -- Exit terminal mode in the builtin terminal with a shortcut that is a bit easier 185 | -- for people to discover. Otherwise, you normally need to press , which 186 | -- is not what someone will guess without a bit more experience. 187 | -- 188 | -- NOTE: This won't work in all terminal emulators/tmux/etc. Try your own mapping 189 | -- or just use to exit terminal mode 190 | vim.keymap.set("t", "", "", { desc = "Exit terminal mode" }) 191 | 192 | -- TIP: Disable arrow keys in normal mode 193 | -- vim.keymap.set('n', '', 'echo "Use h to move!!"') 194 | -- vim.keymap.set('n', '', 'echo "Use l to move!!"') 195 | -- vim.keymap.set('n', '', 'echo "Use k to move!!"') 196 | -- vim.keymap.set('n', '', 'echo "Use j to move!!"') 197 | 198 | -- Keybinds to make split navigation easier. 199 | -- Use CTRL+ to switch between windows 200 | -- 201 | -- See `:help wincmd` for a list of all window commands 202 | vim.keymap.set("n", "", "", { desc = "Move focus to the left window" }) 203 | vim.keymap.set("n", "", "", { desc = "Move focus to the right window" }) 204 | vim.keymap.set("n", "", "", { desc = "Move focus to the lower window" }) 205 | vim.keymap.set("n", "", "", { desc = "Move focus to the upper window" }) 206 | 207 | -- NOTE: Some terminals have coliding keymaps or are not able to send distinct keycodes 208 | -- vim.keymap.set("n", "", "H", { desc = "Move window to the left" }) 209 | -- vim.keymap.set("n", "", "L", { desc = "Move window to the right" }) 210 | -- vim.keymap.set("n", "", "J", { desc = "Move window to the lower" }) 211 | -- vim.keymap.set("n", "", "K", { desc = "Move window to the upper" }) 212 | 213 | -- [[ Basic Autocommands ]] 214 | -- See `:help lua-guide-autocommands` 215 | 216 | -- Highlight when yanking (copying) text 217 | -- Try it with `yap` in normal mode 218 | -- See `:help vim.highlight.on_yank()` 219 | vim.api.nvim_create_autocmd("TextYankPost", { 220 | desc = "Highlight when yanking (copying) text", 221 | group = vim.api.nvim_create_augroup("kickstart-highlight-yank", { clear = true }), 222 | callback = function() 223 | vim.highlight.on_yank() 224 | end, 225 | }) 226 | 227 | -- [[ Install `lazy.nvim` plugin manager ]] 228 | -- See `:help lazy.nvim.txt` or https://github.com/folke/lazy.nvim for more info 229 | local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" 230 | if not (vim.uv or vim.loop).fs_stat(lazypath) then 231 | local lazyrepo = "https://github.com/folke/lazy.nvim.git" 232 | local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) 233 | if vim.v.shell_error ~= 0 then 234 | error("Error cloning lazy.nvim:\n" .. out) 235 | end 236 | end ---@diagnostic disable-next-line: undefined-field 237 | vim.opt.rtp:prepend(lazypath) 238 | 239 | -- [[ Configure and install plugins ]] 240 | -- 241 | -- To check the current status of your plugins, run 242 | -- :Lazy 243 | -- 244 | -- You can press `?` in this menu for help. Use `:q` to close the window 245 | -- 246 | -- To update plugins you can run 247 | -- :Lazy update 248 | -- 249 | -- NOTE: Here is where you install your plugins. 250 | require("lazy").setup({ 251 | -- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link). 252 | "tpope/vim-sleuth", -- Detect tabstop and shiftwidth automatically 253 | 254 | -- NOTE: Plugins can also be added by using a table, 255 | -- with the first argument being the link and the following 256 | -- keys can be used to configure plugin behavior/loading/etc. 257 | -- 258 | -- Use `opts = {}` to automatically pass options to a plugin's `setup()` function, forcing the plugin to be loaded. 259 | -- 260 | 261 | -- Alternatively, use `config = function() ... end` for full control over the configuration. 262 | -- If you prefer to call `setup` explicitly, use: 263 | -- { 264 | -- 'lewis6991/gitsigns.nvim', 265 | -- config = function() 266 | -- require('gitsigns').setup({ 267 | -- -- Your gitsigns configuration here 268 | -- }) 269 | -- end, 270 | -- } 271 | -- 272 | -- Here is a more advanced example where we pass configuration 273 | -- options to `gitsigns.nvim`. 274 | -- 275 | -- See `:help gitsigns` to understand what the configuration keys do 276 | { -- Adds git related signs to the gutter, as well as utilities for managing changes 277 | "lewis6991/gitsigns.nvim", 278 | opts = { 279 | signs = { 280 | add = { text = "+" }, 281 | change = { text = "~" }, 282 | delete = { text = "_" }, 283 | topdelete = { text = "‾" }, 284 | changedelete = { text = "~" }, 285 | }, 286 | on_attach = function(bufnr) 287 | local gitsigns = require("gitsigns") 288 | local function map(mode, l, r, opts) 289 | opts = opts or {} 290 | opts.buffer = bufnr 291 | vim.keymap.set(mode, l, r, opts) 292 | end 293 | 294 | -- Navigation 295 | map("n", "]c", function() 296 | if vim.wo.diff then 297 | vim.cmd.normal({ "]c", bang = true }) 298 | else 299 | gitsigns.nav_hunk("next") 300 | end 301 | end) 302 | 303 | map("n", "[c", function() 304 | if vim.wo.diff then 305 | vim.cmd.normal({ "[c", bang = true }) 306 | else 307 | gitsigns.nav_hunk("prev") 308 | end 309 | end) 310 | 311 | -- Actions 312 | map("n", "hs", gitsigns.stage_hunk, { desc = "Git: [H]unk [S]tage" }) 313 | map("n", "hr", gitsigns.reset_hunk, { desc = "Git: [H]unk [R]eset" }) 314 | 315 | map("v", "hs", function() 316 | gitsigns.stage_hunk({ vim.fn.line("."), vim.fn.line("v") }) 317 | end, { desc = "Git: [H]unk [S]tage" }) 318 | 319 | map("v", "hr", function() 320 | gitsigns.reset_hunk({ vim.fn.line("."), vim.fn.line("v") }) 321 | end, { desc = "Git: [H]unk [R]eset" }) 322 | 323 | map("n", "hS", gitsigns.stage_buffer, { desc = "Git: [H]unk [S]tage buffer" }) 324 | map("n", "hR", gitsigns.reset_buffer, { desc = "Git: [H]unk [R]eset buffer" }) 325 | map("n", "hp", gitsigns.preview_hunk, { desc = "Git: [H]unk [P]review" }) 326 | map("n", "hi", gitsigns.preview_hunk_inline, { desc = "Git: [H]unk [I]nline preview" }) 327 | 328 | map("n", "hb", function() 329 | gitsigns.blame_line({ full = true }) 330 | end, { desc = "Git: [H]unk [B]lame" }) 331 | 332 | map("n", "hd", gitsigns.diffthis, { desc = "Git: [H]unk [D]iff this" }) 333 | 334 | map("n", "hD", function() 335 | gitsigns.diffthis("~") 336 | end) 337 | 338 | map("n", "hQ", function() 339 | gitsigns.setqflist("all") 340 | end) 341 | map("n", "hq", gitsigns.setqflist) 342 | 343 | -- Toggles 344 | map("n", "tb", gitsigns.toggle_current_line_blame, { desc = "Git: [T]oggle [B]lame" }) 345 | map("n", "tw", gitsigns.toggle_word_diff, { desc = "Git: [T]oggle [W]ord diff" }) 346 | 347 | -- Text object 348 | map({ "o", "x" }, "ih", gitsigns.select_hunk) 349 | 350 | -- Add keymap to open the blame's commit on Github 351 | vim.keymap.set("n", "hu", function() 352 | local bcache = require("gitsigns.cache").cache[bufnr] 353 | if not bcache then 354 | vim.notify("Buffer is not attached to Gitsigns", vim.log.levels.WARN) 355 | return 356 | end 357 | 358 | local commit_info 359 | 360 | -- Check if blame info is already available 361 | if vim.b[bufnr].gitsigns_blame_line_dict then 362 | commit_info = vim.b[bufnr].gitsigns_blame_line_dict 363 | else 364 | -- Run blame on the current line 365 | local async = require("gitsigns.async") 366 | local task = async.arun(function() 367 | local current_line = vim.api.nvim_win_get_cursor(0)[1] 368 | local blame_info = bcache:get_blame(current_line) 369 | return blame_info 370 | end) 371 | 372 | local blame = task:wait() 373 | if not blame then 374 | vim.notify("Could not get blame information", vim.log.levels.WARN) 375 | return 376 | end 377 | 378 | commit_info = blame.commit 379 | end 380 | 381 | if not commit_info or not commit_info.abbrev_sha then 382 | vim.notify("No commit information available", vim.log.levels.WARN) 383 | return 384 | end 385 | 386 | -- Skip for uncommitted changes 387 | if commit_info.abbrev_sha == string.rep("0", 8) then 388 | vim.notify("Changes not committed yet", vim.log.levels.INFO) 389 | return 390 | end 391 | 392 | local remote_url = vim.fn.system("git config --get remote.origin.url"):gsub("\n", "") 393 | local github_url = remote_url:gsub("git@github.com:", "https://github.com/"):gsub("%.git$", "") 394 | local commit_url = github_url .. "/commit/" .. commit_info.abbrev_sha 395 | 396 | -- Open URL based on OS 397 | if vim.fn.has("mac") == 1 then 398 | -- System is mac, but SSH connection is active. This likely means we 399 | -- can't directly open the webpage, so let's show the URL instead. 400 | local env = vim.fn.environ() 401 | if env.SSH_CLIENT or env.SSH_CONNECTION then 402 | vim.notify("Last modified commit URL: " .. commit_url, vim.log.levels.INFO) 403 | else 404 | vim.fn.system({ "open", commit_url }) 405 | end 406 | elseif vim.fn.has("unix") == 1 then 407 | vim.fn.system({ "xdg-open", commit_url }) 408 | end 409 | end, { desc = "Git: [H]unk open blame commit [U]RL" }) 410 | end, 411 | }, 412 | }, 413 | 414 | -- NOTE: Plugins can also be configured to run Lua code when they are loaded. 415 | -- 416 | -- This is often very useful to both group configuration, as well as handle 417 | -- lazy loading plugins that don't need to be loaded immediately at startup. 418 | -- 419 | -- For example, in the following configuration, we use: 420 | -- event = 'VimEnter' 421 | -- 422 | -- which loads which-key before all the UI elements are loaded. Events can be 423 | -- normal autocommands events (`:help autocmd-events`). 424 | -- 425 | -- Then, because we use the `opts` key (recommended), the configuration runs 426 | -- after the plugin has been loaded as `require(MODULE).setup(opts)`. 427 | 428 | { -- Useful plugin to show you pending keybinds. 429 | "folke/which-key.nvim", 430 | event = "VimEnter", -- Sets the loading event to 'VimEnter' 431 | opts = { 432 | -- delay between pressing a key and opening which-key (milliseconds) 433 | -- this setting is independent of vim.opt.timeoutlen 434 | delay = 300, 435 | icons = { 436 | -- set icon mappings to true if you have a Nerd Font 437 | mappings = vim.g.have_nerd_font, 438 | -- If you are using a Nerd Font: set icons.keys to an empty table which will use the 439 | -- default which-key.nvim defined Nerd Font icons, otherwise define a string table 440 | keys = vim.g.have_nerd_font and {} or { 441 | Up = " ", 442 | Down = " ", 443 | Left = " ", 444 | Right = " ", 445 | C = " ", 446 | M = " ", 447 | D = " ", 448 | S = " ", 449 | CR = " ", 450 | Esc = " ", 451 | ScrollWheelDown = " ", 452 | ScrollWheelUp = " ", 453 | NL = " ", 454 | BS = " ", 455 | Space = " ", 456 | Tab = " ", 457 | F1 = "", 458 | F2 = "", 459 | F3 = "", 460 | F4 = "", 461 | F5 = "", 462 | F6 = "", 463 | F7 = "", 464 | F8 = "", 465 | F9 = "", 466 | F10 = "", 467 | F11 = "", 468 | F12 = "", 469 | }, 470 | }, 471 | 472 | -- Document existing key chains 473 | spec = { 474 | { "c", group = "[C]ode", mode = { "n", "x" } }, 475 | { "d", group = "[D]ocument" }, 476 | { "r", group = "[R]ename" }, 477 | { "s", group = "[S]earch" }, 478 | { "w", group = "[W]orkspace" }, 479 | { "t", group = "[T]oggle" }, 480 | { "h", group = "Git [H]unk", mode = { "n", "v" } }, 481 | }, 482 | }, 483 | keys = { 484 | { 485 | "?", 486 | function() 487 | require("which-key").show({ global = false }) 488 | end, 489 | desc = "Buffer Local Keymaps (which-key)", 490 | }, 491 | }, 492 | }, 493 | 494 | -- NOTE: Plugins can specify dependencies. 495 | -- 496 | -- The dependencies are proper plugin specifications as well - anything 497 | -- you do for a plugin at the top level, you can do for a dependency. 498 | -- 499 | -- Use the `dependencies` key to specify the dependencies of a particular plugin 500 | 501 | { -- Fuzzy Finder (files, lsp, etc) 502 | "nvim-telescope/telescope.nvim", 503 | event = "VimEnter", 504 | branch = "0.1.x", 505 | dependencies = { 506 | "nvim-lua/plenary.nvim", 507 | { -- If encountering errors, see telescope-fzf-native README for installation instructions 508 | "nvim-telescope/telescope-fzf-native.nvim", 509 | 510 | -- `build` is used to run some command when the plugin is installed/updated. 511 | -- This is only run then, not every time Neovim starts up. 512 | build = "make", 513 | 514 | -- `cond` is a condition used to determine whether this plugin should be 515 | -- installed and loaded. 516 | cond = function() 517 | return vim.fn.executable("make") == 1 518 | end, 519 | }, 520 | { "nvim-telescope/telescope-ui-select.nvim" }, 521 | 522 | -- Useful for getting pretty icons, but requires a Nerd Font. 523 | { "nvim-tree/nvim-web-devicons", enabled = vim.g.have_nerd_font }, 524 | }, 525 | config = function() 526 | -- Telescope is a fuzzy finder that comes with a lot of different things that 527 | -- it can fuzzy find! It's more than just a "file finder", it can search 528 | -- many different aspects of Neovim, your workspace, LSP, and more! 529 | -- 530 | -- The easiest way to use Telescope, is to start by doing something like: 531 | -- :Telescope help_tags 532 | -- 533 | -- After running this command, a window will open up and you're able to 534 | -- type in the prompt window. You'll see a list of `help_tags` options and 535 | -- a corresponding preview of the help. 536 | -- 537 | -- Two important keymaps to use while in Telescope are: 538 | -- - Insert mode: 539 | -- - Normal mode: ? 540 | -- 541 | -- This opens a window that shows you all of the keymaps for the current 542 | -- Telescope picker. This is really useful to discover what Telescope can 543 | -- do as well as how to actually do it! 544 | 545 | -- [[ Configure Telescope ]] 546 | -- See `:help telescope` and `:help telescope.setup()` 547 | require("telescope").setup({ 548 | -- You can put your default mappings / updates / etc. in here 549 | -- All the info you're looking for is in `:help telescope.setup()` 550 | defaults = { 551 | path_display = { "absolute" }, 552 | file_ignore_patterns = { ".git/", "node_modules" }, 553 | mappings = { 554 | i = { [""] = "to_fuzzy_refine" }, 555 | }, 556 | }, 557 | -- pickers = {} 558 | extensions = { 559 | ["ui-select"] = { 560 | require("telescope.themes").get_dropdown(), 561 | }, 562 | }, 563 | }) 564 | 565 | -- Enable Telescope extensions if they are installed 566 | pcall(require("telescope").load_extension, "fzf") 567 | pcall(require("telescope").load_extension, "ui-select") 568 | 569 | -- See `:help telescope.builtin` 570 | local builtin = require("telescope.builtin") 571 | vim.keymap.set("n", "sh", builtin.help_tags, { desc = "[S]earch [H]elp" }) 572 | vim.keymap.set("n", "sk", builtin.keymaps, { desc = "[S]earch [K]eymaps" }) 573 | vim.keymap.set("n", "", builtin.find_files, { desc = "[S]earch [F]iles" }) 574 | vim.keymap.set("n", "ss", builtin.builtin, { desc = "[S]earch [S]elect Telescope" }) 575 | vim.keymap.set("n", "sw", builtin.grep_string, { desc = "[S]earch current [W]ord" }) 576 | vim.keymap.set("n", "sg", builtin.live_grep, { desc = "[S]earch by [G]rep" }) 577 | vim.keymap.set("n", "sd", builtin.diagnostics, { desc = "[S]earch [D]iagnostics" }) 578 | vim.keymap.set("n", "sr", builtin.resume, { desc = "[S]earch [R]esume" }) 579 | vim.keymap.set("n", "s.", builtin.oldfiles, { desc = '[S]earch Recent Files ("." for repeat)' }) 580 | vim.keymap.set("n", ";", builtin.buffers, { desc = "[;] Find existing buffers" }) 581 | vim.keymap.set("n", "", "", { desc = "[ ] Jump to last buffer" }) 582 | 583 | -- Slightly advanced example of overriding default behavior and theme 584 | -- vim.keymap.set("n", "/", function() 585 | -- -- You can pass additional configuration to Telescope to change the theme, layout, etc. 586 | -- builtin.current_buffer_fuzzy_find(require("telescope.themes").get_dropdown({ 587 | -- winblend = 10, 588 | -- previewer = false, 589 | -- })) 590 | -- end, { desc = "[/] Fuzzily search in current buffer" }) 591 | 592 | -- It's also possible to pass additional configuration options. 593 | -- See `:help telescope.builtin.live_grep()` for information about particular keys 594 | vim.keymap.set("n", "s/", function() 595 | builtin.live_grep({ 596 | grep_open_files = true, 597 | prompt_title = "Live Grep in Open Files", 598 | }) 599 | end, { desc = "[S]earch [/] in Open Files" }) 600 | 601 | -- Shortcut for searching your Neovim configuration files 602 | vim.keymap.set("n", "sn", function() 603 | builtin.find_files({ cwd = vim.fn.stdpath("config") }) 604 | end, { desc = "[S]earch [N]eovim files" }) 605 | end, 606 | }, 607 | 608 | -- LSP Plugins 609 | { 610 | -- `lazydev` configures Lua LSP for your Neovim config, runtime and plugins 611 | -- used for completion, annotations and signatures of Neovim apis 612 | "folke/lazydev.nvim", 613 | ft = "lua", 614 | opts = { 615 | library = { 616 | -- Load luvit types when the `vim.uv` word is found 617 | { path = "${3rd}/luv/library", words = { "vim%.uv" } }, 618 | }, 619 | }, 620 | }, 621 | { 622 | -- Main LSP Configuration 623 | "neovim/nvim-lspconfig", 624 | dependencies = { 625 | -- Automatically install LSPs and related tools to stdpath for Neovim 626 | -- Mason must be loaded before its dependents so we need to set it up here. 627 | -- NOTE: `opts = {}` is the same as calling `require('mason').setup({})` 628 | { "williamboman/mason.nvim", opts = {} }, 629 | "williamboman/mason-lspconfig.nvim", 630 | "WhoIsSethDaniel/mason-tool-installer.nvim", 631 | 632 | -- Useful status updates for LSP. 633 | { "j-hui/fidget.nvim", opts = {} }, 634 | 635 | -- Allows extra capabilities provided by nvim-cmp 636 | "hrsh7th/cmp-nvim-lsp", 637 | }, 638 | config = function() 639 | -- Brief aside: **What is LSP?** 640 | -- 641 | -- LSP is an initialism you've probably heard, but might not understand what it is. 642 | -- 643 | -- LSP stands for Language Server Protocol. It's a protocol that helps editors 644 | -- and language tooling communicate in a standardized fashion. 645 | -- 646 | -- In general, you have a "server" which is some tool built to understand a particular 647 | -- language (such as `gopls`, `lua_ls`, `rust_analyzer`, etc.). These Language Servers 648 | -- (sometimes called LSP servers, but that's kind of like ATM Machine) are standalone 649 | -- processes that communicate with some "client" - in this case, Neovim! 650 | -- 651 | -- LSP provides Neovim with features like: 652 | -- - Go to definition 653 | -- - Find references 654 | -- - Autocompletion 655 | -- - Symbol Search 656 | -- - and more! 657 | -- 658 | -- Thus, Language Servers are external tools that must be installed separately from 659 | -- Neovim. This is where `mason` and related plugins come into play. 660 | -- 661 | -- If you're wondering about lsp vs treesitter, you can check out the wonderfully 662 | -- and elegantly composed help section, `:help lsp-vs-treesitter` 663 | 664 | -- This function gets run when an LSP attaches to a particular buffer. 665 | -- That is to say, every time a new file is opened that is associated with 666 | -- an lsp (for example, opening `main.rs` is associated with `rust_analyzer`) this 667 | -- function will be executed to configure the current buffer 668 | vim.api.nvim_create_autocmd("LspAttach", { 669 | group = vim.api.nvim_create_augroup("kickstart-lsp-attach", { clear = true }), 670 | callback = function(event) 671 | -- NOTE: Remember that Lua is a real programming language, and as such it is possible 672 | -- to define small helper and utility functions so you don't have to repeat yourself. 673 | -- 674 | -- In this case, we create a function that lets us more easily define mappings specific 675 | -- for LSP related items. It sets the mode, buffer and description for us each time. 676 | local map = function(keys, func, desc, mode) 677 | mode = mode or "n" 678 | vim.keymap.set(mode, keys, func, { buffer = event.buf, desc = "LSP: " .. desc }) 679 | end 680 | 681 | -- Jump to the definition of the word under your cursor. 682 | -- This is where a variable was first declared, or where a function is defined, etc. 683 | -- To jump back, press . 684 | map("gd", require("telescope.builtin").lsp_definitions, "[G]oto [D]efinition") 685 | 686 | -- Find references for the word under your cursor. 687 | map("gr", require("telescope.builtin").lsp_references, "[G]oto [R]eferences") 688 | 689 | -- Jump to the implementation of the word under your cursor. 690 | -- Useful when your language has ways of declaring types without an actual implementation. 691 | map("gI", require("telescope.builtin").lsp_implementations, "[G]oto [I]mplementation") 692 | 693 | -- Jump to the type of the word under your cursor. 694 | -- Useful when you're not sure what type a variable is and you want to see 695 | -- the definition of its *type*, not where it was *defined*. 696 | map("D", require("telescope.builtin").lsp_type_definitions, "Type [D]efinition") 697 | 698 | -- Fuzzy find all the symbols in your current document. 699 | -- Symbols are things like variables, functions, types, etc. 700 | map("ds", require("telescope.builtin").lsp_document_symbols, "[D]ocument [S]ymbols") 701 | 702 | -- Fuzzy find all the symbols in your current workspace. 703 | -- Similar to document symbols, except searches over your entire project. 704 | map( 705 | "ws", 706 | require("telescope.builtin").lsp_dynamic_workspace_symbols, 707 | "[W]orkspace [S]ymbols" 708 | ) 709 | 710 | -- Rename the variable under your cursor. 711 | -- Most Language Servers support renaming across files, etc. 712 | map("rn", vim.lsp.buf.rename, "[R]e[n]ame") 713 | 714 | -- Execute a code action, usually your cursor needs to be on top of an error 715 | -- or a suggestion from your LSP for this to activate. 716 | map("ca", vim.lsp.buf.code_action, "[C]ode [A]ction", { "n", "x" }) 717 | 718 | -- WARN: This is not Goto Definition, this is Goto Declaration. 719 | -- For example, in C this would take you to the header. 720 | map("gD", vim.lsp.buf.declaration, "[G]oto [D]eclaration") 721 | 722 | -- This function resolves a difference between neovim nightly (version 0.11) and stable (version 0.10) 723 | ---@param client vim.lsp.Client 724 | ---@param method vim.lsp.protocol.Method 725 | ---@param bufnr? integer some lsp support methods only in specific files 726 | ---@return boolean 727 | local function client_supports_method(client, method, bufnr) 728 | if vim.fn.has("nvim-0.11") == 1 then 729 | return client:supports_method(method, bufnr) 730 | else 731 | return client.supports_method(method, { bufnr = bufnr }) 732 | end 733 | end 734 | 735 | -- The following two autocommands are used to highlight references of the 736 | -- word under your cursor when your cursor rests there for a little while. 737 | -- See `:help CursorHold` for information about when this is executed 738 | -- 739 | -- When you move your cursor, the highlights will be cleared (the second autocommand). 740 | local client = vim.lsp.get_client_by_id(event.data.client_id) 741 | if 742 | client 743 | and client_supports_method( 744 | client, 745 | vim.lsp.protocol.Methods.textDocument_documentHighlight, 746 | event.buf 747 | ) 748 | then 749 | local highlight_augroup = 750 | vim.api.nvim_create_augroup("kickstart-lsp-highlight", { clear = false }) 751 | vim.api.nvim_create_autocmd({ "CursorHold", "CursorHoldI" }, { 752 | buffer = event.buf, 753 | group = highlight_augroup, 754 | callback = vim.lsp.buf.document_highlight, 755 | }) 756 | 757 | vim.api.nvim_create_autocmd({ "CursorMoved", "CursorMovedI" }, { 758 | buffer = event.buf, 759 | group = highlight_augroup, 760 | callback = vim.lsp.buf.clear_references, 761 | }) 762 | 763 | vim.api.nvim_create_autocmd("LspDetach", { 764 | group = vim.api.nvim_create_augroup("kickstart-lsp-detach", { clear = true }), 765 | callback = function(event2) 766 | vim.lsp.buf.clear_references() 767 | vim.api.nvim_clear_autocmds({ group = "kickstart-lsp-highlight", buffer = event2.buf }) 768 | end, 769 | }) 770 | end 771 | 772 | -- The following code creates a keymap to toggle inlay hints in your 773 | -- code, if the language server you are using supports them 774 | -- 775 | -- This may be unwanted, since they displace some of your code 776 | if 777 | client 778 | and client_supports_method(client, vim.lsp.protocol.Methods.textDocument_inlayHint, event.buf) 779 | then 780 | map("th", function() 781 | vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled({ bufnr = event.buf })) 782 | end, "[T]oggle Inlay [H]ints") 783 | end 784 | end, 785 | }) 786 | 787 | -- Diagnostic Config 788 | -- See :help vim.diagnostic.Opts 789 | vim.diagnostic.config({ 790 | severity_sort = true, 791 | float = { border = "rounded", source = "if_many" }, 792 | underline = { severity = vim.diagnostic.severity.ERROR }, 793 | signs = vim.g.have_nerd_font and { 794 | text = { 795 | [vim.diagnostic.severity.ERROR] = "󰅚 ", 796 | [vim.diagnostic.severity.WARN] = "󰀪 ", 797 | [vim.diagnostic.severity.INFO] = "󰋽 ", 798 | [vim.diagnostic.severity.HINT] = "󰌶 ", 799 | }, 800 | } or {}, 801 | virtual_text = { 802 | source = "if_many", 803 | spacing = 2, 804 | format = function(diagnostic) 805 | local diagnostic_message = { 806 | [vim.diagnostic.severity.ERROR] = diagnostic.message, 807 | [vim.diagnostic.severity.WARN] = diagnostic.message, 808 | [vim.diagnostic.severity.INFO] = diagnostic.message, 809 | [vim.diagnostic.severity.HINT] = diagnostic.message, 810 | } 811 | return diagnostic_message[diagnostic.severity] 812 | end, 813 | }, 814 | }) 815 | 816 | -- LSP servers and clients are able to communicate to each other what features they support. 817 | -- By default, Neovim doesn't support everything that is in the LSP specification. 818 | -- When you add nvim-cmp, luasnip, etc. Neovim now has *more* capabilities. 819 | -- So, we create new capabilities with nvim cmp, and then broadcast that to the servers. 820 | local capabilities = vim.lsp.protocol.make_client_capabilities() 821 | capabilities = vim.tbl_deep_extend("force", capabilities, require("cmp_nvim_lsp").default_capabilities()) 822 | 823 | -- Enable the following language servers 824 | -- Feel free to add/remove any LSPs that you want here. They will automatically be installed. 825 | -- 826 | -- Add any additional override configuration in the following tables. Available keys are: 827 | -- - cmd (table): Override the default command used to start the server 828 | -- - filetypes (table): Override the default list of associated filetypes for the server 829 | -- - capabilities (table): Override fields in capabilities. Can be used to disable certain LSP features. 830 | -- - settings (table): Override the default settings passed when initializing the server. 831 | -- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/ 832 | local servers = { 833 | -- clangd = {}, 834 | gopls = {}, 835 | -- pyright = {}, 836 | -- rust_analyzer = {}, 837 | -- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs 838 | -- 839 | -- Some languages (like typescript) have entire language plugins that can be useful: 840 | -- https://github.com/pmizio/typescript-tools.nvim 841 | -- 842 | -- But for many setups, the LSP (`ts_ls`) will work just fine 843 | -- ts_ls = {}, 844 | -- 845 | 846 | lua_ls = { 847 | -- cmd = { ... }, 848 | -- filetypes = { ... }, 849 | -- capabilities = {}, 850 | settings = { 851 | Lua = { 852 | completion = { 853 | callSnippet = "Replace", 854 | }, 855 | -- You can toggle below to ignore Lua_LS's noisy `missing-fields` warnings 856 | -- diagnostics = { disable = { 'missing-fields' } }, 857 | }, 858 | }, 859 | }, 860 | } 861 | 862 | -- Ensure the servers and tools above are installed 863 | -- 864 | -- To check the current status of installed tools and/or manually install 865 | -- other tools, you can run 866 | -- :Mason 867 | -- 868 | -- You can press `g?` for help in this menu. 869 | -- 870 | -- `mason` had to be setup earlier: to configure its options see the 871 | -- `dependencies` table for `nvim-lspconfig` above. 872 | -- 873 | -- You can add other tools here that you want Mason to install 874 | -- for you, so that they are available from within Neovim. 875 | local ensure_installed = vim.tbl_keys(servers or {}) 876 | vim.list_extend(ensure_installed, { 877 | "stylua", -- Used to format Lua code 878 | }) 879 | require("mason-tool-installer").setup({ ensure_installed = ensure_installed }) 880 | 881 | require("mason-lspconfig").setup({ 882 | ensure_installed = {}, -- explicitly set to an empty table (Kickstart populates installs via mason-tool-installer) 883 | automatic_installation = false, 884 | handlers = { 885 | function(server_name) 886 | local server = servers[server_name] or {} 887 | -- This handles overriding only values explicitly passed 888 | -- by the server configuration above. Useful when disabling 889 | -- certain features of an LSP (for example, turning off formatting for ts_ls) 890 | server.capabilities = vim.tbl_deep_extend("force", {}, capabilities, server.capabilities or {}) 891 | require("lspconfig")[server_name].setup(server) 892 | end, 893 | }, 894 | }) 895 | end, 896 | }, 897 | 898 | { -- Autoformat 899 | "stevearc/conform.nvim", 900 | event = { "BufWritePre" }, 901 | cmd = { "ConformInfo" }, 902 | keys = { 903 | { 904 | "f", 905 | function() 906 | require("conform").format({ async = true, lsp_format = "fallback" }) 907 | end, 908 | mode = "", 909 | desc = "[F]ormat buffer", 910 | }, 911 | }, 912 | opts = { 913 | notify_on_error = false, 914 | format_on_save = function(bufnr) 915 | -- Disable "format_on_save lsp_fallback" for languages that don't 916 | -- have a well standardized coding style. You can add additional 917 | -- languages here or re-enable it for the disabled ones. 918 | local disable_filetypes = { c = true, cpp = true } 919 | if disable_filetypes[vim.bo[bufnr].filetype] then 920 | return nil 921 | else 922 | return { 923 | timeout_ms = 500, 924 | lsp_format = "fallback", 925 | } 926 | end 927 | end, 928 | formatters_by_ft = { 929 | lua = { "stylua" }, 930 | -- Conform can also run multiple formatters sequentially 931 | -- python = { "isort", "black" }, 932 | -- 933 | -- You can use 'stop_after_first' to run the first available formatter from the list 934 | -- javascript = { "prettierd", "prettier", stop_after_first = true }, 935 | }, 936 | }, 937 | }, 938 | 939 | { -- Autocompletion 940 | "hrsh7th/nvim-cmp", 941 | event = "InsertEnter", 942 | dependencies = { 943 | -- Snippet Engine & its associated nvim-cmp source 944 | { 945 | "L3MON4D3/LuaSnip", 946 | build = (function() 947 | -- Build Step is needed for regex support in snippets. 948 | -- This step is not supported in many windows environments. 949 | -- Remove the below condition to re-enable on windows. 950 | if vim.fn.has("win32") == 1 or vim.fn.executable("make") == 0 then 951 | return 952 | end 953 | return "make install_jsregexp" 954 | end)(), 955 | dependencies = { 956 | -- `friendly-snippets` contains a variety of premade snippets. 957 | -- See the README about individual language/framework/plugin snippets: 958 | -- https://github.com/rafamadriz/friendly-snippets 959 | -- { 960 | -- 'rafamadriz/friendly-snippets', 961 | -- config = function() 962 | -- require('luasnip.loaders.from_vscode').lazy_load() 963 | -- end, 964 | -- }, 965 | }, 966 | }, 967 | "saadparwaiz1/cmp_luasnip", 968 | 969 | -- Adds other completion capabilities. 970 | -- nvim-cmp does not ship with all sources by default. They are split 971 | -- into multiple repos for maintenance purposes. 972 | "hrsh7th/cmp-nvim-lsp", 973 | "hrsh7th/cmp-path", 974 | "hrsh7th/cmp-nvim-lsp-signature-help", 975 | }, 976 | config = function() 977 | -- See `:help cmp` 978 | local cmp = require("cmp") 979 | local luasnip = require("luasnip") 980 | luasnip.config.setup({}) 981 | 982 | cmp.setup({ 983 | snippet = { 984 | expand = function(args) 985 | luasnip.lsp_expand(args.body) 986 | end, 987 | }, 988 | completion = { completeopt = "menu,menuone,noinsert" }, 989 | 990 | -- For an understanding of why these mappings were 991 | -- chosen, you will need to read `:help ins-completion` 992 | -- 993 | -- No, but seriously. Please read `:help ins-completion`, it is really good! 994 | mapping = cmp.mapping.preset.insert({ 995 | -- Select the [n]ext item 996 | [""] = cmp.mapping.select_next_item(), 997 | -- Select the [p]revious item 998 | [""] = cmp.mapping.select_prev_item(), 999 | 1000 | -- Scroll the documentation window [b]ack / [f]orward 1001 | [""] = cmp.mapping.scroll_docs(-4), 1002 | [""] = cmp.mapping.scroll_docs(4), 1003 | 1004 | -- Accept ([y]es) the completion. 1005 | -- This will auto-import if your LSP supports it. 1006 | -- This will expand snippets if the LSP sent a snippet. 1007 | [""] = cmp.mapping.confirm({ select = true }), 1008 | 1009 | -- If you prefer more traditional completion keymaps, 1010 | -- you can uncomment the following lines 1011 | --[''] = cmp.mapping.confirm { select = true }, 1012 | --[''] = cmp.mapping.select_next_item(), 1013 | --[''] = cmp.mapping.select_prev_item(), 1014 | 1015 | -- Manually trigger a completion from nvim-cmp. 1016 | -- Generally you don't need this, because nvim-cmp will display 1017 | -- completions whenever it has completion options available. 1018 | [""] = cmp.mapping.complete({}), 1019 | 1020 | -- Think of as moving to the right of your snippet expansion. 1021 | -- So if you have a snippet that's like: 1022 | -- function $name($args) 1023 | -- $body 1024 | -- end 1025 | -- 1026 | -- will move you to the right of each of the expansion locations. 1027 | -- is similar, except moving you backwards. 1028 | [""] = cmp.mapping(function() 1029 | if luasnip.expand_or_locally_jumpable() then 1030 | luasnip.expand_or_jump() 1031 | end 1032 | end, { "i", "s" }), 1033 | [""] = cmp.mapping(function() 1034 | if luasnip.locally_jumpable(-1) then 1035 | luasnip.jump(-1) 1036 | end 1037 | end, { "i", "s" }), 1038 | 1039 | -- For more advanced Luasnip keymaps (e.g. selecting choice nodes, expansion) see: 1040 | -- https://github.com/L3MON4D3/LuaSnip?tab=readme-ov-file#keymaps 1041 | }), 1042 | sources = { 1043 | { 1044 | name = "lazydev", 1045 | -- set group index to 0 to skip loading LuaLS completions as lazydev recommends it 1046 | group_index = 0, 1047 | }, 1048 | { name = "nvim_lsp" }, 1049 | { name = "luasnip" }, 1050 | { name = "path" }, 1051 | { name = "nvim_lsp_signature_help" }, 1052 | }, 1053 | }) 1054 | end, 1055 | }, 1056 | 1057 | { -- You can easily change to a different colorscheme. 1058 | -- Change the name of the colorscheme plugin below, and then 1059 | -- change the command in the config to whatever the name of that colorscheme is. 1060 | -- 1061 | -- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`. 1062 | "folke/tokyonight.nvim", 1063 | priority = 1000, -- Make sure to load this before all the other start plugins. 1064 | config = function() 1065 | ---@diagnostic disable-next-line: missing-fields 1066 | require("tokyonight").setup({ 1067 | styles = { 1068 | comments = { italic = false }, -- Disable italics in comments 1069 | }, 1070 | }) 1071 | 1072 | -- Load the colorscheme here. 1073 | -- Like many other themes, this one has different styles, and you could load 1074 | -- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'. 1075 | vim.cmd.colorscheme("tokyonight-night") 1076 | end, 1077 | }, 1078 | 1079 | -- Highlight todo, notes, etc in comments 1080 | { 1081 | "folke/todo-comments.nvim", 1082 | event = "VimEnter", 1083 | dependencies = { "nvim-lua/plenary.nvim" }, 1084 | opts = { signs = false }, 1085 | }, 1086 | 1087 | { -- Collection of various small independent plugins/modules 1088 | "echasnovski/mini.nvim", 1089 | config = function() 1090 | -- Better Around/Inside textobjects 1091 | -- 1092 | -- Examples: 1093 | -- - va) - [V]isually select [A]round [)]paren 1094 | -- - yinq - [Y]ank [I]nside [N]ext [Q]uote 1095 | -- - ci' - [C]hange [I]nside [']quote 1096 | require("mini.ai").setup({ n_lines = 500 }) 1097 | 1098 | -- Add/delete/replace surroundings (brackets, quotes, etc.) 1099 | -- 1100 | -- - saiw) - [S]urround [A]dd [I]nner [W]ord [)]Paren 1101 | -- - sd' - [S]urround [D]elete [']quotes 1102 | -- - sr)' - [S]urround [R]eplace [)] ['] 1103 | require("mini.surround").setup() 1104 | 1105 | -- Simple and easy statusline. 1106 | -- You could remove this setup call if you don't like it, 1107 | -- and try some other statusline plugin 1108 | local statusline = require("mini.statusline") 1109 | -- set use_icons to true if you have a Nerd Font 1110 | statusline.setup({ use_icons = vim.g.have_nerd_font }) 1111 | 1112 | -- You can configure sections in the statusline by overriding their 1113 | -- default behavior. For example, here we set the section for 1114 | -- cursor location to LINE:COLUMN 1115 | ---@diagnostic disable-next-line: duplicate-set-field 1116 | statusline.section_location = function() 1117 | return "%2l:%-2v" 1118 | end 1119 | 1120 | -- ... and there is more! 1121 | -- Check out: https://github.com/echasnovski/mini.nvim 1122 | end, 1123 | }, 1124 | { -- Highlight, edit, and navigate code 1125 | "nvim-treesitter/nvim-treesitter", 1126 | build = ":TSUpdate", 1127 | main = "nvim-treesitter.configs", -- Sets main module to use for opts 1128 | -- [[ Configure Treesitter ]] See `:help nvim-treesitter` 1129 | opts = { 1130 | ensure_installed = { 1131 | "bash", 1132 | "c", 1133 | "diff", 1134 | "go", 1135 | "gomod", 1136 | "html", 1137 | "lua", 1138 | "luadoc", 1139 | "markdown", 1140 | "markdown_inline", 1141 | "query", 1142 | "vim", 1143 | "vimdoc", 1144 | }, 1145 | -- Autoinstall languages that are not installed 1146 | auto_install = true, 1147 | highlight = { 1148 | enable = true, 1149 | -- Some languages depend on vim's regex highlighting system (such as Ruby) for indent rules. 1150 | -- If you are experiencing weird indenting issues, add the language to 1151 | -- the list of additional_vim_regex_highlighting and disabled languages for indent. 1152 | additional_vim_regex_highlighting = { "ruby" }, 1153 | }, 1154 | indent = { enable = true, disable = { "ruby" } }, 1155 | }, 1156 | -- There are additional nvim-treesitter modules that you can use to interact 1157 | -- with nvim-treesitter. You should go explore a few and see what interests you: 1158 | -- 1159 | -- - Incremental selection: Included, see `:help nvim-treesitter-incremental-selection-mod` 1160 | -- - Show your current context: https://github.com/nvim-treesitter/nvim-treesitter-context 1161 | -- - Treesitter + textobjects: https://github.com/nvim-treesitter/nvim-treesitter-textobjects 1162 | }, 1163 | { 1164 | "numToStr/Comment.nvim", 1165 | config = function() 1166 | vim.keymap.set( 1167 | "n", 1168 | "/", 1169 | "lua require('Comment.api').toggle.linewise.current()", 1170 | { desc = "Toggle comment line" } 1171 | ) 1172 | vim.keymap.set( 1173 | "v", 1174 | "/", 1175 | "lua require('Comment.api').toggle.linewise(vim.fn.visualmode())", 1176 | { desc = "Toggle comment line" } 1177 | ) 1178 | end, 1179 | }, 1180 | { 1181 | -- Adds Cursor AI like expereince in neovim. 1182 | "yetone/avante.nvim", 1183 | event = "VeryLazy", 1184 | version = false, -- Never set this value to "*"! Never! 1185 | opts = { 1186 | -- add any opts here 1187 | -- for example 1188 | provider = "claude", 1189 | claude = { 1190 | endpoint = "https://api.anthropic.com", 1191 | model = "claude-3-5-sonnet-20241022", 1192 | timeout = 30000, -- Timeout in milliseconds 1193 | temperature = 0, 1194 | max_tokens = 4096, 1195 | disable_tools = true, -- disable tools! 1196 | }, 1197 | -- openai = { 1198 | -- endpoint = "https://api.openai.com/v1", 1199 | -- model = "gpt-4o", -- your desired model (or use gpt-4o, etc.) 1200 | -- timeout = 30000, -- Timeout in milliseconds, increase this for reasoning models 1201 | -- temperature = 0, 1202 | -- max_tokens = 8192, -- Increase this to include reasoning tokens (for reasoning models) 1203 | -- --reasoning_effort = "medium", -- low|medium|high, only used for reasoning models 1204 | -- }, 1205 | }, 1206 | -- if you want to build from source then do `make BUILD_FROM_SOURCE=true` 1207 | build = "make", 1208 | -- build = "powershell -ExecutionPolicy Bypass -File Build.ps1 -BuildFromSource false" -- for windows 1209 | dependencies = { 1210 | "nvim-treesitter/nvim-treesitter", 1211 | "stevearc/dressing.nvim", 1212 | "nvim-lua/plenary.nvim", 1213 | "MunifTanjim/nui.nvim", 1214 | --- The below dependencies are optional, 1215 | "echasnovski/mini.pick", -- for file_selector provider mini.pick 1216 | "nvim-telescope/telescope.nvim", -- for file_selector provider telescope 1217 | "hrsh7th/nvim-cmp", -- autocompletion for avante commands and mentions 1218 | "ibhagwan/fzf-lua", -- for file_selector provider fzf 1219 | "nvim-tree/nvim-web-devicons", -- or echasnovski/mini.icons 1220 | "zbirenbaum/copilot.lua", -- for providers='copilot' 1221 | { 1222 | -- support for image pasting 1223 | "HakonHarnes/img-clip.nvim", 1224 | event = "VeryLazy", 1225 | opts = { 1226 | -- recommended settings 1227 | default = { 1228 | embed_image_as_base64 = false, 1229 | prompt_for_file_name = false, 1230 | drag_and_drop = { 1231 | insert_mode = true, 1232 | }, 1233 | -- required for Windows users 1234 | use_absolute_path = true, 1235 | }, 1236 | }, 1237 | }, 1238 | { 1239 | -- Make sure to set this up properly if you have lazy=true 1240 | "MeanderingProgrammer/render-markdown.nvim", 1241 | opts = { 1242 | file_types = { "markdown", "Avante" }, 1243 | }, 1244 | ft = { "markdown", "Avante" }, 1245 | }, 1246 | }, 1247 | }, 1248 | 1249 | -- The following comments only work if you have downloaded the kickstart repo, not just copy pasted the 1250 | -- init.lua. If you want these files, they are in the repository, so you can just download them and 1251 | -- place them in the correct locations. 1252 | 1253 | -- NOTE: Next step on your Neovim journey: Add/Configure additional plugins for Kickstart 1254 | -- 1255 | -- Here are some example plugins that I've included in the Kickstart repository. 1256 | -- Uncomment any of the lines below to enable them (you will need to restart nvim). 1257 | -- 1258 | -- require 'kickstart.plugins.debug', 1259 | require("kickstart.plugins.indent_line"), 1260 | require("kickstart.plugins.lint"), 1261 | require("kickstart.plugins.autopairs"), 1262 | -- require 'kickstart.plugins.neo-tree', 1263 | -- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps 1264 | 1265 | -- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua` 1266 | -- This is the easiest way to modularize your config. 1267 | -- 1268 | -- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going. 1269 | -- { import = 'custom.plugins' }, 1270 | -- 1271 | -- For additional information with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec` 1272 | -- Or use telescope! 1273 | -- In normal mode type `sh` then write `lazy.nvim-plugin` 1274 | -- you can continue same window with `sr` which resumes last telescope search 1275 | }, { 1276 | ui = { 1277 | -- If you are using a Nerd Font: set icons to an empty table which will use the 1278 | -- default lazy.nvim defined Nerd Font icons, otherwise define a unicode icons table 1279 | icons = vim.g.have_nerd_font and {} or { 1280 | cmd = "⌘", 1281 | config = "🛠", 1282 | event = "📅", 1283 | ft = "📂", 1284 | init = "⚙", 1285 | keys = "🗝", 1286 | plugin = "🔌", 1287 | runtime = "💻", 1288 | require = "🌙", 1289 | source = "📄", 1290 | start = "🚀", 1291 | task = "📌", 1292 | lazy = "💤 ", 1293 | }, 1294 | }, 1295 | }) 1296 | 1297 | -- The line beneath this is called `modeline`. See `:help modeline` 1298 | -- vim: ts=2 sts=2 sw=2 et 1299 | -------------------------------------------------------------------------------- /editor/.config/nvim/lazy-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" }, 3 | "LuaSnip": { "branch": "master", "commit": "c9b9a22904c97d0eb69ccb9bab76037838326817" }, 4 | "avante.nvim": { "branch": "main", "commit": "89a86f0fc197ec9ffb3663a499432f8df4e4b1e5" }, 5 | "cmp-nvim-lsp": { "branch": "main", "commit": "a8912b88ce488f411177fc8aed358b04dc246d7b" }, 6 | "cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "031e6ba70b0ad5eee49fd2120ff7a2e325b17fa7" }, 7 | "cmp-path": { "branch": "main", "commit": "c6635aae33a50d6010bf1aa756ac2398a2d54c32" }, 8 | "cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" }, 9 | "conform.nvim": { "branch": "master", "commit": "b1a75324ddf96b7bb84963a297b1ed334db087c0" }, 10 | "copilot.lua": { "branch": "master", "commit": "14fb80f467e1c4297a72d0c5513588ca3591d25a" }, 11 | "dressing.nvim": { "branch": "master", "commit": "2d7c2db2507fa3c4956142ee607431ddb2828639" }, 12 | "fidget.nvim": { "branch": "main", "commit": "d9ba6b7bfe29b3119a610892af67602641da778e" }, 13 | "fzf-lua": { "branch": "main", "commit": "6488ada2f376e47789391dc353b6d91a3f9de6f6" }, 14 | "gitsigns.nvim": { "branch": "main", "commit": "17ab794b6fce6fce768430ebc925347e349e1d60" }, 15 | "img-clip.nvim": { "branch": "main", "commit": "08a02e14c8c0d42fa7a92c30a98fd04d6993b35d" }, 16 | "indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" }, 17 | "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, 18 | "lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" }, 19 | "mason-lspconfig.nvim": { "branch": "main", "commit": "1a31f824b9cd5bc6f342fc29e9a53b60d74af245" }, 20 | "mason-tool-installer.nvim": { "branch": "main", "commit": "4aa03a08c3705e622f2e7886783fd450f7749cdd" }, 21 | "mason.nvim": { "branch": "main", "commit": "fc98833b6da5de5a9c5b1446ac541577059555be" }, 22 | "mini.nvim": { "branch": "main", "commit": "2e38ed16c2ced64bcd576986ccad4b18e2006e18" }, 23 | "mini.pick": { "branch": "main", "commit": "f95dc0bb9db7124f55b225f544a8719476c64314" }, 24 | "nui.nvim": { "branch": "main", "commit": "8d3bce9764e627b62b07424e0df77f680d47ffdb" }, 25 | "nvim-autopairs": { "branch": "master", "commit": "84a81a7d1f28b381b32acf1e8fe5ff5bef4f7968" }, 26 | "nvim-cmp": { "branch": "main", "commit": "059e89495b3ec09395262f16b1ad441a38081d04" }, 27 | "nvim-lint": { "branch": "master", "commit": "e7b4ffa6ab763af012e38b21af2c9159f10d2d33" }, 28 | "nvim-lspconfig": { "branch": "master", "commit": "3e873195f501b1e02d9fd7e5af5cbe74fc2f98c1" }, 29 | "nvim-treesitter": { "branch": "master", "commit": "523a9e148919f58eb5a013f76787e57696e00c93" }, 30 | "plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" }, 31 | "render-markdown.nvim": { "branch": "main", "commit": "0ed141a60ca4befcaf923b21c36f6f2971d61b9e" }, 32 | "telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" }, 33 | "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, 34 | "telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" }, 35 | "todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" }, 36 | "tokyonight.nvim": { "branch": "main", "commit": "057ef5d260c1931f1dffd0f052c685dcd14100a3" }, 37 | "vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" }, 38 | "which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" } 39 | } 40 | -------------------------------------------------------------------------------- /editor/.config/nvim/lua/custom/plugins/init.lua: -------------------------------------------------------------------------------- 1 | -- You can add your own plugins here or in other files in this directory! 2 | -- I promise not to create any merge conflicts in this directory :) 3 | -- 4 | -- See the kickstart.nvim README for more information 5 | return {} 6 | -------------------------------------------------------------------------------- /editor/.config/nvim/lua/kickstart/health.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | -- 3 | -- This file is not required for your own configuration, 4 | -- but helps people determine if their system is setup correctly. 5 | -- 6 | --]] 7 | 8 | local check_version = function() 9 | local verstr = tostring(vim.version()) 10 | if not vim.version.ge then 11 | vim.health.error(string.format("Neovim out of date: '%s'. Upgrade to latest stable or nightly", verstr)) 12 | return 13 | end 14 | 15 | if vim.version.ge(vim.version(), '0.10-dev') then 16 | vim.health.ok(string.format("Neovim version is: '%s'", verstr)) 17 | else 18 | vim.health.error(string.format("Neovim out of date: '%s'. Upgrade to latest stable or nightly", verstr)) 19 | end 20 | end 21 | 22 | local check_external_reqs = function() 23 | -- Basic utils: `git`, `make`, `unzip` 24 | for _, exe in ipairs { 'git', 'make', 'unzip', 'rg' } do 25 | local is_executable = vim.fn.executable(exe) == 1 26 | if is_executable then 27 | vim.health.ok(string.format("Found executable: '%s'", exe)) 28 | else 29 | vim.health.warn(string.format("Could not find executable: '%s'", exe)) 30 | end 31 | end 32 | 33 | return true 34 | end 35 | 36 | return { 37 | check = function() 38 | vim.health.start 'kickstart.nvim' 39 | 40 | vim.health.info [[NOTE: Not every warning is a 'must-fix' in `:checkhealth` 41 | 42 | Fix only warnings for plugins and languages you intend to use. 43 | Mason will give warnings for languages that are not installed. 44 | You do not need to install, unless you want to use those languages!]] 45 | 46 | local uv = vim.uv or vim.loop 47 | vim.health.info('System Information: ' .. vim.inspect(uv.os_uname())) 48 | 49 | check_version() 50 | check_external_reqs() 51 | end, 52 | } 53 | -------------------------------------------------------------------------------- /editor/.config/nvim/lua/kickstart/plugins/autopairs.lua: -------------------------------------------------------------------------------- 1 | -- autopairs 2 | -- https://github.com/windwp/nvim-autopairs 3 | 4 | return { 5 | 'windwp/nvim-autopairs', 6 | event = 'InsertEnter', 7 | -- Optional dependency 8 | dependencies = { 'hrsh7th/nvim-cmp' }, 9 | config = function() 10 | require('nvim-autopairs').setup {} 11 | -- If you want to automatically add `(` after selecting a function or method 12 | local cmp_autopairs = require 'nvim-autopairs.completion.cmp' 13 | local cmp = require 'cmp' 14 | cmp.event:on('confirm_done', cmp_autopairs.on_confirm_done()) 15 | end, 16 | } 17 | -------------------------------------------------------------------------------- /editor/.config/nvim/lua/kickstart/plugins/debug.lua: -------------------------------------------------------------------------------- 1 | -- debug.lua 2 | -- 3 | -- Shows how to use the DAP plugin to debug your code. 4 | -- 5 | -- Primarily focused on configuring the debugger for Go, but can 6 | -- be extended to other languages as well. That's why it's called 7 | -- kickstart.nvim and not kitchen-sink.nvim ;) 8 | 9 | return { 10 | -- NOTE: Yes, you can install new plugins here! 11 | 'mfussenegger/nvim-dap', 12 | -- NOTE: And you can specify dependencies as well 13 | dependencies = { 14 | -- Creates a beautiful debugger UI 15 | 'rcarriga/nvim-dap-ui', 16 | 17 | -- Required dependency for nvim-dap-ui 18 | 'nvim-neotest/nvim-nio', 19 | 20 | -- Installs the debug adapters for you 21 | 'williamboman/mason.nvim', 22 | 'jay-babu/mason-nvim-dap.nvim', 23 | 24 | -- Add your own debuggers here 25 | 'leoluz/nvim-dap-go', 26 | }, 27 | keys = { 28 | -- Basic debugging keymaps, feel free to change to your liking! 29 | { 30 | '', 31 | function() 32 | require('dap').continue() 33 | end, 34 | desc = 'Debug: Start/Continue', 35 | }, 36 | { 37 | '', 38 | function() 39 | require('dap').step_into() 40 | end, 41 | desc = 'Debug: Step Into', 42 | }, 43 | { 44 | '', 45 | function() 46 | require('dap').step_over() 47 | end, 48 | desc = 'Debug: Step Over', 49 | }, 50 | { 51 | '', 52 | function() 53 | require('dap').step_out() 54 | end, 55 | desc = 'Debug: Step Out', 56 | }, 57 | { 58 | 'b', 59 | function() 60 | require('dap').toggle_breakpoint() 61 | end, 62 | desc = 'Debug: Toggle Breakpoint', 63 | }, 64 | { 65 | 'B', 66 | function() 67 | require('dap').set_breakpoint(vim.fn.input 'Breakpoint condition: ') 68 | end, 69 | desc = 'Debug: Set Breakpoint', 70 | }, 71 | -- Toggle to see last session result. Without this, you can't see session output in case of unhandled exception. 72 | { 73 | '', 74 | function() 75 | require('dapui').toggle() 76 | end, 77 | desc = 'Debug: See last session result.', 78 | }, 79 | }, 80 | config = function() 81 | local dap = require 'dap' 82 | local dapui = require 'dapui' 83 | 84 | require('mason-nvim-dap').setup { 85 | -- Makes a best effort to setup the various debuggers with 86 | -- reasonable debug configurations 87 | automatic_installation = true, 88 | 89 | -- You can provide additional configuration to the handlers, 90 | -- see mason-nvim-dap README for more information 91 | handlers = {}, 92 | 93 | -- You'll need to check that you have the required things installed 94 | -- online, please don't ask me how to install them :) 95 | ensure_installed = { 96 | -- Update this to ensure that you have the debuggers for the langs you want 97 | 'delve', 98 | }, 99 | } 100 | 101 | -- Dap UI setup 102 | -- For more information, see |:help nvim-dap-ui| 103 | dapui.setup { 104 | -- Set icons to characters that are more likely to work in every terminal. 105 | -- Feel free to remove or use ones that you like more! :) 106 | -- Don't feel like these are good choices. 107 | icons = { expanded = '▾', collapsed = '▸', current_frame = '*' }, 108 | controls = { 109 | icons = { 110 | pause = '⏸', 111 | play = '▶', 112 | step_into = '⏎', 113 | step_over = '⏭', 114 | step_out = '⏮', 115 | step_back = 'b', 116 | run_last = '▶▶', 117 | terminate = '⏹', 118 | disconnect = '⏏', 119 | }, 120 | }, 121 | } 122 | 123 | -- Change breakpoint icons 124 | -- vim.api.nvim_set_hl(0, 'DapBreak', { fg = '#e51400' }) 125 | -- vim.api.nvim_set_hl(0, 'DapStop', { fg = '#ffcc00' }) 126 | -- local breakpoint_icons = vim.g.have_nerd_font 127 | -- and { Breakpoint = '', BreakpointCondition = '', BreakpointRejected = '', LogPoint = '', Stopped = '' } 128 | -- or { Breakpoint = '●', BreakpointCondition = '⊜', BreakpointRejected = '⊘', LogPoint = '◆', Stopped = '⭔' } 129 | -- for type, icon in pairs(breakpoint_icons) do 130 | -- local tp = 'Dap' .. type 131 | -- local hl = (type == 'Stopped') and 'DapStop' or 'DapBreak' 132 | -- vim.fn.sign_define(tp, { text = icon, texthl = hl, numhl = hl }) 133 | -- end 134 | 135 | dap.listeners.after.event_initialized['dapui_config'] = dapui.open 136 | dap.listeners.before.event_terminated['dapui_config'] = dapui.close 137 | dap.listeners.before.event_exited['dapui_config'] = dapui.close 138 | 139 | -- Install golang specific config 140 | require('dap-go').setup { 141 | delve = { 142 | -- On Windows delve must be run attached or it crashes. 143 | -- See https://github.com/leoluz/nvim-dap-go/blob/main/README.md#configuring 144 | detached = vim.fn.has 'win32' == 0, 145 | }, 146 | } 147 | end, 148 | } 149 | -------------------------------------------------------------------------------- /editor/.config/nvim/lua/kickstart/plugins/gitsigns.lua: -------------------------------------------------------------------------------- 1 | -- Adds git related signs to the gutter, as well as utilities for managing changes 2 | -- NOTE: gitsigns is already included in init.lua but contains only the base 3 | -- config. This will add also the recommended keymaps. 4 | 5 | return { 6 | { 7 | 'lewis6991/gitsigns.nvim', 8 | opts = { 9 | on_attach = function(bufnr) 10 | local gitsigns = require 'gitsigns' 11 | 12 | local function map(mode, l, r, opts) 13 | opts = opts or {} 14 | opts.buffer = bufnr 15 | vim.keymap.set(mode, l, r, opts) 16 | end 17 | 18 | -- Navigation 19 | map('n', ']c', function() 20 | if vim.wo.diff then 21 | vim.cmd.normal { ']c', bang = true } 22 | else 23 | gitsigns.nav_hunk 'next' 24 | end 25 | end, { desc = 'Jump to next git [c]hange' }) 26 | 27 | map('n', '[c', function() 28 | if vim.wo.diff then 29 | vim.cmd.normal { '[c', bang = true } 30 | else 31 | gitsigns.nav_hunk 'prev' 32 | end 33 | end, { desc = 'Jump to previous git [c]hange' }) 34 | 35 | -- Actions 36 | -- visual mode 37 | map('v', 'hs', function() 38 | gitsigns.stage_hunk { vim.fn.line '.', vim.fn.line 'v' } 39 | end, { desc = 'git [s]tage hunk' }) 40 | map('v', 'hr', function() 41 | gitsigns.reset_hunk { vim.fn.line '.', vim.fn.line 'v' } 42 | end, { desc = 'git [r]eset hunk' }) 43 | -- normal mode 44 | map('n', 'hs', gitsigns.stage_hunk, { desc = 'git [s]tage hunk' }) 45 | map('n', 'hr', gitsigns.reset_hunk, { desc = 'git [r]eset hunk' }) 46 | map('n', 'hS', gitsigns.stage_buffer, { desc = 'git [S]tage buffer' }) 47 | map('n', 'hu', gitsigns.stage_hunk, { desc = 'git [u]ndo stage hunk' }) 48 | map('n', 'hR', gitsigns.reset_buffer, { desc = 'git [R]eset buffer' }) 49 | map('n', 'hp', gitsigns.preview_hunk, { desc = 'git [p]review hunk' }) 50 | map('n', 'hb', gitsigns.blame_line, { desc = 'git [b]lame line' }) 51 | map('n', 'hd', gitsigns.diffthis, { desc = 'git [d]iff against index' }) 52 | map('n', 'hD', function() 53 | gitsigns.diffthis '@' 54 | end, { desc = 'git [D]iff against last commit' }) 55 | -- Toggles 56 | map('n', 'tb', gitsigns.toggle_current_line_blame, { desc = '[T]oggle git show [b]lame line' }) 57 | map('n', 'tD', gitsigns.preview_hunk_inline, { desc = '[T]oggle git show [D]eleted' }) 58 | end, 59 | }, 60 | }, 61 | } 62 | -------------------------------------------------------------------------------- /editor/.config/nvim/lua/kickstart/plugins/indent_line.lua: -------------------------------------------------------------------------------- 1 | return { 2 | { -- Add indentation guides even on blank lines 3 | 'lukas-reineke/indent-blankline.nvim', 4 | -- Enable `lukas-reineke/indent-blankline.nvim` 5 | -- See `:help ibl` 6 | main = 'ibl', 7 | opts = {}, 8 | }, 9 | } 10 | -------------------------------------------------------------------------------- /editor/.config/nvim/lua/kickstart/plugins/lint.lua: -------------------------------------------------------------------------------- 1 | return { 2 | 3 | { -- Linting 4 | "mfussenegger/nvim-lint", 5 | event = { "BufReadPre", "BufNewFile" }, 6 | config = function() 7 | local lint = require("lint") 8 | lint.linters_by_ft = { 9 | go = { "golangcilint" }, 10 | markdown = { "markdownlint" }, 11 | } 12 | 13 | -- To allow other plugins to add linters to require('lint').linters_by_ft, 14 | -- instead set linters_by_ft like this: 15 | -- lint.linters_by_ft = lint.linters_by_ft or {} 16 | -- lint.linters_by_ft['markdown'] = { 'markdownlint' } 17 | -- 18 | -- However, note that this will enable a set of default linters, 19 | -- which will cause errors unless these tools are available: 20 | -- { 21 | -- clojure = { "clj-kondo" }, 22 | -- dockerfile = { "hadolint" }, 23 | -- inko = { "inko" }, 24 | -- janet = { "janet" }, 25 | -- json = { "jsonlint" }, 26 | -- markdown = { "vale" }, 27 | -- rst = { "vale" }, 28 | -- ruby = { "ruby" }, 29 | -- terraform = { "tflint" }, 30 | -- text = { "vale" } 31 | -- } 32 | -- 33 | -- You can disable the default linters by setting their filetypes to nil: 34 | lint.linters_by_ft["clojure"] = nil 35 | -- lint.linters_by_ft['dockerfile'] = nil 36 | lint.linters_by_ft["inko"] = nil 37 | lint.linters_by_ft["janet"] = nil 38 | -- lint.linters_by_ft['json'] = nil 39 | -- lint.linters_by_ft['markdown'] = nil 40 | lint.linters_by_ft["rst"] = nil 41 | lint.linters_by_ft["ruby"] = nil 42 | -- lint.linters_by_ft['terraform'] = nil 43 | -- lint.linters_by_ft['text'] = nil 44 | 45 | -- Create autocommand which carries out the actual linting 46 | -- on the specified events. 47 | local lint_augroup = vim.api.nvim_create_augroup("lint", { clear = true }) 48 | vim.api.nvim_create_autocmd({ "BufEnter", "BufWritePost", "InsertLeave" }, { 49 | group = lint_augroup, 50 | callback = function() 51 | -- Only run the linter in buffers that you can modify in order to 52 | -- avoid superfluous noise, notably within the handy LSP pop-ups that 53 | -- describe the hovered symbol using Markdown. 54 | if vim.opt_local.modifiable:get() then 55 | lint.try_lint() 56 | end 57 | end, 58 | }) 59 | end, 60 | }, 61 | } 62 | -------------------------------------------------------------------------------- /editor/.config/nvim/lua/kickstart/plugins/neo-tree.lua: -------------------------------------------------------------------------------- 1 | -- Neo-tree is a Neovim plugin to browse the file system 2 | -- https://github.com/nvim-neo-tree/neo-tree.nvim 3 | 4 | return { 5 | 'nvim-neo-tree/neo-tree.nvim', 6 | version = '*', 7 | dependencies = { 8 | 'nvim-lua/plenary.nvim', 9 | 'nvim-tree/nvim-web-devicons', -- not strictly required, but recommended 10 | 'MunifTanjim/nui.nvim', 11 | }, 12 | cmd = 'Neotree', 13 | keys = { 14 | { '\\', ':Neotree reveal', desc = 'NeoTree reveal', silent = true }, 15 | }, 16 | opts = { 17 | filesystem = { 18 | window = { 19 | mappings = { 20 | ['\\'] = 'close_window', 21 | }, 22 | }, 23 | }, 24 | }, 25 | } 26 | -------------------------------------------------------------------------------- /gui/.config/alacritty/alacritty.yml: -------------------------------------------------------------------------------- 1 | # Configuration for Alacritty, the GPU enhanced terminal emulator. 2 | 3 | # Import additional configuration files 4 | # 5 | # These configuration files will be loaded in order, replacing values in files 6 | # loaded earlier with those loaded later in the chain. The file itself will 7 | # always be loaded last. 8 | #import: 9 | # - /path/to/alacritty.yml 10 | 11 | # Any items in the `env` entry below will be added as 12 | # environment variables. Some entries may override variables 13 | # set by alacritty itself. 14 | #env: 15 | # TERM variable 16 | # 17 | # This value is used to set the `$TERM` environment variable for 18 | # each instance of Alacritty. If it is not present, alacritty will 19 | # check the local terminfo database and use `alacritty` if it is 20 | # available, otherwise `xterm-256color` is used. 21 | #TERM: alacritty 22 | 23 | window: 24 | # Window dimensions (changes require restart) 25 | # 26 | # Number of lines/columns (not pixels) in the terminal. The number of columns 27 | # must be at least `2`, while using a value of `0` for columns and lines will 28 | # fall back to the window manager's recommended size. 29 | #dimensions: 30 | # columns: 0 31 | # lines: 0 32 | 33 | # Window position (changes require restart) 34 | # 35 | # Specified in number of pixels. 36 | # If the position is not set, the window manager will handle the placement. 37 | #position: 38 | # x: 0 39 | # y: 0 40 | 41 | # Window padding (changes require restart) 42 | # 43 | # Blank space added around the window in pixels. This padding is scaled 44 | # by DPI and the specified value is always added at both opposing sides. 45 | padding: 46 | x: 10 47 | y: 2 48 | 49 | # Spread additional padding evenly around the terminal content. 50 | #dynamic_padding: false 51 | 52 | # Window decorations 53 | # 54 | # Values for `decorations`: 55 | # - full: Borders and title bar 56 | # - none: Neither borders nor title bar 57 | # 58 | # Values for `decorations` (macOS only): 59 | # - transparent: Title bar, transparent background and title bar buttons 60 | # - buttonless: Title bar, transparent background and no title bar buttons 61 | #decorations: full 62 | 63 | # Startup Mode (changes require restart) 64 | # 65 | # Values for `startup_mode`: 66 | # - Windowed 67 | # - Maximized 68 | # - Fullscreen 69 | # 70 | # Values for `startup_mode` (macOS only): 71 | # - SimpleFullscreen 72 | #startup_mode: Windowed 73 | 74 | # Window title 75 | #title: Alacritty 76 | 77 | # Allow terminal applications to change Alacritty's window title. 78 | dynamic_title: true 79 | 80 | # Window class (Linux/BSD only): 81 | #class: 82 | # Application instance name 83 | #instance: Alacritty 84 | # General application class 85 | #general: Alacritty 86 | 87 | # GTK theme variant (Linux/BSD only) 88 | # 89 | # Override the variant of the GTK theme. Commonly supported values are `dark` 90 | # and `light`. Set this to `None` to use the default theme variant. 91 | #gtk_theme_variant: None 92 | 93 | scrolling: 94 | # Maximum number of lines in the scrollback buffer. 95 | # Specifying '0' will disable scrolling. 96 | history: 10000 97 | 98 | # Scrolling distance multiplier. 99 | #multiplier: 3 100 | 101 | # Font configuration 102 | font: 103 | # Normal (roman) font face 104 | normal: 105 | # Font family 106 | # 107 | # Default: 108 | # - (macOS) Menlo 109 | # - (Linux/BSD) monospace 110 | # - (Windows) Consolas 111 | family: monospace 112 | 113 | # The `style` can be specified to pick a specific face. 114 | #style: Regular 115 | 116 | # Bold font face 117 | #bold: 118 | # Font family 119 | # 120 | # If the bold family is not specified, it will fall back to the 121 | # value specified for the normal font. 122 | #family: monospace 123 | 124 | # The `style` can be specified to pick a specific face. 125 | #style: Bold 126 | 127 | # Italic font face 128 | #italic: 129 | # Font family 130 | # 131 | # If the italic family is not specified, it will fall back to the 132 | # value specified for the normal font. 133 | #family: monospace 134 | 135 | # The `style` can be specified to pick a specific face. 136 | #style: Italic 137 | 138 | # Bold italic font face 139 | #bold_italic: 140 | # Font family 141 | # 142 | # If the bold italic family is not specified, it will fall back to the 143 | # value specified for the normal font. 144 | #family: monospace 145 | 146 | # The `style` can be specified to pick a specific face. 147 | #style: Bold Italic 148 | 149 | # Point size 150 | size: 18.0 151 | 152 | # Offset is the extra space around each character. `offset.y` can be thought 153 | # of as modifying the line spacing, and `offset.x` as modifying the letter 154 | # spacing. 155 | #offset: 156 | # x: 0 157 | # y: 0 158 | 159 | # Glyph offset determines the locations of the glyphs within their cells with 160 | # the default being at the bottom. Increasing `x` moves the glyph to the 161 | # right, increasing `y` moves the glyph upward. 162 | #glyph_offset: 163 | # x: 0 164 | # y: 0 165 | 166 | # Thin stroke font rendering (macOS only) 167 | # 168 | # Thin strokes are suitable for retina displays, but for non-retina screens 169 | # it is recommended to set `use_thin_strokes` to `false`. 170 | #use_thin_strokes: true 171 | 172 | # If `true`, bold text is drawn using the bright color variants. 173 | #draw_bold_text_with_bright_colors: false 174 | 175 | # Colors (Tomorrow Night) 176 | colors: 177 | # Default colors 178 | primary: 179 | background: '0x002b36' 180 | foreground: '0x93a1a1' 181 | 182 | # Colors the cursor will use if `custom_cursor_colors` is true 183 | cursor: 184 | text: '0x002b36' 185 | cursor: '0x93a1a1' 186 | 187 | # Normal colors 188 | normal: 189 | black: '0x002b36' 190 | red: '0xdc322f' 191 | green: '0x859900' 192 | yellow: '0xb58900' 193 | blue: '0x268bd2' 194 | magenta: '0x6c71c4' 195 | cyan: '0x2aa198' 196 | white: '0x93a1a1' 197 | 198 | # Bright colors 199 | bright: 200 | black: '0x657b83' 201 | red: '0xdc322f' 202 | green: '0x859900' 203 | yellow: '0xb58900' 204 | blue: '0x268bd2' 205 | magenta: '0x6c71c4' 206 | cyan: '0x2aa198' 207 | white: '0xfdf6e3' 208 | 209 | indexed_colors: 210 | - { index: 16, color: '0xcb4b16' } 211 | - { index: 17, color: '0xd33682' } 212 | - { index: 18, color: '0x073642' } 213 | - { index: 19, color: '0x586e75' } 214 | - { index: 20, color: '0x839496' } 215 | - { index: 21, color: '0xeee8d5' } 216 | 217 | # Bell 218 | # 219 | # The bell is rung every time the BEL control character is received. 220 | #bell: 221 | # Visual Bell Animation 222 | # 223 | # Animation effect for flashing the screen when the visual bell is rung. 224 | # 225 | # Values for `animation`: 226 | # - Ease 227 | # - EaseOut 228 | # - EaseOutSine 229 | # - EaseOutQuad 230 | # - EaseOutCubic 231 | # - EaseOutQuart 232 | # - EaseOutQuint 233 | # - EaseOutExpo 234 | # - EaseOutCirc 235 | # - Linear 236 | #animation: EaseOutExpo 237 | 238 | # Duration of the visual bell flash in milliseconds. A `duration` of `0` will 239 | # disable the visual bell animation. 240 | #duration: 0 241 | 242 | # Visual bell animation color. 243 | #color: '#ffffff' 244 | 245 | # Bell Command 246 | # 247 | # This program is executed whenever the bell is rung. 248 | # 249 | # When set to `command: None`, no command will be executed. 250 | # 251 | # Example: 252 | # command: 253 | # program: notify-send 254 | # args: ["Hello, World!"] 255 | # 256 | #command: None 257 | 258 | # Background opacity 259 | # 260 | # Window opacity as a floating point number from `0.0` to `1.0`. 261 | # The value `0.0` is completely transparent and `1.0` is opaque. 262 | #background_opacity: 1.0 263 | 264 | #selection: 265 | # This string contains all characters that are used as separators for 266 | # "semantic words" in Alacritty. 267 | #semantic_escape_chars: ",│`|:\"' ()[]{}<>\t" 268 | 269 | # When set to `true`, selected text will be copied to the primary clipboard. 270 | #save_to_clipboard: false 271 | 272 | #cursor: 273 | # Cursor style 274 | # 275 | # Values for `style`: 276 | # - ▇ Block 277 | # - _ Underline 278 | # - | Beam 279 | #style: Block 280 | 281 | # Vi mode cursor style 282 | # 283 | # If the vi mode cursor style is `None` or not specified, it will fall back to 284 | # the style of the active value of the normal cursor. 285 | # 286 | # See `cursor.style` for available options. 287 | #vi_mode_style: None 288 | 289 | # If this is `true`, the cursor will be rendered as a hollow box when the 290 | # window is not focused. 291 | #unfocused_hollow: true 292 | 293 | # Thickness of the cursor relative to the cell width as floating point number 294 | # from `0.0` to `1.0`. 295 | #thickness: 0.15 296 | 297 | # Live config reload (changes require restart) 298 | #live_config_reload: true 299 | 300 | # Shell 301 | # 302 | # You can set `shell.program` to the path of your favorite shell, e.g. 303 | # `/bin/fish`. Entries in `shell.args` are passed unmodified as arguments to the 304 | # shell. 305 | # 306 | # Default: 307 | # - (macOS) /bin/bash --login 308 | # - (Linux/BSD) user login shell 309 | # - (Windows) powershell 310 | #shell: 311 | # program: /bin/bash 312 | # args: 313 | # - --login 314 | 315 | # Startup directory 316 | # 317 | # Directory the shell is started in. If this is unset, or `None`, the working 318 | # directory of the parent process will be used. 319 | #working_directory: None 320 | 321 | # WinPTY backend (Windows only) 322 | # 323 | # Alacritty defaults to using the newer ConPTY backend if it is available, 324 | # since it resolves a lot of bugs and is quite a bit faster. If it is not 325 | # available, the WinPTY backend will be used instead. 326 | # 327 | # Setting this option to `true` makes Alacritty use the legacy WinPTY backend, 328 | # even if the ConPTY backend is available. 329 | #winpty_backend: false 330 | 331 | # Send ESC (\x1b) before characters when alt is pressed. 332 | #alt_send_esc: true 333 | 334 | #mouse: 335 | # Click settings 336 | # 337 | # The `double_click` and `triple_click` settings control the time 338 | # alacritty should wait for accepting multiple clicks as one double 339 | # or triple click. 340 | #double_click: { threshold: 300 } 341 | #triple_click: { threshold: 300 } 342 | 343 | # If this is `true`, the cursor is temporarily hidden when typing. 344 | #hide_when_typing: false 345 | 346 | #url: 347 | # URL launcher 348 | # 349 | # This program is executed when clicking on a text which is recognized as a 350 | # URL. The URL is always added to the command as the last parameter. 351 | # 352 | # When set to `launcher: None`, URL launching will be disabled completely. 353 | # 354 | # Default: 355 | # - (macOS) open 356 | # - (Linux/BSD) xdg-open 357 | # - (Windows) explorer 358 | #launcher: 359 | # program: xdg-open 360 | # args: [] 361 | 362 | # URL modifiers 363 | # 364 | # These are the modifiers that need to be held down for opening URLs when 365 | # clicking on them. The available modifiers are documented in the key 366 | # binding section. 367 | #modifiers: None 368 | 369 | # Mouse bindings 370 | # 371 | # Mouse bindings are specified as a list of objects, much like the key 372 | # bindings further below. 373 | # 374 | # To trigger mouse bindings when an application running within Alacritty 375 | # captures the mouse, the `Shift` modifier is automatically added as a 376 | # requirement. 377 | # 378 | # Each mouse binding will specify a: 379 | # 380 | # - `mouse`: 381 | # 382 | # - Middle 383 | # - Left 384 | # - Right 385 | # - Numeric identifier such as `5` 386 | # 387 | # - `action` (see key bindings) 388 | # 389 | # And optionally: 390 | # 391 | # - `mods` (see key bindings) 392 | #mouse_bindings: 393 | # - { mouse: Middle, action: PasteSelection } 394 | 395 | # Key bindings 396 | # 397 | # Key bindings are specified as a list of objects. For example, this is the 398 | # default paste binding: 399 | # 400 | # `- { key: V, mods: Control|Shift, action: Paste }` 401 | # 402 | # Each key binding will specify a: 403 | # 404 | # - `key`: Identifier of the key pressed 405 | # 406 | # - A-Z 407 | # - F1-F24 408 | # - Key0-Key9 409 | # 410 | # A full list with available key codes can be found here: 411 | # https://docs.rs/glutin/*/glutin/event/enum.VirtualKeyCode.html#variants 412 | # 413 | # Instead of using the name of the keys, the `key` field also supports using 414 | # the scancode of the desired key. Scancodes have to be specified as a 415 | # decimal number. This command will allow you to display the hex scancodes 416 | # for certain keys: 417 | # 418 | # `showkey --scancodes`. 419 | # 420 | # Then exactly one of: 421 | # 422 | # - `chars`: Send a byte sequence to the running application 423 | # 424 | # The `chars` field writes the specified string to the terminal. This makes 425 | # it possible to pass escape sequences. To find escape codes for bindings 426 | # like `PageUp` (`"\x1b[5~"`), you can run the command `showkey -a` outside 427 | # of tmux. Note that applications use terminfo to map escape sequences back 428 | # to keys. It is therefore required to update the terminfo when changing an 429 | # escape sequence. 430 | # 431 | # - `action`: Execute a predefined action 432 | # 433 | # - ToggleViMode 434 | # - SearchForward 435 | # Start searching toward the right of the search origin. 436 | # - SearchBackward 437 | # Start searching toward the left of the search origin. 438 | # - Copy 439 | # - Paste 440 | # - IncreaseFontSize 441 | # - DecreaseFontSize 442 | # - ResetFontSize 443 | # - ScrollPageUp 444 | # - ScrollPageDown 445 | # - ScrollHalfPageUp 446 | # - ScrollHalfPageDown 447 | # - ScrollLineUp 448 | # - ScrollLineDown 449 | # - ScrollToTop 450 | # - ScrollToBottom 451 | # - ClearHistory 452 | # Remove the terminal's scrollback history. 453 | # - Hide 454 | # Hide the Alacritty window. 455 | # - Minimize 456 | # Minimize the Alacritty window. 457 | # - Quit 458 | # Quit Alacritty. 459 | # - ToggleFullscreen 460 | # - SpawnNewInstance 461 | # Spawn a new instance of Alacritty. 462 | # - ClearLogNotice 463 | # Clear Alacritty's UI warning and error notice. 464 | # - ClearSelection 465 | # Remove the active selection. 466 | # - ReceiveChar 467 | # - None 468 | # 469 | # - Vi mode exclusive actions: 470 | # 471 | # - Open 472 | # Open URLs at the cursor location with the launcher configured in 473 | # `url.launcher`. 474 | # - ToggleNormalSelection 475 | # - ToggleLineSelection 476 | # - ToggleBlockSelection 477 | # - ToggleSemanticSelection 478 | # Toggle semantic selection based on `selection.semantic_escape_chars`. 479 | # 480 | # - Vi mode exclusive cursor motion actions: 481 | # 482 | # - Up 483 | # One line up. 484 | # - Down 485 | # One line down. 486 | # - Left 487 | # One character left. 488 | # - Right 489 | # One character right. 490 | # - First 491 | # First column, or beginning of the line when already at the first column. 492 | # - Last 493 | # Last column, or beginning of the line when already at the last column. 494 | # - FirstOccupied 495 | # First non-empty cell in this terminal row, or first non-empty cell of 496 | # the line when already at the first cell of the row. 497 | # - High 498 | # Top of the screen. 499 | # - Middle 500 | # Center of the screen. 501 | # - Low 502 | # Bottom of the screen. 503 | # - SemanticLeft 504 | # Start of the previous semantically separated word. 505 | # - SemanticRight 506 | # Start of the next semantically separated word. 507 | # - SemanticLeftEnd 508 | # End of the previous semantically separated word. 509 | # - SemanticRightEnd 510 | # End of the next semantically separated word. 511 | # - WordLeft 512 | # Start of the previous whitespace separated word. 513 | # - WordRight 514 | # Start of the next whitespace separated word. 515 | # - WordLeftEnd 516 | # End of the previous whitespace separated word. 517 | # - WordRightEnd 518 | # End of the next whitespace separated word. 519 | # - Bracket 520 | # Character matching the bracket at the cursor's location. 521 | # - SearchNext 522 | # Beginning of the next match. 523 | # - SearchPrevious 524 | # Beginning of the previous match. 525 | # - SearchStart 526 | # Start of the match to the left of the vi mode cursor. 527 | # - SearchEnd 528 | # End of the match to the right of the vi mode cursor. 529 | # 530 | # - macOS exclusive actions: 531 | # - ToggleSimpleFullscreen 532 | # Enter fullscreen without occupying another space. 533 | # 534 | # - Linux/BSD exclusive actions: 535 | # 536 | # - CopySelection 537 | # Copy from the selection buffer. 538 | # - PasteSelection 539 | # Paste from the selection buffer. 540 | # 541 | # - `command`: Fork and execute a specified command plus arguments 542 | # 543 | # The `command` field must be a map containing a `program` string and an 544 | # `args` array of command line parameter strings. For example: 545 | # `{ program: "alacritty", args: ["-e", "vttest"] }` 546 | # 547 | # And optionally: 548 | # 549 | # - `mods`: Key modifiers to filter binding actions 550 | # 551 | # - Command 552 | # - Control 553 | # - Option 554 | # - Super 555 | # - Shift 556 | # - Alt 557 | # 558 | # Multiple `mods` can be combined using `|` like this: 559 | # `mods: Control|Shift`. 560 | # Whitespace and capitalization are relevant and must match the example. 561 | # 562 | # - `mode`: Indicate a binding for only specific terminal reported modes 563 | # 564 | # This is mainly used to send applications the correct escape sequences 565 | # when in different modes. 566 | # 567 | # - AppCursor 568 | # - AppKeypad 569 | # - Alt 570 | # - Vi 571 | # 572 | # A `~` operator can be used before a mode to apply the binding whenever 573 | # the mode is *not* active, e.g. `~Alt`. 574 | # 575 | # Bindings are always filled by default, but will be replaced when a new 576 | # binding with the same triggers is defined. To unset a default binding, it can 577 | # be mapped to the `ReceiveChar` action. Alternatively, you can use `None` for 578 | # a no-op if you do not wish to receive input characters for that binding. 579 | # 580 | # If the same trigger is assigned to multiple actions, all of them are executed 581 | # in the order they were defined in. 582 | #key_bindings: 583 | #- { key: Paste, action: Paste } 584 | #- { key: Copy, action: Copy } 585 | #- { key: L, mods: Control, action: ClearLogNotice } 586 | #- { key: L, mods: Control, mode: ~Vi, chars: "\x0c" } 587 | #- { key: PageUp, mods: Shift, mode: ~Alt, action: ScrollPageUp, } 588 | #- { key: PageDown, mods: Shift, mode: ~Alt, action: ScrollPageDown } 589 | #- { key: Home, mods: Shift, mode: ~Alt, action: ScrollToTop, } 590 | #- { key: End, mods: Shift, mode: ~Alt, action: ScrollToBottom } 591 | 592 | # Vi Mode 593 | #- { key: Space, mods: Shift|Control, mode: Vi, action: ScrollToBottom } 594 | #- { key: Space, mods: Shift|Control, action: ToggleViMode } 595 | #- { key: Escape, mode: Vi, action: ClearSelection } 596 | #- { key: I, mode: Vi, action: ScrollToBottom } 597 | #- { key: I, mode: Vi, action: ToggleViMode } 598 | #- { key: C, mods: Control, mode: Vi, action: ToggleViMode } 599 | #- { key: Y, mods: Control, mode: Vi, action: ScrollLineUp } 600 | #- { key: E, mods: Control, mode: Vi, action: ScrollLineDown } 601 | #- { key: G, mode: Vi, action: ScrollToTop } 602 | #- { key: G, mods: Shift, mode: Vi, action: ScrollToBottom } 603 | #- { key: B, mods: Control, mode: Vi, action: ScrollPageUp } 604 | #- { key: F, mods: Control, mode: Vi, action: ScrollPageDown } 605 | #- { key: U, mods: Control, mode: Vi, action: ScrollHalfPageUp } 606 | #- { key: D, mods: Control, mode: Vi, action: ScrollHalfPageDown } 607 | #- { key: Y, mode: Vi, action: Copy } 608 | #- { key: Y, mode: Vi, action: ClearSelection } 609 | #- { key: Copy, mode: Vi, action: ClearSelection } 610 | #- { key: V, mode: Vi, action: ToggleNormalSelection } 611 | #- { key: V, mods: Shift, mode: Vi, action: ToggleLineSelection } 612 | #- { key: V, mods: Control, mode: Vi, action: ToggleBlockSelection } 613 | #- { key: V, mods: Alt, mode: Vi, action: ToggleSemanticSelection } 614 | #- { key: Return, mode: Vi, action: Open } 615 | #- { key: K, mode: Vi, action: Up } 616 | #- { key: J, mode: Vi, action: Down } 617 | #- { key: H, mode: Vi, action: Left } 618 | #- { key: L, mode: Vi, action: Right } 619 | #- { key: Up, mode: Vi, action: Up } 620 | #- { key: Down, mode: Vi, action: Down } 621 | #- { key: Left, mode: Vi, action: Left } 622 | #- { key: Right, mode: Vi, action: Right } 623 | #- { key: Key0, mode: Vi, action: First } 624 | #- { key: Key4, mods: Shift, mode: Vi, action: Last } 625 | #- { key: Key6, mods: Shift, mode: Vi, action: FirstOccupied } 626 | #- { key: H, mods: Shift, mode: Vi, action: High } 627 | #- { key: M, mods: Shift, mode: Vi, action: Middle } 628 | #- { key: L, mods: Shift, mode: Vi, action: Low } 629 | #- { key: B, mode: Vi, action: SemanticLeft } 630 | #- { key: W, mode: Vi, action: SemanticRight } 631 | #- { key: E, mode: Vi, action: SemanticRightEnd } 632 | #- { key: B, mods: Shift, mode: Vi, action: WordLeft } 633 | #- { key: W, mods: Shift, mode: Vi, action: WordRight } 634 | #- { key: E, mods: Shift, mode: Vi, action: WordRightEnd } 635 | #- { key: Key5, mods: Shift, mode: Vi, action: Bracket } 636 | #- { key: Slash, mode: Vi, action: SearchForward } 637 | #- { key: Slash, mods: Shift, mode: Vi, action: SearchBackward } 638 | #- { key: N, mode: Vi, action: SearchNext } 639 | #- { key: N, mods: Shift, mode: Vi, action: SearchPrevious } 640 | 641 | # (Windows, Linux, and BSD only) 642 | #- { key: V, mods: Control|Shift, action: Paste } 643 | #- { key: C, mods: Control|Shift, action: Copy } 644 | #- { key: F, mods: Control|Shift, action: SearchForward } 645 | #- { key: B, mods: Control|Shift, action: SearchBackward } 646 | #- { key: C, mods: Control|Shift, mode: Vi, action: ClearSelection } 647 | #- { key: Insert, mods: Shift, action: PasteSelection } 648 | #- { key: Key0, mods: Control, action: ResetFontSize } 649 | #- { key: Equals, mods: Control, action: IncreaseFontSize } 650 | #- { key: Plus, mods: Control, action: IncreaseFontSize } 651 | #- { key: NumpadAdd, mods: Control, action: IncreaseFontSize } 652 | #- { key: Minus, mods: Control, action: DecreaseFontSize } 653 | #- { key: NumpadSubtract, mods: Control, action: DecreaseFontSize } 654 | 655 | # (Windows only) 656 | #- { key: Return, mods: Alt, action: ToggleFullscreen } 657 | 658 | # (macOS only) 659 | #- { key: K, mods: Command, mode: ~Vi, chars: "\x0c" } 660 | #- { key: Key0, mods: Command, action: ResetFontSize } 661 | #- { key: Equals, mods: Command, action: IncreaseFontSize } 662 | #- { key: Plus, mods: Command, action: IncreaseFontSize } 663 | #- { key: NumpadAdd, mods: Command, action: IncreaseFontSize } 664 | #- { key: Minus, mods: Command, action: DecreaseFontSize } 665 | #- { key: NumpadSubtract, mods: Command, action: DecreaseFontSize } 666 | #- { key: K, mods: Command, action: ClearHistory } 667 | #- { key: V, mods: Command, action: Paste } 668 | #- { key: C, mods: Command, action: Copy } 669 | #- { key: C, mods: Command, mode: Vi, action: ClearSelection } 670 | #- { key: H, mods: Command, action: Hide } 671 | #- { key: M, mods: Command, action: Minimize } 672 | #- { key: Q, mods: Command, action: Quit } 673 | #- { key: W, mods: Command, action: Quit } 674 | #- { key: N, mods: Command, action: SpawnNewInstance } 675 | #- { key: F, mods: Command|Control, action: ToggleFullscreen } 676 | #- { key: F, mods: Command, action: SearchForward } 677 | #- { key: B, mods: Command, action: SearchBackward } 678 | 679 | #debug: 680 | # Display the time it takes to redraw each frame. 681 | #render_timer: false 682 | 683 | # Keep the log file after quitting Alacritty. 684 | #persistent_logging: false 685 | 686 | # Log level 687 | # 688 | # Values for `log_level`: 689 | # - None 690 | # - Error 691 | # - Warn 692 | # - Info 693 | # - Debug 694 | # - Trace 695 | #log_level: Warn 696 | 697 | # Print all received window events. 698 | #print_events: false 699 | -------------------------------------------------------------------------------- /gui/.config/fontconfig/fonts.conf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | sans-serif 7 | 8 | Noto Sans 9 | Open Sans 10 | Droid Sans 11 | Roboto 12 | Tholoth 13 | Noto Sans Arabic 14 | 15 | 16 | 17 | serif 18 | 19 | Noto Serif 20 | Droid Serif 21 | Roboto Slab 22 | Tholoth 23 | Noto Sans Arabic 24 | 25 | 26 | 27 | monospace 28 | 29 | Source Code Pro 30 | Noto Sans Mono 31 | Inconsolata 32 | Droid Sans Mono 33 | Roboto Mono 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /gui/.config/i3status-rust/config.toml: -------------------------------------------------------------------------------- 1 | theme = "native" 2 | icons = "awesome" 3 | 4 | [[block]] 5 | block = "net" 6 | on_click = "alacritty -e zsh -c \"nmcli device wifi list && nmcli device wifi connect --ask\"" 7 | device = "wlan0" 8 | format = "{ssid} ({signal_strength}) {ip}" 9 | interval = 5 10 | 11 | [[block]] 12 | block = "cpu" 13 | interval = 1 14 | 15 | #[[block]] 16 | #block = "sound" 17 | 18 | [[block]] 19 | block = "battery" 20 | if_command = "test -e /sys/class/power_supply/BAT0" 21 | 22 | [[block]] 23 | block = "time" 24 | interval = 5 25 | format = "%a %Y-%m-%d %R" 26 | -------------------------------------------------------------------------------- /gui/.config/sway/config: -------------------------------------------------------------------------------- 1 | ###################### 2 | # Sway Configuration # 3 | ###################### 4 | 5 | ### Variables 6 | set $mod Mod4 7 | set $left h 8 | set $down j 9 | set $up k 10 | set $right l 11 | set $term alacritty 12 | set $menu wofi --show run | xargs swaymsg exec -- 13 | 14 | ### Output configuration 15 | 16 | # xwayland disable 17 | # output Unknown-1 scale 2 18 | 19 | # On hidpi screens, this is needed to make the title bar a decent size 20 | font pango:SourceCodePro 12 21 | 22 | ### Idle configuration 23 | exec swayidle -w \ 24 | timeout 300 'swaylock -f -c 000000' \ 25 | timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \ 26 | before-sleep 'swaylock -f -c 000000' 27 | 28 | # 29 | # Input configuration 30 | # 31 | 32 | # Custom layout for macbook keyboard to map cmd->ctrl, opt->win, ctrl->opt 33 | input "1452:834:Apple_Internal_Keyboard_/_Trackpad" { 34 | xkb_layout "mac" 35 | } 36 | 37 | input "1:1:AT_Translated_Set_2_keyboard" { 38 | xkb_options "ctrl:nocaps,ctrl:swap_lalt_lctl" 39 | } 40 | 41 | input "1133:49979:Logitech_K840_Mechanical_Corded_Keyboard" { 42 | xkb_options "ctrl:nocaps,ctrl:swap_lalt_lctl" 43 | } 44 | 45 | ### Key bindings 46 | # 47 | # Basics: 48 | # 49 | # Start a terminal 50 | bindsym $mod+Return exec $term 51 | 52 | # Kill focused window 53 | bindsym $mod+Shift+q kill 54 | 55 | # Start your launcher 56 | bindsym $mod+d exec $menu 57 | 58 | # Drag floating windows by holding down $mod and left mouse button. 59 | # Resize them with right mouse button + $mod. 60 | # Despite the name, also works for non-floating windows. 61 | # Change normal to inverse to use left mouse button for resizing and right 62 | # mouse button for dragging. 63 | floating_modifier $mod normal 64 | 65 | # Reload the configuration file 66 | bindsym $mod+Shift+c reload 67 | 68 | # Exit sway (logs you out of your Wayland session) 69 | bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit' 70 | 71 | # Move your focus around 72 | bindsym $mod+$left focus left 73 | bindsym $mod+$down focus down 74 | bindsym $mod+$up focus up 75 | bindsym $mod+$right focus right 76 | 77 | # Move the focused window with the same, but add Shift 78 | bindsym $mod+Shift+$left move left 79 | bindsym $mod+Shift+$down move down 80 | bindsym $mod+Shift+$up move up 81 | bindsym $mod+Shift+$right move right 82 | 83 | # Screenshots 84 | bindsym $mod+Print exec slurp | grim -g - ~/images/$(date +'%Y-%m-%d-%H%M%S_screenshot.png') 85 | 86 | # Use pactl to adjust volume in PulseAudio. 87 | bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +5% 88 | bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -5% 89 | bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle 90 | 91 | # Use light to adjust screen brightness. 92 | bindsym XF86MonBrightnessUp exec --no-startup-id light -A 5 93 | bindsym XF86MonBrightnessDown exec --no-startup-id light -U 5 94 | 95 | # 96 | # Workspaces: 97 | # 98 | # Switch to workspace 99 | bindsym $mod+1 workspace number 1 100 | bindsym $mod+2 workspace number 2 101 | bindsym $mod+3 workspace number 3 102 | bindsym $mod+4 workspace number 4 103 | bindsym $mod+5 workspace number 5 104 | bindsym $mod+6 workspace number 6 105 | bindsym $mod+7 workspace number 7 106 | bindsym $mod+8 workspace number 8 107 | bindsym $mod+9 workspace number 9 108 | bindsym $mod+0 workspace number 10 109 | 110 | # Move focused container to workspace 111 | bindsym $mod+Shift+1 move container to workspace number 1 112 | bindsym $mod+Shift+2 move container to workspace number 2 113 | bindsym $mod+Shift+3 move container to workspace number 3 114 | bindsym $mod+Shift+4 move container to workspace number 4 115 | bindsym $mod+Shift+5 move container to workspace number 5 116 | bindsym $mod+Shift+6 move container to workspace number 6 117 | bindsym $mod+Shift+7 move container to workspace number 7 118 | bindsym $mod+Shift+8 move container to workspace number 8 119 | bindsym $mod+Shift+9 move container to workspace number 9 120 | bindsym $mod+Shift+0 move container to workspace number 10 121 | 122 | # 123 | # Layout stuff: 124 | # 125 | # You can "split" the current object of your focus with 126 | # $mod+b or $mod+v, for horizontal and vertical splits 127 | # respectively. 128 | bindsym $mod+b splith 129 | bindsym $mod+v splitv 130 | 131 | # Switch the current container between different layout styles 132 | bindsym $mod+s layout stacking 133 | bindsym $mod+w layout tabbed 134 | bindsym $mod+e layout toggle split 135 | 136 | # Make the current focus fullscreen 137 | bindsym $mod+f fullscreen 138 | 139 | # Toggle the current focus between tiling and floating mode 140 | bindsym $mod+Shift+space floating toggle 141 | 142 | # Swap focus between the tiling area and the floating area 143 | bindsym $mod+space focus mode_toggle 144 | 145 | # Move focus to the parent container 146 | bindsym $mod+a focus parent 147 | 148 | # 149 | # Scratchpad: 150 | # 151 | 152 | # Move the currently focused window to the scratchpad 153 | bindsym $mod+Shift+minus move scratchpad 154 | 155 | # Show the next scratchpad window or hide the focused scratchpad window. 156 | # If there are multiple scratchpad windows, this command cycles through them. 157 | bindsym $mod+minus scratchpad show 158 | 159 | # 160 | # Resizing containers: 161 | # 162 | mode "resize" { 163 | # left will shrink the containers width 164 | # right will grow the containers width 165 | # up will shrink the containers height 166 | # down will grow the containers height 167 | bindsym $left resize shrink width 10px 168 | bindsym $down resize grow height 10px 169 | bindsym $up resize shrink height 10px 170 | bindsym $right resize grow width 10px 171 | 172 | bindsym Shift+$left resize shrink width 50px 173 | bindsym Shift+$down resize grow height 50px 174 | bindsym Shift+$up resize shrink height 50px 175 | bindsym Shift+$right resize grow width 50px 176 | 177 | # Return to default mode 178 | bindsym Return mode "default" 179 | bindsym Escape mode "default" 180 | } 181 | bindsym $mod+r mode "resize" 182 | 183 | # 184 | # Status Bar: 185 | # 186 | bar { 187 | position bottom 188 | font pango:SourceCodePro, Font Awesome 6 Free Regular 12 189 | status_command i3status-rs $HOME/.config/i3status-rust/config.toml 190 | colors { 191 | separator #666666 192 | background #222222 193 | statusline #dddddd 194 | focused_workspace #0088CC #0088CC #ffffff 195 | active_workspace #333333 #333333 #ffffff 196 | inactive_workspace #333333 #333333 #888888 197 | urgent_workspace #2f343a #900000 #ffffff 198 | } 199 | } 200 | 201 | # Notifier 202 | exec mako 203 | 204 | # Dynamic display config 205 | exec_always pkill kanshi; exec kanshi 206 | 207 | include /etc/sway/config.d/* 208 | -------------------------------------------------------------------------------- /gui/.xkb/symbols/mac: -------------------------------------------------------------------------------- 1 | default partial alphanumeric_keys modifier_keys 2 | xkb_symbols "basic" { 3 | include "us" 4 | include "ctrl(nocaps)" 5 | 6 | name[Group1]= "Mac-friendly"; 7 | 8 | key { [ Control_L ] }; 9 | key { [ Control_R ] }; 10 | key { [ Super_L, Super_L ] }; 11 | key { [ Alt_L ] }; 12 | 13 | 14 | modifier_map Mod4 { Super_L, Super_R }; 15 | modifier_map Control { , }; 16 | }; 17 | -------------------------------------------------------------------------------- /shell/.config/starship.toml: -------------------------------------------------------------------------------- 1 | # Don't print a new line at the start of the prompt 2 | add_newline = false 3 | 4 | # Replace the "❯" symbol in the prompt 5 | [character] 6 | success_symbol = "\\$" 7 | error_symbol = "[\\$](red)" 8 | vicmd_symbol = "&" 9 | 10 | # The line_break module separates the prompt into two lines. 11 | [line_break] 12 | disabled = true 13 | 14 | [username] 15 | format = "[$user]($style)" 16 | style_user = "bold blue" 17 | show_always = true 18 | 19 | [hostname] 20 | format = "@[$hostname]($style) " 21 | style = "bold grey" 22 | ssh_only = false 23 | disabled = false 24 | 25 | [directory] 26 | truncation_length = 5 27 | 28 | # Disable the package module, hiding it from the prompt completely 29 | [package] 30 | disabled = true 31 | 32 | [aws] 33 | disabled = true 34 | 35 | [docker_context] 36 | disabled = true 37 | 38 | [golang] 39 | disabled = true 40 | -------------------------------------------------------------------------------- /shell/.gitconfig: -------------------------------------------------------------------------------- 1 | [core] 2 | editor = "nvim" 3 | 4 | [user] 5 | name = lightclient 6 | email = lightclient@protonmail.com 7 | signingkey = 062431612E12367DAE0E24766E5E56B80EE509D2 8 | 9 | [init] 10 | defaultBranch = main 11 | 12 | [diff] 13 | external = difft --display=inline 14 | 15 | [alias] 16 | dlog = -c diff.external=difft log --ext-diff 17 | dshow = -c diff.external=difft show --ext-diff 18 | ddiff = -c diff.external=difft diff 19 | 20 | [gpg] 21 | program = gpg 22 | 23 | [commit] 24 | gpgsign = true 25 | -------------------------------------------------------------------------------- /shell/.gnupg/gpg-agent.conf: -------------------------------------------------------------------------------- 1 | enable-ssh-support 2 | -------------------------------------------------------------------------------- /shell/.gnupg/sshcontrol: -------------------------------------------------------------------------------- 1 | # List of allowed ssh keys. Only keys present in this file are used 2 | # in the SSH protocol. The ssh-add tool may add new entries to this 3 | # file to enable them; you may also add them manually. Comment 4 | # lines, like this one, as well as empty lines are ignored. Lines do 5 | # have a certain length limit but this is not serious limitation as 6 | # the format of the entries is fixed and checked by gpg-agent. A 7 | # non-comment line starts with optional white spaces, followed by the 8 | # keygrip of the key given as 40 hex digits, optionally followed by a 9 | # caching TTL in seconds, and another optional field for arbitrary 10 | # flags. Prepend the keygrip with an '!' mark to disable it. 11 | 12 | 87E8AEFCEB77061508D7A2A9118B26D8DD8E33AA 13 | -------------------------------------------------------------------------------- /shell/.ssh/config: -------------------------------------------------------------------------------- 1 | Match host * exec "gpg-connect-agent UPDATESTARTUPTTY /bye" 2 | ServerAliveInterval 60 3 | ServerAliveCountMax 120 4 | -------------------------------------------------------------------------------- /shell/.tmux.conf: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # general settings # 3 | ############################################################################### 4 | 5 | # set scroll history to 100,000 lines 6 | set-option -g history-limit 100000 7 | 8 | # prefix key 9 | set -g prefix C-f 10 | unbind C-b 11 | bind C-f send-prefix 12 | 13 | # keys 14 | bind k confirm kill-window 15 | bind K confirm kill-server 16 | bind v split-window -h -c "#{pane_current_path}" 17 | bind h split-window -v -c "#{pane_current_path}" 18 | bind < resize-pane -L 3 19 | bind > resize-pane -R 3 20 | bind - resize-pane -D 3 21 | bind + resize-pane -U 3 22 | bind . command-prompt 23 | bind a last-window 24 | bind C-N swap-window -t -1 25 | bind C-M swap-window -t +1 26 | 27 | # fix titlebar 28 | set -g set-titles on 29 | set -g set-titles-string "#T" 30 | 31 | # vim mode 32 | set -g mode-keys vi 33 | 34 | # mouse friendly 35 | set -g mouse on 36 | 37 | ############################################################################### 38 | # design changes # 39 | ############################################################################### 40 | 41 | # modern colors 42 | set -g default-terminal "xterm-256color" 43 | 44 | # for neovim 45 | set-option -sg escape-time 10 46 | set-option -sg focus-events on 47 | 48 | # Undercurl 49 | set -g default-terminal "${TERM}" 50 | set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm' # undercurl support 51 | 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 52 | 53 | # default statusbar colors 54 | set-option -g status-style fg=colour8 55 | set-option -g status-style bg=colour23 56 | 57 | # default window title colors 58 | set-window-option -g window-status-style fg=colour244 59 | 60 | # active window title colors 61 | set-window-option -g window-status-current-style fg=colour73 62 | 63 | # pane border 64 | set-option -g pane-border-style fg=colour8 65 | set-option -g pane-active-border-style fg=colour23 66 | 67 | # message text 68 | set-option -g message-style fg=colour73 69 | set-option -g message-style bg=colour23 70 | 71 | # pane number display 72 | set-option -g display-panes-active-colour colour33 #blue 73 | set-option -g display-panes-colour colour73 #orange 74 | 75 | # clock 76 | set-window-option -g clock-mode-colour colour64 #green 77 | 78 | # bell 79 | set-window-option -g window-status-bell-style fg=colour23,bg=colour160 #base02, red 80 | -------------------------------------------------------------------------------- /shell/.zshrc: -------------------------------------------------------------------------------- 1 | # ZSH configuration 2 | PROMPT="%~ $ " 3 | EDITOR="nvim" 4 | DEV_WORKSPACE=~/dev 5 | PATH=$HOME/.bin:$PATH 6 | 7 | # History (https://unix.stackexchange.com/questions/273861/unlimited-history-in-zsh) 8 | HISTFILE="$HOME/.zsh_history" 9 | HISTSIZE=10000000 10 | SAVEHIST=10000000 11 | HISTORY_IGNORE="(l|ls|ll|la|cd|pwd|exit|cd ..)" 12 | 13 | setopt BANG_HIST # Treat the '!' character specially during expansion. 14 | setopt EXTENDED_HISTORY # Write the history file in the ":start:elapsed;command" format. 15 | setopt INC_APPEND_HISTORY # Write to the history file immediately, not when the shell exits. 16 | setopt SHARE_HISTORY # Share history between all sessions. 17 | setopt HIST_EXPIRE_DUPS_FIRST # Expire duplicate entries first when trimming history. 18 | setopt HIST_IGNORE_DUPS # Don't record an entry that was just recorded again. 19 | setopt HIST_IGNORE_ALL_DUPS # Delete old recorded entry if new entry is a duplicate. 20 | setopt HIST_FIND_NO_DUPS # Do not display a line previously found. 21 | setopt HIST_IGNORE_SPACE # Don't record an entry starting with a space. 22 | setopt HIST_SAVE_NO_DUPS # Don't write duplicate entries in the history file. 23 | setopt HIST_REDUCE_BLANKS # Remove superfluous blanks before recording entry. 24 | setopt HIST_VERIFY # Don't execute immediately upon history expansion. 25 | setopt HIST_BEEP # Beep when accessing nonexistent history. 26 | 27 | # vim mode (https://dougblack.io/words/zsh-vi-mode.html) 28 | bindkey -v 29 | bindkey -M viins '^J' vi-cmd-mode 30 | 31 | bindkey '^?' backward-delete-char 32 | bindkey '^h' backward-delete-char 33 | bindkey '^w' backward-kill-word 34 | bindkey '^r' history-incremental-search-backward 35 | 36 | # search history with up & down keys 37 | autoload -U up-line-or-beginning-search 38 | autoload -U down-line-or-beginning-search 39 | zle -N up-line-or-beginning-search 40 | zle -N down-line-or-beginning-search 41 | bindkey "^P" up-line-or-beginning-search # Up 42 | bindkey "^N" down-line-or-beginning-search # Down 43 | 44 | bindkey -s "^[[A" "\a" 45 | bindkey -s "^[[B" "\a" 46 | 47 | function zle-line-init zle-keymap-select { 48 | VIM_PROMPT="%{$fg_bold[yellow]%} [% NORMAL]% %{$reset_color%}" 49 | RPS1="${${KEYMAP/vicmd/$VIM_PROMPT}/(main|viins)/} $EPS1" 50 | zle reset-prompt 51 | } 52 | 53 | zle -N zle-line-init 54 | zle -N zle-keymap-select 55 | export KEYTIMEOUT=1 56 | 57 | if command -v nvim > /dev/null; then 58 | alias vim=nvim 59 | alias vi=nvim 60 | fi 61 | 62 | if ! command -v git-pr > /dev/null; then 63 | mkdir -p "$HOME/.scripts" 64 | wget -q https://raw.githubusercontent.com/erikmd/git-scripts/master/bin/git-prw -O "$HOME/.scripts/git-pr" 65 | chmod u+x "$HOME/.scripts/git-pr" 66 | fi 67 | export PATH="$HOME/.scripts:$PATH" 68 | 69 | # rust config 70 | export PATH="$HOME/.cargo/bin:$PATH" 71 | 72 | # preserve current environment when sudoing 73 | alias sudo='sudo -E' 74 | 75 | # get pubilc ip address 76 | alias whatsmyip='curl ifconfig.me' 77 | 78 | if command -v exa > /dev/null; then 79 | alias l='exa' 80 | alias ll='exa' 81 | alias ll='exa -l' 82 | alias la='exa -lag' 83 | else 84 | alias l='ls' 85 | alias ll='ls' 86 | alias ll='ls -l' 87 | alias la='ls -la' 88 | fi 89 | 90 | # use rg instead of grep for fzf 91 | if command -v rg > /dev/null; then 92 | export FZF_DEFAULT_COMMAND=$'rg --files --hidden --glob '!.git'' 93 | fi 94 | 95 | [ -f ~/.fzf.zsh ] && source ~/.fzf.zsh 96 | 97 | # set gpg agent 98 | export GPG_TTY=$(tty) 99 | export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket) 100 | gpgconf --launch gpg-agent 101 | # echo UPDATESTARTUPTTY | gpg-connect-agent 102 | 103 | # golang config 104 | export GOPATH=$DEV_WORKSPACE/go-workspace # don't forget to change your path correctly! 105 | export GOBIN=$GOPATH/bin 106 | export PATH=$PATH:$GOPATH/bin 107 | 108 | # pyenv config 109 | export PYENV_ROOT="$HOME/.pyenv" 110 | export PATH="$PYENV_ROOT/bin:$PATH" 111 | if command -v pyenv 1>/dev/null 2>&1; then 112 | eval "$(pyenv init --path)" 113 | eval "$(pyenv init -)" 114 | fi 115 | 116 | # tmux config 117 | alias tmux="tmux -u" 118 | 119 | # nvm config 120 | case `uname` in 121 | Darwin) 122 | export NVM_DIR="$HOME/.nvm" 123 | [ -s "/opt/homebrew/opt/nvm/nvm.sh" ] && \. "/opt/homebrew/opt/nvm/nvm.sh" # This loads nvm 124 | [ -s "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" ] && \. "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" # This loads nvm bash_completion 125 | 126 | HOMEBREW_NO_ENV_HINTS=1 127 | ;; 128 | Linux) 129 | export NVM_DIR="$HOME/.nvm" 130 | [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" 131 | [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" 132 | ;; 133 | esac 134 | 135 | export TERM=xterm-256color 136 | 137 | eval "$(starship init zsh)" 138 | 139 | # The following lines were added by compinstall 140 | zstyle :compinstall filename '/home/matt/.zshrc' 141 | 142 | autoload -Uz compinit 143 | compinit 144 | # End of lines added by compinstall 145 | 146 | export PATH="$PATH:/Users/matt/.foundry/bin" 147 | --------------------------------------------------------------------------------