Welcome to my Neovim configuration! This repository contains my custom Neovim setup tailored for web development and other programming languages, including support for React, TypeScript, JavaScript, Java, PHP/Laravel, and more. It is built using NvChad as the base configuration and extended with additional plugins and customizations.
- LSP Support with
nvim-lspconfigandmason.nvim - Formatting/Linting with
null-ls.nvim - Autocompletion with
nvim-cmpandcopilot.vim - Git Integration with
gitsigns.nvim - Debugging with
nvim-dap
git clone https://github.com/rulshrm/my-dotfiles.nvim.git ~/.config/nvimInstall dependencies:
- Neovim (v0.8+)
- Node.js
- Python
- Go
- Rust
Then run in Neovim:
:Lazy sync;: Enter command modejk: Exit insert mode (in insert mode)<leader>ih: Toggle inlay hints<leader>tw: Toggle word wrap
gd: Go to Definitiongr: Go to ReferencesK: Show hover documentation<leader>rn: Rename symbol<leader>ca: Code actions[d: Previous diagnostic]d: Next diagnostic<leader>d: Show line diagnostics
<leader>f: Format current file with conform.nvim
<Tab>: Next tab<S-Tab>: Previous tab<leader>tc: Close current tab<leader>ba: Close all buffers except current<leader>bl: Close all buffers to the left<leader>br: Close all buffers to the right<leader>1-9: Go to specific tab<leader>0: Go to last tab
<leader>ws: Split horizontally<leader>wv: Split vertically<leader>wh: Move to left window<leader>wj: Move to bottom window<leader>wk: Move to top window<leader>wl: Move to right window<leader>wq: Close current window
<leader>ff: Find files<leader>fg: Live grep (search in files)<leader>fb: Find buffers<leader>fh: Find help tags
<leader>gs: Stage hunk<leader>gu: Undo stage hunk<leader>gp: Preview hunk<leader>gb: Blame line<leader>gr: Reset hunk<leader>gR: Reset buffer
<leader>gg: Open Git Graph<leader>gf: Show File History<leader>gdf: Show Git Diff
<leader>gco: Choose Ours<leader>gct: Choose Theirs<leader>gcb: Choose Both<leader>gcn: Next Conflict<leader>gcp: Previous Conflict
<leader>jr: Run Java file<leader>jR: Run Java file with arguments<leader>jt: Run Java test class<leader>jn: Run nearest Java test method<leader>jo: Organize imports<leader>jb: Toggle breakpoint<leader>jem: Extract method (visual mode)<leader>jev: Extract variable (visual mode)
<leader>pr: Run Python file<leader>pR: Run Python file with arguments<leader>pv: Run Python with virtual environment<leader>pt: Run pytest (all tests)<leader>pf: Run current test file
<F5>: Start/Continue debugging<F10>: Step over<F11>: Step into<F12>: Step out<leader>db: Toggle breakpoint<leader>dr: Open debug REPL
<Tab>: Accept suggestion<C-n>: Next suggestion<C-p>: Previous suggestion<C-d>: Dismiss suggestion<leader>ct: Toggle inline suggestions (on/off)<leader>cT: Toggle Copilot completely (disable/enable)<leader>cc: Open Copilot Chat<leader>ce: Explain code with Copilot<leader>cr: Review code with Copilot<leader>cf: Refactor code with Copilot<leader>cd: Generate documentation<leader>cb: Fix bugs with Copilot<leader>co: Optimize code with Copilot
<leader>rr: Run HTTP request<leader>rp: Preview HTTP request<leader>rl: Run last HTTP request
<leader>re: Extract function (visual mode)<leader>rf: Extract function to file (visual mode)<leader>rv: Extract variable (visual mode)<leader>ri: Inline variable (visual mode)<leader>rb: Extract block<leader>rbf: Extract block to file
<leader>la: Laravel Artisan<leader>lr: Laravel Routes<leader>lm: Laravel Make<leader>lt: Laravel Tinker<leader>lc: Composer
zc: Close fold under cursorzo: Open fold under cursorza: Toggle fold under cursorzM: Close all foldszR: Open all folds
## File Structure
~/.config/nvim/
├── init.lua # Main configuration file
├── lazy-lock.json # Plugin version lock file
├── LICENSE # MIT License file
├── README.md # Documentation
└── lua/ # Lua configurations
├── configs/ # Plugin configurations
│ ├── autocmds.lua # Auto commands
│ ├── barbar.lua # Tab line configuration
│ ├── cmp.lua # Completion configuration
│ ├── copilot-chat.lua # GitHub Copilot chat
│ ├── discord.lua # Discord presence
│ ├── folding.lua # Code folding settings
│ ├── gitsigns.lua # Git integration
│ ├── java_utils.lua # Java utilities
│ ├── lspconfig.lua # LSP configuration
│ ├── notify.lua # Notification system
│ ├── null-ls.lua # Formatting/linting
│ ├── null-ls-patch.lua # Patches for null-ls
│ ├── refactoring.lua # Code refactoring
│ ├── rest.lua # HTTP client
│ ├── telescope.lua # Fuzzy finder
│ ├── treesitter.lua # Syntax highlighting
│ └── which-key.lua # Keybinding helper
├── mappings.lua # Key mappings
├── options.lua # Neovim options
└── plugins/ # Plugin definitions
├── completion/ # Completion plugins
│ └── init.lua
├── docs/ # Documentation plugins
│ └── init.lua
├── editor/ # Editor enhancement plugins
│ └── init.lua
├── git/ # Git-related plugins
│ └── init.lua
├── lsp/ # Language Server plugins
│ └── init.lua
├── ui/ # User Interface plugins
│ └── init.lua
└── init.lua # Core plugins
lua/configs/: Contains configuration files for individual pluginslua/plugins/: Contains plugin declarations and groupingslua/: Core Neovim configurationsmappings.lua: All keybindingsoptions.lua: Neovim options and settings
- Core Plugins:
plugins/init.lua- Basic and essential plugins - Completion Plugins:
plugins/completion/init.lua- Autocompletion and snippets - Editor Plugins:
plugins/editor/init.lua- Editor enhancements - Git Plugins:
plugins/git/init.lua- Git integration features - LSP Plugins:
plugins/lsp/init.lua- Language server related plugins - UI Plugins:
plugins/ui/init.lua- User interface improvements - Documentation Plugins:
plugins/docs/init.lua- Documentation generation
Each plugin configuration in configs/ follows a modular approach:
- LSP:
lspconfig.lua- Language server configurations - Formatting:
null-ls.lua- Code formatting and linting - Git:
gitsigns.lua- Git integration features - Completion:
cmp.lua- Autocompletion settings - Java:
java_utils.lua- Java-specific utilities - UI:
notify.lua,which-key.lua- User interface enhancements - Editor:
folding.lua,treesitter.lua- Editor functionality - Tools:
rest.lua,refactoring.lua- Development tools
This configuration is open-source and available under the MIT License.