This Neovim configuration is designed for a comprehensive and efficient development experience across multiple programming languages. The setup leverages Lazy for plugin management and includes support for LSP, formatters, and debuggers for seamless coding, formatting, and debugging.
Ensure you have Neovim v0.9.0+ installed. Follow the OS-specific instructions below to install dependencies and set up the environment.
- Git: Required for cloning repositories and managing plugins.
- Python: Needed for Python LSP (
pyright
) and certain plugins. - Node.js: For various language servers like
tsserver
. - Go: For Go language support.
- Rust: For Rust language support.
- Java: For Java LSP (
jdtls
).
git clone https://github.com/mitscodes/neovim-new ~/.config/nvim
brew install neovim node python go rust openjdk
yay -S neovim nodejs npm python go rust jdk-openjdk
sudo apt update
sudo apt install neovim nodejs npm python3 python3-pip golang rustc openjdk-11-jdk
Launch Neovim and run:
:Lazy sync
Note: Mason does not automatically install LSP servers, formatters, or debuggers after cloning. You need to manually install these using Mason:
:MasonUse the list below to know what to install:
Configured via Mason for the following languages:
- Python:
pyright
- JavaScript/TypeScript:
ts_ls
- Go:
gopls
- Rust:
rust_analyzer
- HTML/CSS:
html
,cssls
,tailwindcss
- Lua:
ast_grep
- Java:
jdtls
- C/C++:
ast_grep
- C#:
csharp_ls
- PHP:
phpactor
- Ruby:
solargraph
- Ansible:
ansiblels
- Kotlin:
kotlin_language_server
- SQL:
sqls
- Angular:
angularls
- Assembly:
asm_lsp
Configured using Conform:
- Python:
black
- JavaScript/TypeScript/HTML/CSS:
prettier
- Lua:
stylua
- C/C++:
clang_format
- Java:
google_java_format
- Kotlin:
ktlint
- Go:
gofmt
- PHP:
phpcsfixer
- Rust:
rustfmt
- Ruby:
rubocop
- SQL:
sqlformat
- YAML:
yamllint
- Markdown:
prettier
Configured using nvim-dap:
- Python:
nvim-dap-python
- Go:
nvim-dap-go
- JavaScript/TypeScript: Integrated with nvim-dap
Some LSP servers or formatters may require extra tools:
- For Java, make sure you have
jdtls
installed and set up. - For Python,
black
andflake8
can be installed viapip
:pip install black flake8
Run Neovim using:
nvim