/nvim-config

Primary LanguageVim Script

NeoVim configuration

This project contain the configuration files for neovim.

Set up

To set up the project just:

cd ~/.config
git clone git@github.com:turbod89/nvim-config.git nvim

Then its recommended to check if all system dependencies are ok by starting neovim and running :checkhealth.

When all is okey, :PlugInstall

Features

The following Plug has been added:

Git

LSP

  • neovim/nvim-lspconfig: A collection of common configurations for Neovim's built-in language server client.

  • tami5/lspsaga.nvim: Lspsaga is light-weight lsp plugin based on neovim built-in lsp with highly a performant UI.

Parsing & auto completion

File system

View

Latex

  • lervag/vimtex VimTeX is a modern Vim and Neovim filetype and syntax plugin for LaTeX files.

Dependencies

Some npm dependencies are:

  • npm install -g typescript typescript-language-server
  • npm install -g neovim
  • npm i -g diagnostic-languageserver

For C++:

  • Archlinux: sudo pacman -S ccls as stated here.

For Python:

  • npm i -g pyright

Current Mappings

Mode Mapping Description File
<space> Leader maps.vim
Normal <Esc> Turn terminal in normal mode maps.vim
Normal Ctrl + {hjkl} Move between panels maps.vim
Terminal Ctrl + {hjkl} Move between panels maps.vim
Normal Ctrl + t Create new tab maps.vim
Normal Ctrl + n Open bottom terminal maps.vim
Normal Ctrl + ns Open vertical terminal maps.vim
Normal Ctrl + nt Open terminal in a new tab maps.vim
Normal Ctrl + a Select all maps.vim
Visual * Search selected text backwards maps.vim
Visual # Search selected text forwards maps.vim
Normal Alt + {'h', 'l'} Move to previous/next tab maps.vim
Normal Alt + {'H', 'L'} Move current tab to previous/next position maps.vim
Ctrl + d cmp.mapping.scroll_docks(-4) after/plugin/cmp.rc.vim
Ctrl + f cmp.mapping.scroll_docks(4) after/plugin/cmp.rc.vim
Ctrl + <space> cmp.mapping.complete(4) after/plugin/cmp.rc.vim
Ctrl + e cmp.mapping.close() after/plugin/cmp.rc.vim
<CR> cmp.mapping.confirm() after/plugin/cmp.rc.vim
Normal gD vim.lsp.buf.declaration() after/plugin/lspconfig.rc.vim
Normal gd vim.lsp.buf.definition() after/plugin/lspconfig.rc.vim
Normal gi vim.lsp.buf.implementation() after/plugin/lspconfig.rc.vim
Normal <space>wa vim.lsp.buf.add_workspace_folder() after/plugin/lspconfig.rc.vim
Normal <space>wr vim.lsp.buf.remove_workspace_folder() after/plugin/lspconfig.rc.vim
Normal <space>wl print(vim.inspect(vim.lsp.buf.list_workspace_folders())) after/plugin/lspconfig.rc.vim
Normal <space>D vim.lsp.buf.type_definition() after/plugin/lspconfig.rc.vim
Normal <space>rn vim.lsp.buf.rename() after/plugin/lspconfig.rc.vim
Normal <space>ca vim.lsp.buf.code_action() after/plugin/lspconfig.rc.vim
Normal gr vim.lsp.buf.references() after/plugin/lspconfig.rc.vim
Normal <space>e vim.lsp.diagnostic.open_float() after/plugin/lspconfig.rc.vim
Normal Shift + Ctrl + d vim.lsp.diagnostic.goto_next() after/plugin/lspconfig.rc.vim
Normal <space>q vim.lsp.diagnostic.set_loclist() after/plugin/lspconfig.rc.vim
Normal <space>f vim.lsp.buf.formatting() after/plugin/lspconfig.rc.vim
Normal Ctrl + d diagnostic_jump_next after/plugin/lspsaga.rc.vim
Normal gp preview_definition after/plugin/lspsaga.rc.vim
Normal T hover_doc after/plugin/lspsaga.rc.vim
Ctrl + f smart_scroll_with_saga(1) after/plugin/lspsaga.rc.vim
Ctrl + b smart_scroll_with_saga(-1) after/plugin/lspsaga.rc.vim
Normal gh lsp_finder after/plugin/lspsaga.rc.vim
Normal Ctrl + b Toggle nerd tree after/plugin/neerdtree.rc.vim
Normal Ctrl + p Search file with FZF after/plugin/fzf.rc.vim