dwrdx / neovim-config

Actively updated neovim configuration that is being used by myself

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

neovim-config

Actively updated neovim configuration that is being used by myself

How to use

  1. Find the nvim config locaton on your computer by running :echo stdpath('config') in neovim
  2. Clone this project to your nvim config folder
  3. Install vim-plug then run :PlugInstall
  4. Follow nvim-treesitter quickstart to get treesitter installed, NOTE: this step requires a C compiler on your computer
  5. Install ripgrep and ack for searching

Coding with python

  1. Install pyright by npm i -g pyright to get python lsp working
  2. Create virtualenv with virtualenv -v venv
  3. Activate virtualenv and install debugpy for debugging
  4. Create pyrightconfig.json file in your project and configure pyright as following, refer to pyrightconfig for details
{
    "venvPath": ".",
    "venv": "venv"
}

Coding with Golang

  1. Install goimports and gopls for golang lsp support
  2. Install delve for debugging

Coding with C/C++

  1. Install clangd to get clangd lsp working, as clangd requires compile_commands.json file which is generated by build system to parse the source code, if your build system doesn't support that, please try to use this small script clangdgen
  2. Install lldb-vscode and depends-on llvm-symbolizer for debugging
  3. Compile C/C++ code with -g flag for debugging

Misc

  1. JSON: Install vscode-json-language-server by npm i -g vscode-langservers-extracted to get JSON lsp working

Plugins

Plugins are managed with vim-plug

Beautiful Fonts

This config is using BitstreamVeraSansMono Nerd Font Install nerdfonts

Snippets

Key Mappings

Here are the most frequent used key mappings, for the full list please check the source code

Key Mapping Function
<leader>tm Toggle terminal
<leader>qo Open quickfix
<leader>qc Close quickfix
Alt-o Toggle symbols outline
Alt-m Toggle NERDTree
Alt-, Previous buffer
Alt-. Next buffer
<leader>ff Use fzf to find files
<leader>b Use fzf to find buffers
<leader>b Use fzf to find buffers
<leader>s* Search words in all files with rg
<leader>sc Search words in clang files with rg
<leader>sp Search words in python files with rg
<leader>sg Search words in golang files with rg
<leader>sa* Search words in all files with ack
gd Goto definition
gD Goto declaration

Screen Shots

Start Dashboard start

Find Files with fzf fzf

Open Terminal terminal

About

Actively updated neovim configuration that is being used by myself

License:MIT License


Languages

Language:Vim Script 52.1%Language:Lua 47.6%Language:Batchfile 0.2%Language:PowerShell 0.2%