LunarVim/README.md

203 lines
4.4 KiB
Markdown
Raw Normal View History

2020-08-29 18:31:23 +02:00
# NVCode
2020-04-25 00:50:40 +02:00
2020-08-29 18:31:23 +02:00
![NVCode pic](./utils/images/nvim.png)
2020-05-12 06:12:50 +02:00
2020-05-12 05:52:49 +02:00
## Install in one command
2020-04-28 05:59:39 +02:00
2020-05-12 05:52:49 +02:00
The following will install this config if you have an existing config it will move it to `~/.config/nvim.old`
This script only supports Mac, Ubuntu and Arch
2021-03-10 05:55:11 +01:00
```bash
2020-05-12 05:52:49 +02:00
bash <(curl -s https://raw.githubusercontent.com/ChristianChiarulli/nvim/master/utils/install.sh)
```
2020-04-28 05:59:39 +02:00
2020-04-25 00:50:40 +02:00
## Install Neovim
2021-03-10 05:55:11 +01:00
To get the latest and greatest:
2020-11-11 16:48:42 +01:00
2021-03-10 05:55:11 +01:00
```bash
cd ~
sudo rm -r neovim
git clone https://github.com/neovim/neovim
cd neovim
sudo make CMAKE_BUILD_TYPE=Release install
cd ~
sudo rm -r neovim
```
2020-04-25 00:50:40 +02:00
2020-04-25 00:55:06 +02:00
## Clone this repo into your config
2020-04-25 00:50:40 +02:00
2021-03-10 05:55:11 +01:00
```bash
2020-04-29 16:20:41 +02:00
git clone https://github.com/ChristianChiarulli/nvim.git ~/.config/nvim
2020-04-25 00:50:40 +02:00
```
## Install python & node support
2021-03-10 05:55:11 +01:00
```bash
2020-04-25 00:50:40 +02:00
pip install pynvim
```
2021-03-10 05:55:11 +01:00
```bash
2020-04-25 00:50:40 +02:00
npm i -g neovim
```
2020-05-12 23:12:38 +02:00
## Install Neovim remote
2021-03-10 05:55:11 +01:00
```bash
2020-05-12 23:12:38 +02:00
pip install neovim-remote
```
This will install `nvr` to `~/.local/bin` so you will need to add the following to your `bashrc` or `zshrc`
```
export PATH=$HOME/.local/bin:$PATH
```
2020-04-25 00:50:40 +02:00
## Install clipboard support
2020-08-29 18:31:23 +02:00
- On Mac pbcopy should be builtin
2020-04-25 00:50:40 +02:00
2020-08-29 18:31:23 +02:00
- Ubuntu
2020-04-25 00:50:40 +02:00
2021-03-10 05:55:11 +01:00
```bash
2020-05-10 19:52:08 +02:00
sudo apt install xsel
```
2020-04-25 00:50:40 +02:00
2020-08-29 18:31:23 +02:00
- Arch
2020-04-25 00:50:40 +02:00
2021-03-10 05:55:11 +01:00
```bash
2020-05-10 19:52:08 +02:00
sudo pacman -S xsel
```
2020-04-25 00:50:40 +02:00
## (Optional) Install python & node support using virtual environments
Make sure to add these paths somewhere in your config
```
let g:python3_host_prog = expand("<path to python with pynvim installed>")
let g:python3_host_prog = expand("~/.miniconda/envs/neovim/bin/python3.8") " <- example
let g:node_host_prog = expand("<path to node with neovim installed>")
2020-05-10 19:52:08 +02:00
let g:node_host_prog = expand("~/.nvm/versions/node/v12.16.1/bin/neovim-node-host") " <- example
2020-04-25 00:50:40 +02:00
```
2020-04-26 20:17:15 +02:00
## List of programs you should install
- ranger
- ueberzug
2020-04-27 07:44:22 +02:00
- ripgrep
- silver_searcher
- fd
- universal-ctags
2020-04-28 05:55:12 +02:00
- lazy git
- lazy docker
2021-03-10 05:55:11 +01:00
- ninja (for lua lsp)
2020-04-27 23:50:23 +02:00
2020-05-07 23:07:15 +02:00
Explanations and installation instruction can be found on my blog
2020-04-28 05:55:12 +02:00
2020-05-12 00:48:29 +02:00
## Language Servers
2021-03-10 05:55:11 +01:00
Some example language servers, if you just install them they will work with this config
2020-05-12 00:48:29 +02:00
2021-03-10 05:55:11 +01:00
```bash
npm i -g pyright
npm i -g bash-language-server
npm install -g vscode-css-languageserver-bin
npm install -g dockerfile-language-server-nodejs
npm install -g graphql-language-service-cli
npm install -g vscode-html-languageserver-bin
npm install -g typescript typescript-language-server
npm install -g vscode-json-languageserver
npm install -g vim-language-server
npm install -g yaml-language-server
```
2020-05-12 00:48:29 +02:00
2021-03-10 05:55:11 +01:00
Go [here](https://github.com/neovim/nvim-lspconfig/blob/master/CONFIG.md)
2020-05-12 00:48:29 +02:00
2021-03-10 05:55:11 +01:00
How to install the lua language server: [link](https://github.com/sumneko/lua-language-server/wiki/Build-and-Run-(Standalone))
2020-05-12 00:48:29 +02:00
2020-08-09 00:53:34 +02:00
## For FAR to work
2021-03-10 05:55:11 +01:00
```vim
2020-08-09 00:53:34 +02:00
:UpdateRemotePlugins
```
2021-03-08 09:41:15 +01:00
To replace in file make sure to specify `%:p`
To replace across project specify `**/*.<your_extension>`
2020-08-08 07:47:57 +02:00
## Vim Gists
To use **vim-gists** you will need to configure the following:
2021-03-10 05:55:11 +01:00
```bash
2020-08-08 07:47:57 +02:00
git config --global github.user <username>
```
2020-08-29 18:31:23 +02:00
## VSCodium & Neo Vim Extension
[VSCodium](https://github.com/VSCodium/vscodium) contains build files to generate free release binaries of Microsoft's VS Code.
You can install it on multiple platforms:
- Mac
2021-03-10 05:55:11 +01:00
```bash
2020-08-29 18:31:23 +02:00
brew cask install vscodium
```
- Arch
2021-03-10 05:55:11 +01:00
```bash
2020-08-29 18:31:23 +02:00
yay -s vscodium-bin
```
- Snap
2021-03-10 05:55:11 +01:00
```bash
2020-08-29 18:31:23 +02:00
snap install codium
```
[The Neo Vim Extension](https://github.com/asvetliakov/vscode-neovim) is available in the VSCode marketplace
I recommend using this alongside the VSCode `which-key` extension
Along with some of my config files you can find in `utils/vscode_config`
2020-05-12 05:52:49 +02:00
## TODO
2020-05-10 19:52:08 +02:00
2020-08-10 22:34:17 +02:00
- Better Documentation
https://github.com/gennaro-tedesco/nvim-jqx
2021-03-10 05:55:11 +01:00
https://github.com/mattn/efm-langserver
2021-03-10 05:55:11 +01:00
https://github.com/nvim-telescope/telescope-media-files.nvim
2021-03-10 05:55:11 +01:00
https://github.com/b3nj5m1n/kommentary
2020-08-07 17:51:01 +02:00
2021-03-10 05:55:11 +01:00
https://github.com/nvim-lua/completion-nvim
2020-08-07 17:51:01 +02:00
2021-03-10 05:55:11 +01:00
https://github.com/nvim-telescope/telescope-frecency.nvim
2020-08-07 10:06:46 +02:00
## 0.5
2021-03-10 05:55:11 +01:00
- native lsp (in progress)
- treesitter (in progress)
2020-05-12 05:52:49 +02:00
2020-08-10 22:34:17 +02:00
## LOW PRIORITY TODO
2020-05-12 05:52:49 +02:00
2020-08-10 22:34:17 +02:00
If anyone reading this has any suggestions about implementing any of the following I will accept a PR, but these are not priority.
- multiple cursors
2020-11-04 00:50:33 +01:00
- galaxyline automatically grab colors from colorscheme
2020-08-10 22:34:17 +02:00
- tpope/vim-dadbod
- neovide
- People asked about vimwiki I kinda hate it but maybe I'll add it
- vimspector this is included but I don't plan on using it much
- can be used with jdb, pdb, gdb, etc...
2020-11-04 00:50:33 +01:00
- nvim-dap and nvim-dap-virtual-text (ALL DEBUGGING IN NEOVIM IS CONFUSING AND HARD TO GET WORKING OR I'M JUST DUMB)
2021-03-10 05:55:11 +01:00
- potentially manually link pylance
2020-08-10 22:34:17 +02:00
- resize with arrows in addition to meta
- how to support meta key on for macOS?