A personal Neovim configuration built on packer.nvim, with LSP, completion, fuzzy finding, a file tree, and the Rose Pine theme.
Requires Neovim 0.11+ (uses the modern
vim.lsp.config/vim.lsp.enableAPI).
- LSP via
nvim-lspconfig+mason.nvim+mason-lspconfig(auto-installs servers) - Completion with blink.cmp and
friendly-snippets - Fuzzy finding with Telescope
- File tree with nvim-tree
- Syntax highlighting with nvim-treesitter
- Quick file navigation with Harpoon
- Git integration with vim-fugitive
- Undo history with undotree
- AI completion with GitHub Copilot
-
Back up any existing config:
mv ~/.config/nvim ~/.config/nvim.bak
-
Clone this repo into your config directory:
git clone <your-repo-url> ~/.config/nvim
-
Install packer.nvim:
git clone --depth 1 https://github.com/wbthomason/packer.nvim \ ~/.local/share/nvim/site/pack/packer/start/packer.nvim -
Open Neovim and sync plugins:
nvim
Then run
:PackerSyncinside Neovim. Restart once it finishes β Mason will install the configured LSP servers (lua_ls,pyright,bashls,html,ts_ls, and more) on first launch.
.
βββ init.lua # entry point β loads the mehdi module
βββ lua/mehdi/
β βββ init.lua # requires packer / remap / set, sets up nvim-tree
β βββ packer.lua # plugin declarations
β βββ remap.lua # general keymaps
β βββ set.lua # editor options
βββ after/plugin/ # per-plugin keymaps & setup
βββ telescope.lua
βββ harpoon.lua
βββ undotree.lua
βββ fugitive.lua
βββ treesitter.lua
βββ colors.lua
Leader key is <Space>.
| Key | Action |
|---|---|
<leader>ff |
Format buffer (LSP) |
<leader>s |
Save file |
<leader>x |
Make current file executable |
<leader>rw |
Replace word under cursor |
<leader>p |
Paste over selection without yanking |
<leader>y |
Yank to system clipboard |
<leader>d |
Delete to void register |
J / K (visual) |
Move selected lines down / up |
<C-d> / <C-u> |
Half-page scroll, centered |
| Key | Action |
|---|---|
<leader>eo |
Open tree |
<leader>ec |
Close tree |
| Key | Action |
|---|---|
<leader>pf |
Find files |
<C-p> |
Find git files |
<leader>ps |
Grep for a string |
| Key | Action |
|---|---|
<leader>a |
Add file to Harpoon |
<C-e> |
Toggle quick menu |
<C-j>/<C-k>/<C-l>/<C-;> |
Jump to marked file 1β4 |
| Key | Action |
|---|---|
<leader>gt |
Open Fugitive (Git) |
<leader>u |
Toggle Undotree |
Released under the MIT License.