Use Neovim as your Godot code editor
- ❓ A step-by-step guide on how to setup a dev environment in Neovim to work seamlessly with Godot
- 🔋 A good looking minimal Neovim config with IDE-like features
- 🏃 An executable file to allow Godot to open files directly into Neovim
- 🐋 A Docker Image packed with the Minimal Neovim Config for a quick setup
To be able to leverage the power of the Neovim-Godot integration, you can follow one of these paths:
To get up and running quickly, or to test the setup, you can just run the following command if you have Docker installed:
docker run -it -p 6005:6005 -p 6006:6006 niscolas/nvim-godot:latest
💡 One important thing to note is that the some error messages will appear on Neovim startup related to the Lua Language Server since it doesn't support Alpine (the base image)
💡 You can add the
--rm
option to remove the container as soon as you're finished with testing
docker run --rm -it -p 6005:6005 -p 6006:6006 niscolas/nvim-godot:latest
⚠️ And you can add the--network host
option to be able to use the host machine (your PC probably) network (I normally have to use it since I broke my Docker settings), but it's advised against
docker run --network host -it niscolas/nvim-godot:latest
- Can be done by cloning the repo and moving the nvim_config/ directory to your
$HOME/.config/nvim
OR
-
With this simple script:
⚠️ Your current Neovim config will be moved to$HOME/.config/nvim.old
, make sure that it's already in you Version Control system or that you know what you're doing)mv $HOME/.config/nvim $HOME/.config/nvim.old && \ git clone https://github.com/niscolas/nvim-godot && \ mv nvim-godot/nvim_config $HOME/.config/nvim
The run.sh is an executable bash
file responsible for opening your terminal and launching Neovim with the correct file (line and column) opened.
You may need to edit it to fit your needs, the places where changes maybe be needed are commented in the file itself.
- In Godot, go to
Editor > Editor Settings... > (General Tab) > Text Editor > External
- Set
Use External Editor
to ✅ - Set
Exec Path
to the location of therun.sh
file on your system - Set
Exec Flags
to"{file}" "{line},{col}"
⚠️ In order for the LSP features to work, you need a running instance of Godot 4
Out of the box you should have:
- ➡️ Autocompletion (integrated with LSP and Snippets)
- 🧠 General LSP features, just like in Godot's built-in Editor:
- 🌐 Go to Definition
- 🚦 Linting
- 🌸 A nice looking theme (with GDScript highlighting)
This is the default look of the custom Neovim Config included in this repo: (🌲 everforest theme)
💡 Screenshots taken from the Neovim instance running on the Docker container!
Most of the Neovim config was copied from nvim-lua/kickstart.nvim, with the theme change and the Godot specific LSP, TreeSitter and DAP settings