|
1 | 1 | # My personal NeoVim config
|
2 | 2 |
|
| 3 | +## Installation |
| 4 | + |
| 5 | +1. Clone this repo to your `~/.config/nvim` |
| 6 | +2. Run the following command to install all the plugins in headless mode |
| 7 | + |
| 8 | + ```sh |
| 9 | + nvim --headless '+Lazy! sync' +qa |
| 10 | + ``` |
| 11 | + |
| 12 | +3. Open any file using `nvim` for the first time to initiate `treesitter` and `mason` plugins |
| 13 | + |
| 14 | +4. run the following command to install additional `mason` plugins |
| 15 | + |
| 16 | + ```vim |
| 17 | + :MasonToolsInstallSync |
| 18 | + ``` |
| 19 | + |
| 20 | +5. You should good to go! |
| 21 | + |
| 22 | +## Plugins |
| 23 | + |
| 24 | +### Essentials |
| 25 | + |
| 26 | +- [`folke/lazy.nvim`](https://github.com/folke/lazy.nvim) |
| 27 | +- [`folke/noice.nvim`](https://github.com/folke/noice.nvim) |
| 28 | +- [`folke/snacks.nvim`](https://github.com/folke/snacks.nvim) with the following subpackages are enabled : |
| 29 | + - [`Snacks.dashboard`](https://github.com/folke/snacks.nvim/blob/main/docs/dashboard.md) |
| 30 | + - [`Snacks.explorer`](https://github.com/folke/snacks.nvim/blob/main/docs/explorer.md) |
| 31 | + - [`Snacks.input`](https://github.com/folke/snacks.nvim/blob/main/docs/input.md) |
| 32 | + - [`Snacks.indent`](https://github.com/folke/snacks.nvim/blob/main/docs/indent.md) |
| 33 | + - [`Snacks.image`](https://github.com/folke/snacks.nvim/blob/main/docs/image.md) |
| 34 | + - [`Snacks.notifier`](https://github.com/folke/snacks.nvim/blob/main/docs/notifier.md) |
| 35 | + - [`Snacks.picker`](https://github.com/folke/snacks.nvim/blob/main/docs/picker.md) |
| 36 | + - [`Snacks.statuscolumn`](https://github.com/folke/snacks.nvim/blob/main/docs/statuscolumn.md) |
| 37 | + - [`Snacks.terminal`](https://github.com/folke/snacks.nvim/blob/main/docs/terminal.md) |
| 38 | +- [`folke/trouble.nvim`](https://github.com/folke/trouble.nvim) |
| 39 | +- [`folke/which-key.nvim`](https://github.com/folke/which-key.nvim) |
| 40 | +- [`stevearc/conform.nvim`](https://github.com/stevearc/conform.nvim) |
| 41 | +- [`neovim/nvim-lspconfig`](https://github.com/neovim/nvim-lspconfig) |
| 42 | +- [`MunifTanjim/nui.nvim`](https://github.com/MunifTanjim/nui.nvim) |
| 43 | +- [`echasnovski/mini.nvim`](https://github.com/echasnovski/mini.nvim) with the following subpackages are enabled : |
| 44 | + - [`mini.comment`](https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-comment.md) |
| 45 | + - [`mini.icons`](https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-icons.md) |
| 46 | + - [`mini.pairs`](https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-pairs.md) |
| 47 | + - [`mini.snippets`](https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-snippets.md) |
| 48 | + - [`mini.statusline`](https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-statusline.md) |
| 49 | + - [`mini.surround`](https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-surround.md) |
| 50 | +- [`williamboman/mason.nvim`](https://github.com/williamboman/mason.nvim) |
| 51 | + - [`williamboman/mason-lspconfig.nvim`](https://github.com/williamboman/mason-lspconfig.nvim) |
| 52 | + - [`WhoIsSethDaniel/mason-tool-installer.nvim`](https://github.com/WhoIsSethDaniel/mason-tool-installer.nvim) |
| 53 | +- [`nvim-treesitter/nvim-treesitter`](https://github.com/nvim-treesitter/nvim-treesitter) |
| 54 | + - [`nvim-treesitter/nvim-treesitter-context`](https://github.com/nvim-treesitter/nvim-treesitter-context) |
| 55 | + - [`nvim-treesitter/nvim-treesitter-textobjects`](https://github.com/nvim-treesitter/nvim-treesitter-textobjects) |
| 56 | + - [`JoosepAlviste/nvim-ts-context-commentstring`](https://github.com/JoosepAlviste/nvim-ts-context-commentstring) |
| 57 | + - [`windwp/nvim-ts-autotag`](https://github.com/windwp/nvim-ts-autotag) |
| 58 | + - [`EmranMR/tree-sitter-blade`](https://github.com/EmranMR/tree-sitter-blade) |
| 59 | + - [`pnx/tree-sitter-dotenv`](https://github.com/pnx/tree-sitter-dotenv) |
| 60 | + |
| 61 | +### Extras |
| 62 | + |
| 63 | +- [`folke/lazydev.nvim`](https://github.com/folke/lazydev.nvim) |
| 64 | +- [`ricardoramirezr/blade-nav.nvim`](https://github.com/ricardoramirezr/blade-nav.nvim) |
| 65 | + |
| 66 | +### Completion |
| 67 | + |
| 68 | +- [`saghen/blink.cmp`](https://github.com/saghen/blink.cmp) |
| 69 | +- [`saghen/blink.compat`](https://github.com/saghen/blink.compat) |
| 70 | +- [`rafamadriz/friendly-snippets`](https://github.com/rafamadriz/friendly-snippets) |
| 71 | + |
| 72 | +### Debugging |
| 73 | + |
| 74 | +- [`mfussenegger/nvim-dap`](https://github.com/mfussenegger/nvim-dap) with the following debuggers pre-configured : |
| 75 | + - [`js-debug-adapter`](https://github.com/microsoft/vscode-js-debug) to integrate with chromium-base browsers (`chrome`, `edge`, etc) for debugging node backend and js/ts frontend |
| 76 | + - [`php-debug-adapter`](https://github.com/xdebug/vscode-php-debug) to integrate with `ext-xdebug` |
| 77 | + - [`firefox-debug-adapter`](https://github.com/firefox-devtools/vscode-firefox-debug) to debug js/ts frontend using `firefox` |
| 78 | +- [`rcarriga/nvim-dap-ui`](https://github.com/rcarriga/nvim-dap-ui) |
| 79 | +- [`jay-babu/mason-nvim-dap.nvim`](https://github.com/jay-babu/mason-nvim-dap.nvim) |
| 80 | +- [`theHamsta/nvim-dap-virtual-text`](https://github.com/theHamsta/nvim-dap-virtual-text) |
| 81 | +- [`LiadOz/nvim-dap-repl-highlights`](https://github.com/LiadOz/nvim-dap-repl-highlights) |
| 82 | + |
| 83 | +### Git |
| 84 | + |
| 85 | +- [`lewis6991/gitsigns.nvim`](https://github.com/lewis6991/gitsigns.nvim) |
| 86 | +- [`akinsho/git-conflict.nvim`](https://github.com/akinsho/git-conflict.nvim) |
| 87 | + |
| 88 | +### Testing |
| 89 | + |
| 90 | +- [`nvim-neotest/neotest`](https://github.com/nvim-neotest/neotest) |
| 91 | +- [`nvim-neotest/nvim-nio`](https://github.com/nvim-neotest/nvim-nio) |
| 92 | +- [`nvim-lua/plenary.nvim`](https://github.com/nvim-lua/plenary.nvim) |
| 93 | +- [`V13Axel/neotest-pest`](https://github.com/V13Axel/neotest-pest) |
| 94 | +- [`olimorris/neotest-phpunit`](https://github.com/olimorris/neotest-phpunit) |
| 95 | +- [`marilari88/neotest-vitest`](https://github.com/marilari88/neotest-vitest) |
| 96 | + |
3 | 97 | ## Keymaps
|
4 | 98 |
|
5 | 99 | - Diagnostics
|
6 | 100 | - `[d` and `]d` : Jump to previous and next diagnostics
|
7 | 101 | - `[e` and `]e` : Jump to previous and next error diagnostics
|
8 | 102 | - `[w` and `]w` : Jump to previous and next warning diagnostics
|
9 | 103 | - `<leader>`+`e` : Open floating diagnostic message
|
10 |
| - - `<leader>`+`q` : Open diagnostic list |
11 |
| - - `<leader>`+`xx` : [Trouble] Toggle diagnostics |
12 |
| - - `<leader>`+`xX` : [Trouble] Buffer diagnostics |
13 |
| - - `<leader>`+`xs` : [Trouble] Symbols |
14 |
| - - `<leader>`+`xl` : [Trouble] LSP Definitions |
15 |
| - - `<leader>`+`xL` : [Trouble] Location list |
16 |
| - - `<leader>`+`xq` : [Trouble] Quickfix list |
| 104 | + - `<leader>`+`ea` : Open workspace diagnostics |
| 105 | + - `<leader>`+`ee` : Open buffer diagnostic |
17 | 106 | - Buffer
|
18 | 107 | - `<` and `>` : Dedent and Indent line(s) on `visual` mode
|
19 | 108 | - `ALT`+`j`/`k` : Move line(s) down or up
|
20 |
| - - `CTRL`+`j`/`k` : Scroll 4 lines down or up |
21 |
| - - `TAB` or `SHIFT`+`TAB` : Navigate to next or previous completion item (insert mode) |
22 |
| - - `<leader>`+`fb` : Format current buffer |
23 |
| - - `<leader>`+`fl` : Lint current buffer |
| 109 | + - `<leader>`+`fo` : Format current buffer |
24 | 110 | - Panes / Splits
|
25 | 111 | - `ALT`+`Up`/`Down` arrow : Increase or decrease window height
|
26 | 112 | - `ALT`+`Left`/`Right` arrow : Decrease or increase window width
|
27 | 113 | - `CTRL`+`h`/`j`/`k`/`l` : Jump to `left`, `below`, `above` or `right` window
|
28 | 114 | - `CTRL`+<code>`</code> : Toggle integrated terminal
|
| 115 | +- Language Services |
| 116 | + - `K` : Show signature help |
| 117 | + - `gd` : Goto Definition |
| 118 | + - `gD` : Goto Declaration |
| 119 | + - `gr` : Goto References |
| 120 | + - `gi` : Goto Implementation |
| 121 | + - `gy` : Goto Type Definition |
| 122 | + - `<leader>`+`s` : Workspace Symbols |
| 123 | + - `<leader>`+`ss` : Document Symbols |
| 124 | + - `<leader>`+`rn` : Rename Symbol |
| 125 | + - `<C-.>` : Code Action |
| 126 | +- Git |
| 127 | + - `<leader>`+`gg` : Open lazygit |
| 128 | + - `<leader>`+`gl` : Toggle Git Logs Picker |
| 129 | + - Hunks |
| 130 | + - `[h` and `]h` : Jump to previous and next hunk |
| 131 | + - `[H` and `]H` : Jump to first and last hunk |
| 132 | + - `<leader>`+`hs` : Toggle Stage Hunk |
| 133 | + - `<leader>`+`hS` : Toggle Stage Buffer |
| 134 | + - `<leader>`+`hr` : Reset Hunk |
| 135 | + - `<leader>`+`hR` : Reset Buffer |
| 136 | + - `<leader>`+`h?` : Toggle Preview Hunk |
| 137 | + - Conflicts |
| 138 | + - `<leader>`+`co` : Choose ours |
| 139 | + - `<leader>`+`ct` : Choose theirs |
| 140 | + - `<leader>`+`c0` : Choose none |
| 141 | + - `<leader>`+`cb` : Choose both |
29 | 142 | - File Navigations
|
30 |
| - - `TAB` or `SHIFT`+`TAB` : Navigate to next or previous buffer windows (normal mode) |
| 143 | + - `TAB` or `SHIFT`+`TAB` : Navigate to next or previous buffers (normal mode) |
31 | 144 | - `n` and `N` : Jump to previous and next search results and keep the cursor in the center
|
32 |
| - - `gd` : [G]oto [D]efinition |
33 |
| - - `gD` : [G]oto [D]eclaration |
34 |
| - - `gr` : [G]oto [R]eferences |
35 |
| - - `gI` : [G]oto [I]mplementation |
36 |
| - - `K` : Show signature help |
37 |
| - - `<leader>`+`D` : Type [D]efinition |
38 |
| - - `<leader>`+`ds` : [D]ocument [S]ymbols |
39 |
| - - `<leader>`+`ws` : [W]orkspace [S]ymbols |
40 |
| - - `<leader>`+`rn` : [R]e[n]ame |
41 |
| - - `<leader>`+`ca` : [C]ode [A]ction |
42 |
| - - `<leader>`+`th` : [T]oggle Signature [H]elp (if any) |
43 |
| - - `<leader>`+`ge` : Git explorer |
44 |
| - - `<leader>`+`be` : Buffers explorer |
45 |
| - - `<leader>`+`fe` : File explorer |
46 |
| - - `<leader>`+`<space>` : Find files from existing buffer |
47 |
| - - `<leader>`+`ff` : Find files |
48 |
| - - `<leader>`+`fw` : Find current word |
49 |
| - - `<C-p>` : Find files inside git repository |
50 |
| - - `<leader>`+`ds` : Find document symbols |
| 145 | + - `<leader>`+`f` : File explorer |
| 146 | + - `<leader>`+`ff` : Find Buffers |
| 147 | + - `<leader>`+`fg` : Find File in current git repo |
| 148 | + - `<leader>`+`r` : Rename File |
| 149 | + - `<leader>`+`<space>` : File Picker |
| 150 | + - `<C-f>` : Find files |
| 151 | + - `<C-p>` : Projects Picker |
51 | 152 | - Testing
|
52 |
| - - `<leader>`+`tr` : [T]est [R]un |
53 |
| - - `<leader>`+`tx` : [T]est stop |
54 |
| - - `<leader>`+`td` : [T]est run with [D]AP |
55 |
| - - `<leader>`+`tf` : [T]est [F]ile |
56 |
| - - `<leader>`+`ts` : [T]est [S]uite |
57 |
| - - `<leader>`+`to` : [T]est [O]utput |
58 |
| - - `<leader>`+`top` : [T]est [O]utput [P]anel |
59 |
| - - `<leader>`+`tS` : Toggle [T]est [S]ummary |
| 153 | + - `<leader>`+`t` : Toggle Test Summary |
| 154 | + - `<leader>`+`tr` : Test Run |
| 155 | + - `<leader>`+`tx` : Test stop |
| 156 | + - `<leader>`+`td` : Test run with DAP |
| 157 | + - `<leader>`+`tf` : Test File |
| 158 | + - `<leader>`+`ts` : Test Suite |
| 159 | + - `<leader>`+`to` : Test Output |
| 160 | + - `<leader>`+`tp` : Test Output Panel |
60 | 161 | - Debugging
|
61 | 162 | - `F1` : Debug: Step into
|
62 | 163 | - `F2` : Debug: Step over
|
63 | 164 | - `F3` : Debug: Step out
|
64 | 165 | - `F4` : Debug: Step back
|
65 | 166 | - `F5` : Start debugger
|
66 | 167 | - `F7` : Toggle DAP UI
|
67 |
| - - `<leader>`+`b` : Toggle breakpoint |
68 |
| - - `<leader>`+`?` : Debug: Evaluate value under the cursor |
| 168 | + - `<leader>`+`db` : Toggle breakpoint |
| 169 | + - `<leader>`+`dc` : Clear all breakpoints |
| 170 | + - `<leader>`+`dd` : Evaluate value under the cursor |
69 | 171 |
|
70 | 172 | ## License
|
71 | 173 |
|
|
0 commit comments