Skip to content
borgaarPublic

About

My Neovim config built from scratch.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

72 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

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.

Compatibility

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.

Language servers and parsers

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

Formatters

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.

Dependencies

The following are the config's dependencies:

  • Neovim v0.12.0+
  • In your PATH:
    • tar (GNU Tar) and unzip — Mason unpacks language servers with them.
    • curl (cURL)
    • rg (ripgrep) and fd (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's jdtls launcher is a Python script.
    • java (JDK 21 or newer) — jdtls refuses to start on anything older, so $JAVA_HOME (or java on your PATH) must resolve to 21+.
    • prettier, stylua, ruff, clang-format, and shuck — the formatters (see Formatters). On Arch, clang-format ships with the clang package. shuck is not packaged for Arch; install it with cargo install shuck-cli and put ~/.cargo/bin on your PATH.
    • 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.

Installation

There are multiple ways of installing the config. Method A is automatic and recommended if supported by your system.

Method A (Arch-based Linux distros only) (automatic) (recommended)

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/bash

Method B (manual)

Warning

Do not install Tree-sitter CLI from npm.

  1. Create a backup of your current config if you have one:
    mv "$HOME/.config/nvim" "$HOME/.config/nvim.backup"
  2. Make sure you have Neovim v0.12.0+. If not, install it.
  3. Make sure you have installed the following and that they are in your PATH:
    • tar (GNU Tar) and unzip — Mason unpacks language servers with them.
    • curl (cURL)
    • rg (ripgrep) and fd (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's jdtls launcher is a Python script.
    • java (JDK 21 or newer) — jdtls refuses to start on anything older, so $JAVA_HOME (or java on your PATH) must resolve to 21+.
    • prettier, stylua, ruff, clang-format, and shuck — the formatters (see Formatters). On Arch, clang-format ships with the clang package. shuck is not packaged for Arch; install it with cargo install shuck-cli and put ~/.cargo/bin on your PATH.
    • coursier (coursier) — only needed for Scala language server support (metals).
  4. Install the Neovim config itself:
    git clone "https://github.com/borgaar/nvim" "$HOME/.config/nvim"

About

My Neovim config built from scratch.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Contributors

Languages