Skip to content

Latest commit

 

History

History
55 lines (43 loc) · 1.96 KB

File metadata and controls

55 lines (43 loc) · 1.96 KB

Neovim configuration

Requirements

  • Neovim 0.11 or newer
  • Git and ripgrep
  • A C compiler for Treesitter parsers
  • unzip for Mason to install clangd
  • Node.js and npm for the full JavaScript, TypeScript, HTML, CSS, ESLint, Pyright, and Stylelint stack

On Ubuntu/Debian, install all system prerequisites with:

sudo apt-get install build-essential nodejs npm unzip python3-venv

Plugins and language servers are installed automatically on the first start. Use :Mason to inspect installations and :checkhealth vim.lsp to diagnose the LSP client.

Completion is provided by nvim-cmp. Press <C-Space> to open the menu, <Tab> and <S-Tab> to move through entries or snippets, and <CR> to accept the selected entry.

Language support

Languages Language servers / diagnostics
Python Pyright (types and navigation), Ruff (linting and fixes)
C and C++ clangd (navigation and compiler/clang-tidy diagnostics)
JavaScript and TypeScript TypeScript Language Server, ESLint
HTML HTML Language Server, Stylelint when the project config enables HTML
CSS, SCSS, Less CSS Language Server, Stylelint
Lua Lua Language Server

ESLint and Stylelint intentionally use each project's local configuration. Add an eslint.config.* or .eslintrc* file for ESLint and a stylelint.config.* or .stylelintrc* file for Stylelint.

On a minimal system without Node.js, the configuration automatically uses quick-lint-js for JavaScript/TypeScript diagnostics and SuperHTML for HTML. It also skips installers whose prerequisites are unavailable instead of reporting the same Mason failures on every startup. Install Node.js/npm and unzip, then restart Neovim to activate the full stack automatically.

Useful mappings:

  • gd / gD: definition / declaration
  • gr: references
  • K: hover documentation
  • <leader>ca: code actions
  • <leader>rn: rename
  • [d / ]d: previous / next diagnostic
  • <leader>gf: format the current buffer