My Neovim configuration. Based off of kickstart.nvim
.
The <leader>
key as of writing is <space>
.
Linux:
git clone https://github.com/robertharris-xyz/nvim-config.git ~/.config/nvim
neovim >= 0.8.3
ripgrep
fd
npm
A valid custom font also needs to be installed from nerd-fonts to get icons to work.
- Currently using: BlexMono Propo Text.
As one might expect, Neovim is a bit more annoying to set up on Windows. Here's a list of some of the stuff that needs to be done:
-
Extract the Github release zip file of Neovim to a location like:
C:\Users\<USER>\nvim
-
Git clone this configuration to the appropriate directory:
git clone https://github.com/robertharris-xyz/nvim-config.git C:\Users\<USER>\AppData\Local\nvim
-
Add
C:\Users\<USER>\nvim
to the user's%PATH%
environment variable. This is typically done through Windows Control Panel. -
Get the better Windows terminal.
- Optional: Change the opacity of the terminal to 95% and the background colour to
#272822
. This makes the theme look better. Or changetransparent_bg
tofalse
inlua/robertharris-xyz/packages.lua
.
- Optional: Change the opacity of the terminal to 95% and the background colour to
-
Install the required packages through
winget
(if it is hopefully available, otherwise you'll need to do this manually:
winget install BurntSushi.ripgrep.MSVC
winget install sharpdp.fd
-
Get a valid C Compiler. You can get the MinGW installation manager (basically gcc), but Clang is apparently better for Windows? This needs to be tried out at some point...
- If choosing MinGW route, download the installation manager here.
- When done with the setup, in the installation manager choose the
mingw32-base
andmingw32-gcc-g++
options. - To install the chosen options, go to "Installation -> Apply Changes".
- Automatically format text in a file:
:Format
- View Markdown preview:
:MarkdownPreview
. - Generate Markdown Table of Contents:
- Github Flavoured Markdown:
:GenTocGFM
. - Gitlab Flavoured Markdown:
:GenTocGitlab
.
- Github Flavoured Markdown:
- Update the Markdown Table of Contents:
:UpdateToc
. - Remove the Markdown Table of Contents:
:RemoveToc
.
Godot support is inside this configuration, however a few things have to be done manually in order to get it working. This is based off the information in the vim-godot
Github repository:
- In Godot, open Menu
Editor/Editor Settings/General/External
:- Tick
Use external editor
. - In
Exec Path
, add the Neovim executable path. - In
Exec Flags
, add the following:--server ./godothost --remote-send "<C-\><C-N>:n {file}<CR>{line}G{col}|"
- These configuration changes should only need to be done once.
- Tick
- Always ensure that Godot is running before running Neovim, otherwise the connection will not work!
- The Neovim configuration has been written in a way which assumes that if the current directory
nvim
is executed in contains a Godot project file (project.godot
), then Neovim will be started with the correct flags to connect to the Godot executable. So to use Neovim with Godot, it should always be run in the directory whereproject.godot
is.
iamcco/markdown-preview.nvim
plugin is a bit of a pain to get working. As of writing, the solution to the problem was mentioned here: iamcco/markdown-preview.nvim#558 (comment)- "I discovered the error, I needed to manually run
npm install
in the plugin foldercd ~/.local/share/nvim/lazy/markdown-preview.nvim
".
- "I discovered the error, I needed to manually run
- An error might be received with treesitter's ability to parse the bash scripting language.
- Solution is to execute:
:echo nvim_get_runtime_file('parser', v:true
. If the output received has two parsers (e.g. one of them is the default nvim parser/usr/local/lib/nvim/parser
), rename the unneeded one, and the error should go away on subsequent boots of Neovim.
- Solution is to execute:
- For some reason, running
:GodotRunFZF
results in an error claiming thatfzf
is not installed, even when it is. I'm not sure what causes this issue...