Skip to content

MehdiSmr/init.lua

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸŒ€ Neovim Config

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.enable API).

Features

  • 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

Installation

  1. Back up any existing config:

    mv ~/.config/nvim ~/.config/nvim.bak
  2. Clone this repo into your config directory:

    git clone <your-repo-url> ~/.config/nvim
  3. Install packer.nvim:

    git clone --depth 1 https://github.com/wbthomason/packer.nvim \
      ~/.local/share/nvim/site/pack/packer/start/packer.nvim
  4. Open Neovim and sync plugins:

    nvim

    Then run :PackerSync inside Neovim. Restart once it finishes β€” Mason will install the configured LSP servers (lua_ls, pyright, bashls, html, ts_ls, and more) on first launch.

Structure

.
β”œβ”€β”€ 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

Keybindings

Leader key is <Space>.

General

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

File tree (nvim-tree)

Key Action
<leader>eo Open tree
<leader>ec Close tree

Telescope

Key Action
<leader>pf Find files
<C-p> Find git files
<leader>ps Grep for a string

Harpoon

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

Git & history

Key Action
<leader>gt Open Fugitive (Git)
<leader>u Toggle Undotree

License

Released under the MIT License.

About

πŸŒ€ My Neovim config

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages