Skip to content

gbroques/neovim-configuration

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Neovim Configuration

gbroques' personal Neovim configuration with the following goals and philosophy:

  • Configure Neovim with IDE features like Visual Studio Code.
  • Stable. Plugins are pinned to specific versions.
  • Omit specifying defaults and refer to :help instead.
  • Include comments for someone new to Vim / Neovim.
  • Explain all mnemonics.
  • Efficient.
    • There should not be dupicate mappings for an operation unless the alternative mapping is less keystrokes.
  • Fast.
  • Minimal.
  • Tailored for Colemak over QWERTY.

Prerequisites

  1. Neovim (nvim).
  2. JetBrainsMono Nerd Font
    • Support ligatures and italics.
  3. ripgrep (for telescope.nvim)
  4. make (for telescope-fzf-native.nvim)
  5. Install desired language servers. See below sections.

Java

  1. Install Java 17 in the following directory:

    C:\Program Files\Java\jdk-17.0.4.1
    
  2. Save formatter settings at ~/.vscode/formatter.xml.

  3. Install the following projects in a subdirectory within the standard data directory for your operating system:

    1. Extract jdt-language-server-1.24.0-202306011728.tar.gz into mason/packages/jdtls.
    2. Extract vscjava.vscode-java-debug-0.46.0.vsix into mason/packages/java-debug-adapter.
    Operating System Data Directory
    Linux / MacOS ~/.local/share/nvim
    Windows ~/AppData/Local/nvim-data

    :help standard-path

  4. Install the tree-sitter Java parser from inside Neovim:

    :TSInstall java
    
  5. Install the following dependencies via Mason:

    :MasonInstall java-test@0.39.0
    

JavaScript

  1. Install TypeScript Language Server:

    npm install -g typescript typescript-language-server
    

typescript-language-server MUST be in the PATH.

Reference: https://github.com/neovim/nvim-lspconfig/blob/v0.1.6/lua/lspconfig/server_configurations/tsserver.lua#L34

  1. Install the tree-sitter JavaScript parser from inside Neovim:

    :TSInstall javascript
    
  2. Setup ESLint for formatting and diagnostics.

eslint and eslint_d MUST be in the PATH.

eslint_d speeds up ESLint and can be installed globally:

npm install -g eslint_d

An enviroment variable, ESLINT_CONFIG_PATH, containing the path to the ESLint configuration file MUST be set.

This is passed to eslint's CLI --config option.

Tree-sitter

Install the Tree-sitter query parser for query editor highlighting:

:TSInstall query

Python

Install the following dependencies:

:MasonInstall jedi-language-server flake8 autopep8 isort mypy

Install the tree-sitter Python parser from inside Neovim:

:TSInstall python

YAML

Install the YAML language server:

npm install -g yaml-language-server

Setup

Clone to Neovim configuration directory depending on operating system:

Operating System Clone Command
Linux / MacOS git clone git@github.com:gbroques/neovim-configuration.git ~/.config/nvim
Windows git clone git@github.com:gbroques/neovim-configuration.git ~/AppData/Local/nvim

:help config

References

Neovim IDE Distributions:

Other sources: