A Neovim plugin for Godot 4 that brings GDScript/GDShader LSP, DAP debugging, and formatting to your external‑editor workflow.
This plugin helps you to set up:
- LSP support for GDScript and Godot shaders (
.gdshaderfiles) - Debugging via
nvim-dapfor GDScript - Treesitter syntax highlighting for Godot shader files
- Automatic formatting of
.gdfiles usinggdformat - Optional C# support (user-managed LSP, plus debugging and tooling checks)
- Built-in health checks to verify environment, dependencies, and editor integration
While it is possible to configure Neovim manually for Godot development, this plugin simplifies setup and ensures a consistent, cross-platform workflow. It automatically configures LSP, debugging, formatting, and environment checks, so you can focus on writing game code rather than troubleshooting editor setup.
- Turn Neovim into a first‑class external editor for Godot 4 projects.
- Get LSP features for GDScript/GDShader without manual wiring.
- Debug GDScript via DAP and validate setup with built‑in health checks.
Below is a quick overview of what you get out of the box:
- Full GDScript language support (Go to definition, references, hover, rename, code actions, etc.)
.gdshadersyntax highlighting and language features via Treesitter- Optional C# LSP support (user-managed
csharp-lsor OmniSharp) for Godot projects with C# scripts
- Debug GDScript directly from Neovim using
nvim-dap - Optional C# debugging via
netcoredbg
- Automatic
.gdfile formatting usinggdtoolkit - Reloads buffer after formatting for immediate feedback
- Recommended
.editorconfigincluded for consistent indentation (4 spaces per indent)
:checkhealth godotdevvalidates:- Required dependencies:
nvim-lspconfig,nvim-dap,nvim-dap-ui,nvim-treesitter - Godot editor LSP and debug servers
- Optional C# tooling:
dotnet,csharp-ls/OmniSharp,netcoredbg - Formatter:
gdformat(with installation instructions)
- Required dependencies:
- Detects common issues like mixed indentation in GDScript/C# files
- Commands to start or reconnect to Godot’s editor LSP:
:GodotStartEditorServer:GodotReconnectLSP
- Automatic LSP attachment for Godot filetypes (
.gd,.gdshader,.gdresource, optional.cs) - Works cross-platform (macOS, Linux, Windows) with TCP or named pipes
- Enable by setting
csharp = trueinrequire("godotdev").setup() - C# LSP is configured by you (the plugin only checks that
csharp-lsor OmniSharp is installed) - Health checks and DAP integration included
- Neovim 0.11+
- Godot 4.x+ with TCP LSP enabled
nvim-lspconfignvim-dapandnvim-dap-uifor debuggingnvim-treesitter- Windows users must have
ncatin PATH - Optional C# support requires (you manage the LSP configuration):
- .NET SDK (dotnet)
- C# LSP server (csharp-ls recommended or omnisharp)
- netcoredbg debugger
{
'Mathijs-Bakker/godotdev.nvim',
dependencies = { 'nvim-lspconfig', 'nvim-dap', 'nvim-dap-ui', 'nvim-treesitter' },
}- Open your Godot project in Neovim
- Start Godot editor with TCP LSP enabled (Editor Settings → Network → Enable TCP LSP server)
- Open a
.gdor.gdshaderfile - LSP will automatically attach
- Use
<leader>rnto rename,gdto go to definition,grfor references, etc. - Start debugging with DAP (Launch scene configuration)
- Optional: Enable C# support by setting
csharp = truein the plugin setup - Run
:checkhealth godotdevat any time to verify plugin, LSP, debug server, and C# dependencies
require("godotdev").setup({
editor_host = "127.0.0.1", -- Godot editor host
editor_port = 6005, -- Godot LSP port
debug_port = 6006, -- Godot debugger port
csharp = true, -- Enable C# Installation Support
autostart_editor_server = true, -- Enable auto start Nvim server
})Note: This plugin does not define any keymaps by default, so it will not interfere with the standard DAP mappings. If you want custom keybindings, you can configure them yourself. For example, you could map :GDebug to DapNew to start one or more new debug sessions.
See :help dap-mappings and :help dap-user-commands for more details.
Additional references:
Below are the recommended settings for configuring the Godot editor for optimal integration with Neovim as your external editor. To access these settings, make sure that the Advanced Settings switch is enabled at the top of the Editor Settings dialog.
-
Editor Settings > Text Editor > Behavior > Auto Reload Scripts on External Change -
Editor Settings > Interface > Editor > Save on Focus Loss -
Editor Settings > Interface > Editor > Import Resources When Unfocused
When you click on a gdscript in Godot's FileSystem dock it doesn't open automatically in Neovim. A workaround is to to create a small script which launches the file in Neovim.
Complete instructions here
- Set Neovim to listen on a TCP port
--listen works with host:port on Windows.
nvim --listen 127.0.0.1:6666
- Tell Godot to connect to that port
In Godot, configure your external editor or plugin to connect to
127.0.0.1:6666. Make sure the TCP port you choose is free and consistent between Neovim and Godot.
You can manually start the Neovim editor server used by Godot:
:GodotStartEditorServerOr automatically on plugin setup:
require("godotdev").setup({
autostart_editor_server = true,
})This ensures Godot can communicate with Neovim as an external editor.
If the LSP disconnects or you opened a script before Neovim, run:
:GodotReconnectLSPReconnects all Godot buffers to the LSP.
- Enable by setting
csharp = trueinrequire("godotdev").setup() - C# LSP setup is user-managed;
:checkhealth godotdevwill only verify tooling is installed:- .NET SDK (
dotnet) - C# LSP server (
csharp-lsoromnisharp) - Debugger (
netcoredbg)
- .NET SDK (
Godot expects spaces, 4 per indent (for both GDScript and C#).
This plugin automatically sets buffer options for .gd files.
Additionally, .gd files are autoformatted on save with gdtoolkit:
:wMake sure gdformat is installed and in your PATH. If not, you will see a warning notification.
For more info on indentation: :help godotdev-indent
Godot generates files and folders like .uid, .import, or .godot/ that can clutter your file explorer.
You can hide them in both oil.nvim and mini.files by filtering against their patterns.
Show me how

