Twitter Email
subspace (/ˈsʌbspɛɪs/)
A Jekyll playground site

My Neovim Dotfiles

Author: Alex
Title: My Neovim dotfiles
Language: en-US
Number of words: 80
Created: 14:11 on Monday, 02. January 2023
Modified: 14:11 on Monday, 02. January 2023
Keywords: neovim, lua
Excerpt:

My personal configuration (aka „dotfiles“) for the Neovim text editor. The project is hosted on GitLab and can serve as base for your own config. But I advice against using it directly, because it is fast-moving target and some changes may even break it.

Tags: neovim
Page layout: no_sidebar
Media: 1 Object(s)
Last modified: , 80 Words
14:11 on Monday, 02. January 2023 | by Alex in Neovim

Core features:

The configuration is built around Neovim’s native LSP implementation and uses Treesitter for advanced highlighting, nvim-cmp for autocompletion, neo-tree as file-tree and many more plugins. The goal is to create an editor configuration for software developers, using all the advanced features

Requirements

  • Neovim 0.8 or later is the minimum supported version. Some OS-level prerequisites like ripgrep and fd are necessary for optimal functionality of some plugins (particularly telescope).

  • A working C compiler might be required to install additional Tree-Sitter parsers.

  • Git is required to install and update plugins

  • A terminal with True Color support and a NERD Font is highly recommended. Without them, the visual quality will suffer greatly. I suggest either Alacritty or Kitty. Both will make Neovim look much better and increase performance of all terminal-based applications.

How it looks

How my Neovim looks like

The color theme is a modified version of sonokai and uses some advanced features like different background colors for special windows like Neotree, terminal and outline views.

LSP configuration

The configuration does not use LSPInstall. Language servers are configured manually in lua/setup_lsp. The paths to language servers are configure in lua/config.lua. You can optionally enable Mason and let it do all the installation work.

Pre-configured language servers:

  • clangd (C, CPP, objective C)
  • gopls (Go)
  • tsserver (JavaScript, TypeScript)
  • pyright (Python)
  • cssls (CSS and SCSS)
  • html-language-server
  • dartls (Dart and Flutter)
  • rust-analyzer (Rust, obviously)
  • sumneko_lua (Lua)
  • vimls (Vim Script)
  • nimlsp (The Nim language)
  • texlab (TeX and LaTeX)
  • als (Ada)
  • metals (for Scala, but this requires a lot of additional installation work)

How to use this.

The config is highly modular. Many plugins can be enabled or disabled by editing lua/config.lua. After changing the plugin configuration, running a PackerSync is mandatory.

Where to get?

The project is hosted on GitLab

Issues

  • Tree-Sitter: JavaScript parser is disabled, because it’s just too damn slow. You can change this in lua/setup_treesitter.lua.
  • Tree-Sitter: Indentation feature is disabled, because it can cause massive memory leaks. See this issue. You may also change this in lua/setup_treesitter.lua.
  • Color scheme: still some inconsistencies, it’s WIP.
neovim