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.nvimOpen 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.