An open API service indexing awesome lists of open source software.

https://github.com/rndbyte/neovimrc

Small but powerfull NeoVim runtime configuration.
https://github.com/rndbyte/neovimrc

neovim neovim-conf neovim-config neovim-configuration nvim

Last synced: 7 months ago
JSON representation

Small but powerfull NeoVim runtime configuration.

Awesome Lists containing this project

README

          

# NeovimRC

Small but powerfull NeoVim runtime configuration.

## Main features

- [Syntax highlighting](https://github.com/nvim-treesitter/nvim-treesitter)
- [LSP](https://microsoft.github.io/language-server-protocol/) support
- [Snippets](https://github.com/rafamadriz/friendly-snippets) support
- [DAP](https://microsoft.github.io/debug-adapter-protocol/) support
- [Code completion](https://github.com/hrsh7th/nvim-cmp)
- [Git integration](https://github.com/tpope/vim-fugitive)

## Supported languages

- PHP
- Go (partial support)

## Installation

To install the configuration you must perform the following steps:

1. Check the requirements
2. Clone this repo to ~/.config/nvim

### Common requirements

- GNU/Linux system
- Git >= 2.0
- Neovim >= 0.10
- C compiler, libstdc++ and libxml2-dev
- [luarocks](https://luarocks.org/)
- [ripgrep](https://github.com/BurntSushi/ripgrep)
- [nerd-fonts](https://github.com/ryanoasis/nerd-fonts)
- [clipboard provider](https://neovim.io/doc/user/provider.html#provider-clipboard)

### Language specific requirements

- PHP >= 8.0 (for phpactor)
- Node.js >= 16 (for php-debug-adapter)
- Go >= 1.18 (for gopls)
- [golangci-lint](https://github.com/golangci/golangci-lint)

### About clipboard providers

There are different clipboard types for Linux systems: compatible with X11 or compatible with Wayland.
You must choose the right one. For instance, use xclip for X11 and wl-clipboard for Wayland.

### How to install Nerdfonts

You can use one of the following options.

1. Download one of the patched fonts from [here](https://www.nerdfonts.com/font-downloads) and put it in
~/.local/share/fonts directory.
2. [Patch](https://github.com/ryanoasis/nerd-fonts?tab=readme-ov-file#option-9-patch-your-own-font) your own font.

If you want to know where your font is located, just execute the following command:

```sh
fc-list | grep `fc-match "$FONTNAME" | cut -d ':' -f1` # put the name of the font in $FONTNAME
```

Example:

```sh
FONTNAME='monospace' sh -c 'fc-list | grep `fc-match "$FONTNAME" | cut -d ':' -f1`'
```

## Custom shortcuts

In the following shortcuts, `` represents space character.

### General

| Binding | Modes | Description |
|:----------------------:|:-----:|:---------------------------------------------------------------------------------:|
| J | n | Inline several lines. |
| J | v | Move highlighted lines down. |
| K | v | Move highlighted lines up. |
| n | n | Find the next occurrence of the searched pattern. |
| N | n | Find the previous occurrence of the searched pattern. |
| Q | n | This default key is disabled. |
| `` | n | Scroll down half the page. |
| `` | n | Open harpoon window. |
| `` | n | Jump to the first element in the Harpoon file list. |
| `` | n | Quickfix commands: display the previous error in the list. |
| `` | n | Quickfix commands: display the next error in the list. |
| `` | n | Jump to the third element in the Harpoon file list. |
| `` | n | Fuzzy search through the output of git ls-files command, respects .gitignore. |
| `` | n | Jump to the fourth element in the Harpoon file list. |
| `` | n | Jump to the second element in the Harpoon file list. |
| `` | n | Scroll up half the page. |
| `` | n | Replace the first file in the Harpoon file list by the current buffer. |
| `` | n | Replace the third file in the Harpoon file list by the current buffer. |
| `` | n | Replace the fourth file in the Harpoon file list by the current buffer. |
| `` | n | Replace the second file in the Harpoon file list by the current buffer. |
| `a` | n | Add current buffer to the Harpoon file list. |
| `d` | n,v | Delete selected text in void buffer. |
| `j` | n | Quickfix commands: same as ``, but the location list is used. See Nvim docs. |
| `k` | n | Quickfix commands: same as ``, but the location list is used. See Nvim docs. |
| `p` | x | Replace selected text with content from buffer. The buffer content do not change. |
| `pf` | n | Lists files in your current working directory, respects .gitignore. |
| `ps` | n | Searches for the input in your current working directory. |
| `pv` | n | Exit from file reading. |
| `pws` | n | Searches for the word under your cursor. |
| `pWs` | n | Searcher for the sequence of non-blank characters under your cursor. |
| `r` | n | Remove current buffer from the Harpoon file list. |
| `s` | n | Replace current word. |
| `u` | n | Toggle the undo-tree panel. |
| `vh` | n | Lists available help tags and opens a new window with the relevant help info. |
| `Y` | n | Copy current line from Vim to global buffer (clipboard provider required). |
| `y` | n,v | Copy selected text from Vim to global buffer (clipboard provider required). |

### LSP

| Binding | Modes | Description |
|:----------------------:|:-----:|:---------------------------------------------------------------------------------:|
| [d | n | Move to the next diagnostic message. |
| ]d | n | Move to the previous diagnostic message. |
| gd | n | Jumps to the definition of the symbol under the cursor. |
| K | n | Displays hover information about the symbol under the cursor in a floating window.|
| `` | i | Displays signature information about the symbol under the cursor. |
| `f` | n | Formats a buffer using the attached language server clients. |
| `vca` | n | Selects a code action available at the current cursor position. |
| `vd` | n | Show diagnostics in a floating window. |
| `vji` | n | Lists all the implementations for the symbol under the cursor. |
| `vrn` | n | Renames all references to the symbol under the cursor. |
| `vrr` | n | Lists all the references to the symbol under the cursor in the quickfix window. |
| `vws` | n | Lists all symbols in the current workspace in the quickfix window. |