This repository contains my Neovim setup, optimized for development with rich features like LSP support, auto-completion, Git integration, file exploration, and more. The configuration leverages lazy.nvim
for efficient plugin management and mason.nvim
for managing language servers. Below is an overview of the features, plugin list, installation instructions, and specific plugin configurations.
-
Plugin Management
- Lazy Loading and Performance: Uses
lazy.nvim
to efficiently load plugins only when required, speeding up startup time and optimizing resource usage.
- Lazy Loading and Performance: Uses
-
LSP and Autocompletion
- LSP Support: Powered by
mason.nvim
andnvim-lspconfig
, providing autocompletion, diagnostics, and jump-to-definition for multiple programming languages. - Autocompletion with Snippets:
nvim-cmp
offers intelligent autocompletion, integrated withLuaSnip
and sources like buffer, path, and LSP. - AI Code Suggestions:
copilot.vim
andChatGPT.nvim
provide AI-driven autocompletion and code suggestions.
- LSP Support: Powered by
-
Code Navigation and Search
- Fuzzy Finder:
telescope.nvim
enables quick file, buffer, and symbol searching, with additional media file search viatelescope-media-files.nvim
. - File Explorer:
nvim-tree.lua
provides a navigable file tree with icons for files and folders. - Semantic Highlighting:
semantic-highlight.vim
adds semantic code highlighting, enhancing code readability and structure understanding. - Tag Navigation:
tagbar
plugin offers a sidebar for navigating functions, classes, and other tags in your code.
- Fuzzy Finder:
-
Git Integration
- Git Blame:
git-blame.nvim
displays blame information inline, showing who last modified each line. - Git Diff and Review:
diffview.nvim
provides a visual diff of changes and review capabilities within Neovim. - Conflict Management:
git-conflict.nvim
helps manage and resolve Git merge conflicts directly in Neovim. - LazyGit Integration:
lazygit.nvim
provides an interface to use LazyGit directly within Neovim.
- Git Blame:
-
Editing and Productivity Enhancements
- Commenting:
Comment.nvim
allows easy toggling of comments in code. - Auto-Save:
auto-save.nvim
automatically saves files when they are modified. - Auto Pairs:
nvim-autopairs
automatically closes brackets and quotes as you type. - Indentation Guides:
indent-blankline.nvim
shows indentation levels for better code structure visualization. - Todo Management:
todo-comments.nvim
highlights and organizes TODO comments for easy tracking of tasks. - Session Management:
impatient.nvim
caches plugins for faster startup times.
- Commenting:
-
UI and Aesthetic Customization
- Status Line:
lualine.nvim
provides a customizable and minimal status line. - Icons:
nvim-web-devicons
adds file-type icons, enhancing the look of Neovim's interface. - Color Schemes: Includes themes like
onedark.nvim
,sonokai
, and2077.nvim
for aesthetic customization. - Dashboard:
dashboard-nvim
provides a start screen with quick access to frequently used files and sessions. - Notifications:
nvim-notify
manages pop-up notifications with customizable visuals.
- Status Line:
-
Terminal Integration
- Toggleable Terminal:
toggleterm.nvim
adds a terminal inside Neovim that can be toggled on and off with a keybind.
- Toggleable Terminal:
-
Specialized Language Support
- LaTeX Support:
vimtex
provides rich LaTeX support for compiling and navigating LaTeX projects. - Matlab Support:
vim-matlab
offers Matlab language support, including syntax highlighting and file structure navigation. - JavaScript JSX Enhancements:
vim-jsx-pretty
improves JSX syntax highlighting for JavaScript projects.
- LaTeX Support:
-
Other Utilities
- Snippet Management:
vim-vsnip
manages code snippets for quick insertion. - Media File Search:
telescope-media-files.nvim
allows searching within media files. - Which Key:
which-key.nvim
shows possible keybindings, improving discoverability of shortcuts.
- Snippet Management:
Ensure you have Neovim v0.5+ installed. You can install or update Neovim with the following commands based on your system:
- macOS (Homebrew)
brew install neovim
- Ubuntu (APT)
sudo apt update sudo apt install neovim
- Windows
- Download the latest release from the Neovim GitHub Releases page.
- Extract the contents and add the
nvim
executable to your system path.
-
Homebrew (macOS and Linux): Recommended for managing dependencies and installations.
- Install Homebrew if you haven’t already:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- Install Homebrew if you haven’t already:
-
APT (Ubuntu/Debian)
- For Ubuntu and Debian users, most packages can be installed via APT.
These dependencies are needed for certain features and languages supported by your Neovim setup:
-
Java: Required for Java development and some plugins that rely on Java runtime.
- macOS:
brew install java
- Ubuntu:
sudo apt install default-jdk
- Windows:
- Download and install Java from Oracle’s website or AdoptOpenJDK.
- macOS:
-
Python: Required for Python development and some plugins.
- macOS:
brew install python
- Ubuntu:
sudo apt install python3
- Windows:
- Download from python.org and install it.
- macOS:
-
SQL: Required for SQLite database support.
- macOS:
brew install sqlite
- Ubuntu:
sudo apt install sqlite3
- Windows:
- Download the latest version from sqlite.org and add it to your system path.
- macOS:
-
PHP: Required for PHP development.
- macOS:
brew install php
- Ubuntu:
sudo apt install php
- Windows:
- Download from php.net and install it.
- macOS:
-
Go: Required for Go development.
- macOS:
brew install go
- Ubuntu:
sudo apt install golang
- Windows:
- Download from golang.org.
- macOS:
-
Rust: Required for Rust development.
- macOS:
brew install rust
- Ubuntu:
sudo apt install rustc
- Windows:
- Download and install Rust from rust-lang.org.
- macOS:
-
Ruby: Required for Ruby development and some plugins.
- macOS:
brew install ruby
- Ubuntu:
sudo apt install ruby-full
- Windows:
- Download from ruby-lang.org and install it.
- macOS:
-
Haskell: Required for Haskell development.
- macOS:
brew install ghc cabal-install
- Ubuntu:
sudo apt install ghc cabal-install
- Windows:
- Download from haskell.org and install it.
- macOS:
-
Node.js & npm: Required for JavaScript, TypeScript development, and many language servers.
- macOS:
brew install node
- Ubuntu:
sudo apt install nodejs npm
- Windows:
- Download from nodejs.org.
- macOS:
-
LaTeX (for
vimtex
andlatexindent
formatting): Required for LaTeX development.- macOS:
brew install --cask mactex
- Ubuntu:
sudo apt install texlive-full
- Windows:
- Install MiKTeX from miktex.org.
- macOS:
-
Perl: Required for Perl development.
- macOS:
brew install perl
- Ubuntu:
sudo apt install perl
- macOS:
-
Kotlin: Required for Kotlin development.
- macOS:
brew install kotlin
- Ubuntu:
sudo apt install kotlin
- macOS:
-
Docker: Required for Docker-related development.
- macOS:
brew install --cask docker
- Ubuntu:
sudo apt install docker.io
- Windows:
- Install Docker Desktop from docker.com.
- macOS:
-
Git: Necessary for version control and Git-related plugins.
- macOS:
brew install git
- Ubuntu:
sudo apt install git
- Windows:
- Download from git-scm.com.
- macOS:
-
LazyGit: For a more visual Git experience within Neovim.
- macOS:
brew install lazygit
- Ubuntu:
sudo add-apt-repository ppa:lazygit-team/release sudo apt update sudo apt install lazygit
- Windows:
- Download from LazyGit Releases.
- macOS:
-
Ripgrep: Required by Telescope for live grep functionality.
- macOS:
brew install ripgrep
- Ubuntu:
sudo apt install ripgrep
- Windows:
- Download from Ripgrep GitHub Releases.
- macOS:
The following additional language server binaries are required for mason.nvim
to provide support for specific programming languages. Run these commands as needed to install servers or formatters for each language.
-
Python
# Install python3 and pip if not installed sudo apt install python3 python3-pip # Ubuntu brew install python # macOS # Install Python language server pip install 'python-lsp-server[all]'
-
JavaScript/TypeScript
npm install -g typescript typescript-language-server
-
Go
go install golang.org/x/tools/gopls@latest
-
Rust
# Install rust-analyzer brew install rust-analyzer # macOS sudo apt install rust-analyzer # Ubuntu
-
LaTeX (if using
vimtex
)- You’ll need a LaTeX distribution installed:
- macOS:
brew install --cask mactex
- Ubuntu:
sudo apt install texlive-full
- Windows:
- Install MiKTeX from miktex.org.
- macOS:
- You’ll need a LaTeX distribution installed:
-
Clone the Repository
git clone https://github.com/NoamFav/Nvim-config ~/.config/nvim
-
Open Neovim and Install Plugins Open Neovim and use
lazy.nvim
to install plugins::Lazy install
-
Verify Language Server Installation Run
:Mason
in Neovim to open Mason’s interface. Install or update any required language servers from within Mason's menu.
Plugin | Description |
---|---|
2077.nvim |
Cyberpunk-themed colorscheme for Neovim |
auto-save.nvim |
Automatically saves files when changes are detected |
ChatGPT.nvim |
ChatGPT integration for code suggestions and AI help |
cmp-buffer |
Source for buffer words in autocompletion |
cmp-cmdline |
Source for Neovim command-line completion |
cmp-nvim-lsp |
Provides LSP completion source for nvim-cmp |
cmp-path |
File path source for autocompletion |
cmp-vsnip |
Snippet support for nvim-cmp with vim-vsnip |
Comment.nvim |
Plugin for easy commenting in code |
copilot.vim |
GitHub Copilot integration for AI-driven suggestions |
dashboard-nvim |
Customizable start screen dashboard |
diffview.nvim |
Git diff viewer for comparing file changes |
git-blame.nvim |
Shows Git blame info inline |
git-conflict.nvim |
Helps manage and resolve Git merge conflicts |
gitsigns.nvim |
Shows Git changes in the sign column |
harpoon |
Mark and easily switch between files |
impatient.nvim |
Speeds up Neovim startup by caching Lua modules |
indent-blankline.nvim |
Adds indentation guides for better code readability |
lazy.nvim |
Plugin manager for lazy loading plugins |
lazygit.nvim |
Integration of LazyGit in Neovim |
lualine.nvim |
Highly customizable status line |
LuaSnip |
Snippet engine for Neovim |
nui.nvim |
UI component library for Neovim |
nvim-autopairs |
Automatically closes pairs like parentheses and braces |
nvim-cmp |
Completion engine with support for multiple sources |
nvim-notify |
Popup notification manager |
nvim-tree.lua |
File explorer with icons for file types |
nvim-treesitter |
Syntax highlighting and parsing with Treesitter |
nvim-ts-rainbow |
Rainbow parentheses and brackets in Treesitter |
nvim-web-devicons |
Adds icons to Neovim plugins |
onedark.nvim |
OneDark colorscheme for Neovim |
plenary.nvim |
Lua utility functions used by other plugins |
popup.nvim |
Popup API for Neovim plugins |
semantic-highlight.vim |
Provides semantic highlighting based on Treesitter |
sonokai |
Colorscheme inspired by Monokai |
tagbar |
Displays tags in a side panel for code navigation |
telescope-media-files.nvim |
Media files extension for Telescope |
telescope.nvim |
Fuzzy finder and search tool |
todo-comments.nvim |
Highlight TODO comments in code |
toggleterm.nvim |
Easily toggle between terminal windows |
trouble.nvim |
Pretty diagnostics and quickfix list |
vim-gradle |
Syntax highlighting and support for Gradle files |
vim-jsx-pretty |
Improved JSX/React syntax highlighting |
vim-matlab |
MATLAB support for syntax and indentation |
vim-vsnip |
Lightweight snippet plugin for Vim |
vimtex |
LaTeX support with syntax highlighting and compilation |
which-key.nvim |
Displays possible keybindings on a key press |
formatter.nvim |
Plugin for formatting code using external formatters |
lspsaga.nvim |
Light-weight UI for LSP features |
mason.nvim |
Manages external language servers and tools |
mason-lspconfig.nvim |
Integrates Mason with Neovim's LSP client |
mason-tool-installer.nvim |
Installs additional tools via Mason |
nvim-code-action-menu |
A code action menu for Neovim LSP |
nvim-lspconfig |
Configurations for built-in LSP client |
For a complete list githubs, see the Plugins Section.
Key mappings are specified in keymaps.vim
to streamline the workflow. Notable mappings include:
<leader>bn
: Move to the next buffer.<leader>bp
: Move to the previous buffer.<leader>bd
: Delete the current buffer.<leader>tn
: Move to the next tab.<leader>tp
: Move to the previous tab.<leader>to
: Open a new tab.<leader>tc
: Close the current tab.<leader>pd
: Page Down.<leader>pu
: Page Up.<leader>ff
: Find files using Telescope.<leader>fe
: Open Telescope file browser.<leader>fd
: Open diagnostics using Telescope.<leader>gf
: Find Git files with Telescope.<leader>gs
: Grep the current word with Telescope.<C-n>
: Toggle the NvimTree file explorer.<leader>r
: Refresh NvimTree.<leader>n
: Find the current file in NvimTree.<C-t>
: Toggle the terminal using ToggleTerm.<leader>tt
: Toggle Tagbar view.<leader>tf
: Toggle focus on Tagbar.
<leader>lg
: Open LazyGit directly.<leader>qf
: Show quickfix list with code actions.<leader>xQ
: Toggle the quickfix list in Trouble.
<leader>dn
: Go to the next diagnostic message.<leader>dp
: Go to the previous diagnostic message.<leader>df
: Format the current buffer.<leader>rn
: Rename symbol using LSP Saga.K
: Show hover documentation with LSP.<leader>ca
: Open the code action menu.<leader>cl
: Toggle LSP diagnostics on the right side using Trouble.<leader>xx
: Toggle diagnostics view on the right.<leader>xX
: Toggle diagnostics for the current buffer in Trouble.<leader>cs
: Toggle symbols in Trouble.<leader>cc
: Close Trouble diagnostics.
<leader>mm
: Runmvn clean install
.<leader>mp
: Runmvn clean package
.<leader>mc
: Runmvn clean
.<leader>mt
: Runmvn test
.<leader>me
: Runmvn exec:exec
.<leader>mf
: Run JavaFX withmvn javafx:run
.<leader>mj
: Generate Javadoc withmvn javadoc:javadoc
.
<C-J>
: Accept Copilot suggestion in insert mode.<C-K>
: Dismiss Copilot suggestion in insert mode.
<leader>fb
: Find buffers.<leader>fh
: Find help tags.<leader>fg
: Live grep for text.
<leader>ca
: Open the code action menu withCodeActionMenu
.<leader>qf
: Quick fix options.<leader>rm
: Run MATLAB script (Linux/Unix-specific setup).
<leader>ai
: Open ChatGPT window.<leader>ac
: Complete code with ChatGPT.<leader>ae
: Edit with instruction in ChatGPT.
<leader>bn
: Move to the next buffer.<leader>bp
: Move to the previous buffer.<leader>bd
: Delete the current buffer.<leader>tn
: Move to the next tab.<leader>tp
: Move to the previous tab.<leader>to
: Open a new tab.<leader>tc
: Close the current tab.
<leader>s
: Toggle semantic highlighting.<C-,>
: Toggle focus on NvimTree file explorer.<leader>t
: Toggle Tagbar focus.<leader>xx
: Toggle diagnostics view using Trouble.
Refer to keymaps.vim
for additional custom mappings.
init.lua
: Main configuration file, loads plugins and settings.lua/
Directory: Contains individual configuration files for plugins and other settings.
git.lua
: Configures Git-related plugins such asgit-blame.nvim
anddiffview.nvim
for version control.gpt.lua
: Settings for AI-based autocompletion withcopilot.vim
.latex.lua
: Sets up LaTeX support, likely withvimtex
for typesetting.lualine.lua
: Customizes the Neovim statusline usinglualine.nvim
.mason.lua
: Configuresmason.nvim
to manage LSP servers and additional tools.notifications.lua
: Manages notifications usingnvim-notify
.nvim-cmp.lua
: Sets upnvim-cmp
for autocompletion with buffer, LSP, and snippet sources.nvim-tree.lua
: Configures the file explorer (nvim-tree.lua
).telescope.lua
: Configurestelescope.nvim
for file and buffer search, along with live grep functionality.
- 2077.nvim
- auto-save.nvim
- ChatGPT.nvim
- cmp-buffer
- cmp-cmdline
- cmp-nvim-lsp
- cmp-path
- cmp-vsnip
- Comment.nvim
- copilot.vim
- dashboard-nvim
- diffview.nvim
- git-blame.nvim
- git-conflict.nvim
- gitsigns.nvim
- harpoon
- impatient.nvim
- indent-blankline.nvim
- lazy.nvim
- lazygit.nvim
- lualine.nvim
- LuaSnip
- nui.nvim
- nvim-autopairs
- nvim-cmp
- nvim-notify
- nvim-tree.lua
- nvim-treesitter
- nvim-ts-rainbow
- nvim-web-devicons
- onedark.nvim
- plenary.nvim
- popup.nvim
- semantic-highlight.vim
- sonokai
- tagbar
- telescope-media-files.nvim
- telescope.nvim
- todo-comments.nvim
- toggleterm.nvim
- trouble.nvim
- vim-gradle
- vim-jsx-pretty
- vim-matlab
- vim-vsnip
- vimtex
- which-key.nvim
- formatter.nvim
- lspsaga.nvim
- mason-lspconfig.nvim
- mason-tool-installer.nvim
- mason.nvim
- nvim-code-action-menu
- nvim-lspconfig
This configuration is licensed under the MIT License. See the LICENSE file for more details.