Skip to content

Latest commit

 

History

History
137 lines (106 loc) · 4.71 KB

File metadata and controls

137 lines (106 loc) · 4.71 KB

Install Tutorial

This document can show how to use this repo to setup for neovim.

For linux

You should run these commands to install necessary tools.

sudo apt-get update
sudo apt-get install -y git build-essential

You need install neovim 0.11.0+ first. You can clone neovim, and then build by yourself.

Install uv for python environment

This repo uses uv to manage python verisons, the virtual environment and python projects.

Please run this command to install uv:

curl -LsSf https://astral.sh/uv/install.sh | sh

And then you should add this line into ~/.bashrc for automatically completion on bash:

eval "$(uv generate-shell-completion bash)"

Please run this command to install the latest python with uv:

uv python install

Of course, you can give a version behind the command uv python install to install specific verison python. For example, you can run this command to install python 3.10:

uv python install 3.10

Run install.py

This repo offers the python file install.py. It can install all necessary packages, and then copy all setting files to suitable location. You just run this command.

uv run install.py

Install nerd fonts

We should install nerd fonts to show cool symbols. You can select one of font on this web.

nerd_fonts_web

You need download the compressed file, and then decompress it and copy to the directory ~/.local/share/fonts/. Here gives the commands to show the steps:

wget https://github.com/ryanoasis/nerd-fonts/releases/download/v3.4.0/CodeNewRoman.zip
unzip CodeNewRoman.zip -d CodeNewRoman
cd CodeNewRoman
mkdir -p ~/.local/share/fonts
cp *.otf ~/.local/share/fonts/

We should run this command to rebuild the font cache:

fc-cache -fv

Now, we succeed to install the nerd fonts. Finally, you need change the font of the terminal to use the added fonts.

change_font_for_terminal

For windows

Install scoop

scoop is a package manager for windows. We need use scoop to install all necessary packages for neovim.

First, please install powershell 5.1+, and then use these commands on powershell to install scoop.

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
iwr -useb get.scoop.sh | iex

scoop need use git to manage bucket that can collect all newest apps and packages for windows. If you haven't install git yet, you can use this command to install git:

scoop install git

Install uv for python environment

Please use the commands on pwsh to install uv via scoop:

scoop bucket add main
scoop install main/uv

And then you need run this command to install the latest python:

uv python install

Finally, please use this command to set the environment variable PATH for uv:

uv tool update-shell

Run install.py

Please run this command to use the python file install.py to set the configuration for neovim.

python install.py

Install Visual Studio

In order to find standard library for clangd, we need install Visual Studio. You can download the installer from this web.

Setup godot

Please download godot 4.x. And then we need run godot to change some setting in order to use neovim to write gdscript.

Please click Editor, and then click Editor settings... like this image.

setup_godot_00

The dialog Editor Settings will show on the screen. You need click the tag External of Text Editor. And then you need follow these steups:

  • Enable the check box Use External Editor.
  • Set the value of ExecPath: nvim
  • Set the value of Exec Flags: --server 127.0.0.1:6004 --remote-send \"<esc>:n {file}<CR>:call cursor({line},{col})<CR>\"

setup_godot_01

Now, you can write gdscript on neovim. Note, you need execute godot before running neovim. Otherwise, neovim LSP cannot work.