5e81e7f22865dd22fcd47b0d320e6f509a65f35c
godotdev.nvim
A Neovim plugin for connecting to the Godot editor LSP server to provide code navigation, diagnostics, and LSP features for GDScript projects. Supports Windows, macOS, and Linux.
Features
- Connect to a running Godot editor's TCP LSP server.
- LSP-based code navigation for GDScript (
gd/gdscript). - Diagnostics, hover documentation, workspace symbols, and more.
- Healthcheck to validate editor LSP and required tools.
- OS-aware handling for TCP connection (
ncatrequired on Windows).
Requirements
- Neovim 0.11+
- Godot editor with TCP LSP server enabled (Editor Settings → Network → Enable TCP LSP server).
- Windows:
ncatmust be installed (via Scoop or Chocolatey). - macOS/Linux: optional
ncfor port check; otherwise assumed reachable.
Installation
Using Lazy.nvim:
`return {
'Mathijs-Bakker/godotdev.nvim',
lazy = false,
config = function()
require("godotdev").setup {
editor_port = 6005, -- optional, default is 6005
editor_host = "127.0.0.1" -- optional, default is localhost
}
end
}
Quickstart
-- Lazy.nvim
return {
'Mathijs-Bakker/godotdev.nvim',
config = function()
require("godotdev").setup({
editor_host = "127.0.0.1", -- Default: 127.0.0.1
editor_port = 6005, -- GDScript language server, default: 6005
debug_port = 6006, -- Debug adapter server, default: 6006
})
end,
}
LSP
- Open any
.gdor.gdscriptfile in your Godot project. - The plugin connects automatically to the running Godot editor LSP.
- Keymaps for LSP features (definitions, references, symbols, etc.) are attached per buffer.
DAP
- Requires
nvim-dapandnvim-dap-ui. - Launch your game or scene directly from Neovim:
- Make sure Godot is running with the debugger server enabled.
- Open a
.gdor.gdscriptfile. - Use DAP commands:
:DapContinue– Start/Continue debugging:DapStepOver,:DapStepInto,:DapStepOut
- The DAP UI automatically opens when debugging starts.
Healthcheck
:checkhealth godotdev
- Checks if the Godot editor LSP port is reachable.
- On Windows, also checks if
ncatis installed. - Gives clear instructions to fix missing dependencies or misconfigured ports.
Configuration Options
`require("godotdev").setup {
editor_host = "127.0.0.1", -- default
editor_port = 6005, -- default
}`
Notes
- The plugin does not start a Godot instance automatically; the Godot editor must be running with TCP LSP enabled.
- On Windows,
ncatis required for the TCP LSP connection. On macOS/Linux, the plugin assumes the port is reachable.
License
MIT License
Description
[FORK] of Mathijs-Bakker/godotdev.nvim with some patches
https://github.com/Mathijs-Bakker/godotdev.nvim
Languages
Lua
84.7%
Scheme
15.3%