This Neovim config is written from scratch and is my daily driver for 95% of my programming work. The main focus of this Neovim config is to stay close to the native Neovim experience while still providing some nice-to-haves. My personal motivation for this is to avoid my annoyance of having to essentially relearn Neovim anytime I attempt to edit some files on a remote server or some other machine with a default-like Neovim config.
This config is built mainly for Arch-based Linux distributions, but may work on many other distributions (no guarantees provided). I have no clue about this config's MacOS and Windows support (so assume unsupported). The install script only works on Arch-based Linux distributions.
The language servers and parsers for the following languages are installed by default. Every server except metals is installed automatically through Mason.
| Language | Mason package | Language server |
|---|---|---|
| Assembly | asm-lsp | asm_lsp |
| Bash | bash-language-server | bashls |
| C | clangd | clangd |
| C++ | clangd | clangd |
| C# | csharp-language-server | csharp_ls |
| CSS | css-lsp | cssls |
| Go | gopls | gopls |
| HTML | html-lsp | html |
| Java | jdtls | jdtls |
| JavaScript | vtsls | vtsls |
| JSON | json-lsp | jsonls |
| JSX | vtsls | vtsls |
| Lua | lua-language-server | lua_ls |
| Markdown | marksman | marksman |
| Python | pyright | pyright |
| Rust | rust-analyzer | rust_analyzer |
| Scala | (nvim-metals, not Mason) | metals |
| TOML | taplo | taplo |
| Tailwind CSS | tailwindcss-language-server | tailwindcss |
| TypeScript | vtsls | vtsls |
| Typst | tinymist | tinymist |
| TSX | vtsls | vtsls |
| XML | lemminx | lemminx |
| YAML | yaml-language-server | yamlls |
Formatting runs on save through conform.nvim,
and is also bound to <leader>cf. Unlike the language servers, these are not installed
by Mason — the install script (see Installation: Method A) installs them
instead.
| Language | Formatter |
|---|---|
| C, C++ | clang-format |
| JavaScript, JSON, JSX, TSX, TypeScript | prettier |
| Lua | stylua |
| Python | ruff |
| Shell | shuck |
Any other filetype falls back to its language server's own formatting, when it has one.
The following are the config's dependencies:
- Neovim v0.12.0+
- In your PATH:
tar(GNU Tar) andunzip— Mason unpacks language servers with them.curl(cURL)rg(ripgrep) andfd(fd) — Telescope searches with them.tree-sitter(Tree-sitter CLI v0.26.1+)- Tree-sitter must NOT be installed from npm.
go(Go CLI)dotnet(.NET CLI)npm(npm CLI)python(Python) — Mason'sjdtlslauncher is a Python script.java(JDK 21 or newer) — jdtls refuses to start on anything older, so$JAVA_HOME(orjavaon yourPATH) must resolve to 21+.prettier,stylua,ruff,clang-format, andshuck— the formatters (see Formatters). On Arch,clang-formatships with theclangpackage.shuckis not packaged for Arch; install it withcargo install shuck-cliand put~/.cargo/binon yourPATH.coursier(coursier) — only needed for Scala language server support (metals).
The installation script (see Installation: Method A) should automatically install all the required dependencies (except coursier). The Go, npm, and .NET CLIs are used to install the language server binaries.
There are multiple ways of installing the config. Method A is automatic and recommended if supported by your system.
The command below executes an install script and should automagically install the Neovim
config and its dependencies (except coursier). It only works on Arch-based Linux distributions using pacman. A backup
of your current Neovim config is automatically created before installation happens.
curl -L "https://raw.githubusercontent.com/borgaar/nvim/main/install.sh" | /bin/bashWarning
Do not install Tree-sitter CLI from npm.
- Create a backup of your current config if you have one:
mv "$HOME/.config/nvim" "$HOME/.config/nvim.backup"
- Make sure you have Neovim v0.12.0+. If not, install it.
- Make sure you have installed the following and that they are in your PATH:
tar(GNU Tar) andunzip— Mason unpacks language servers with them.curl(cURL)rg(ripgrep) andfd(fd) — Telescope searches with them.tree-sitter(Tree-sitter CLI v0.26.1+)- Do NOT install Tree-sitter from npm.
go(Go CLI)dotnet(.NET CLI)npm(npm CLI)python(Python) — Mason'sjdtlslauncher is a Python script.java(JDK 21 or newer) — jdtls refuses to start on anything older, so$JAVA_HOME(orjavaon yourPATH) must resolve to 21+.prettier,stylua,ruff,clang-format, andshuck— the formatters (see Formatters). On Arch,clang-formatships with theclangpackage.shuckis not packaged for Arch; install it withcargo install shuck-cliand put~/.cargo/binon yourPATH.coursier(coursier) — only needed for Scala language server support (metals).
- Install the Neovim config itself:
git clone "https://github.com/borgaar/nvim" "$HOME/.config/nvim"