forked from benewberg/nvim_config
-
Notifications
You must be signed in to change notification settings - Fork 0
/
full_setup.txt
91 lines (77 loc) · 3.98 KB
/
full_setup.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
installing and running neovim (v0.10.0) from absolute scratch (--verbose version)
1. install neovim (v0.10.0):
a. `mkdir -p ~/apps/neovim && cd ~/apps/neovim`
b. `wget https://github.com/neovim/neovim/releases/download/v0.10.0/nvim.appimage`
c. `chmod u+x nvim.appimage`
2. install a virtual environment (if it already exists, delete it and start fresh):
a. `mkdir ~/.virtualenvs && cd ~/.virtualenvs`
b. `python3 -m venv nvim`
3. install the necessary python packages in the virtual environment for nvim and python lsp purposes:
a. `cd ~/.virtualenvs/nvim`
b. `source bin/activate`
c. `./pip install pynvim` # https://github.com/neovim/pynvim
d. `./pip install python-lsp-server` # https://github.com/python-lsp/python-lsp-server
e. `./pip install python-lsp-ruff` # https://github.com/python-lsp/python-lsp-ruff
f. `./pip install --upgrade darker` # https://github.com/akaihola/darker
g. `./pip install darker[isort]` # https://github.com/PyCQA/isort
h. `deactivate`
4. for an init configuration template to get you started:
a. `mkdir ~/dotfiles/ && cd ~/dotfiles`
b. `git clone https://github.com/benewberg/nightly_nvim_init.git nvim`
5. add symlinks from the dotfiles dir to the neovim config dir:
a. `mkdir -p $HOME/.config/nvim`
b. `ln -sf $HOME/dotfiles/nvim/init.lua $HOME/.config/nvim/init.lua`
c. `ln -sf $HOME/dotfiles/nvim/lua $HOME/.config/nvim/lua`
6. make a new script which will launch this version of neovim:
a. `mkdir $HOME/.local/bin`
b. `vi $HOME/.local/bin/nvim`
c. add the below into the file (ignore the back-ticks) and save
```
#!/bin/bash
if [ ! "$#" -gt 0 ] ; then
~/apps/neovim/nvim.appimage
else
~/apps/neovim/nvim.appimage "$@"
fi
```
d. `chmod u+x $HOME/.local/bin/nvim`
e. make sure `$HOME~/.local/bin` is in your path (it should be)
7. launch neovim now: `nvim` (there will likely be many errors -- ignore for now) and then run `:PlugInstall` and wait for it to complete
8. exit nvim and re-launch it
9. for treesitter stuff, run `:TSInstall python lua comment vim vimdoc c sql query` (and any other languages you want)
troubleshooting:
* if you can't run the nvim.appimage binary, install fuse:
a. `sudo apt-get install fuse`
b. `sudo apt-get install fuse-libs`
* if fzf is not installed:
a. `git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf`
b. `~/.fzf/install`
c. enter `y` or enter at the 3 prompts to enable fuzzy auto-complete, key bindings, and update shell config
d. source your .bashrc: `. ~/.bashrc`
* if ripgrep is not installed:
a. `sudo apt-get install ripgrep`
* in neovim, run `:checkhealth` to check for any other issues
optional:
* add nvim as the default editor in git:
a. `git config --global core.editor nvim`
* add nvim as the default editor in psql:
a. add this line to your .bashrc: `export PSQL_EDITOR=nvim`
b. source your .bashrc: `. ~/.bashrc`
* add the nerdfont-patched intel one mono font: `https://github.com/ryanoasis/nerd-fonts/tree/master/patched-fonts/IntelOneMono`
optional rust tools:
* install cargo: `sudo apt-get install cargo`
* eza (modern, maintained replacement for `ls` -- https://github.com/eza-community/eza):
a. `cargo install eza`
b. add the following lines to your .bashrc and source it:
```
alias ll='eza --long --icons'
alias lll='eza --long --tree --icons'
```
* fd (simple, fast and user-friendly alternative to `find` -- https://github.com/sharkdp/fd):
a. `cargo install fd-find`
* install ctags and generate a tabs file:
a. `sudo apt-get install ctags`
b. ensure Exuberant Ctags is what we just installed: `ctags --version`
c. generate the tags file: `ctags -R --languages=python -f ~/.config/nvim/tags /HIGHEST_GIT_LEVEL_PATH/.`
d. in nvim, add this to your init somewhere: `vim.opt.tags = vim.env.HOME .. '/.config/nvim/tags'`
e. if you have fzf-lua plugin installed, then from neovim: `:FzfLua tags` or `:FzfLua tags_live_grep`