2.2 KiB
2.2 KiB
godotdev.nvim
Batteries-included Neovim plugin for Godot game development (Godot 4.3+), using Neovim as an external editor. Provides LSP support for GDScript and Godot shaders, DAP debugging, and Treesitter syntax highlighting.
Features
- Connect to Godot editor LSP over TCP (
127.0.0.1:6005by default) - Full GDScript language support
.gdshadersyntax highlighting via Treesitter- Debug GDScript with
nvim-dap(127.0.0.1:6006by default) - Keymaps for common LSP actions
- Batteries included: everything you need for Godot development in Neovim
Requirements
- Neovim 0.9+
- Godot 4.3+ with TCP LSP enabled
nvim-lspconfignvim-dapandnvim-dap-uifor debuggingnvim-treesitter- Windows users must have
ncatin PATH
Installation (Lazy.nvim)
{
'Mathijs-Bakker/godotdev.nvim',
lazy = false,
dependencies = { 'nvim-lspconfig', 'nvim-dap', 'nvim-dap-ui', 'nvim-treesitter' },
config = function()
require("godotdev").setup()
end,
}
Quickstart
- Open your Godot project in Neovim
- Start Godot editor with TCP LSP enabled (Editor Settings → Network → Enable TCP LSP server)
- Open a .gd or .gdshader file
- LSP will automatically attach
- Use rn to rename, gd to go to definition, gr for references, etc.
- Start debugging with DAP (Launch scene configuration)
Configuration
require("godotdev").setup({
editor_host = "127.0.0.1", -- Godot editor host
editor_port = 6005, -- LSP port
debug_port = 6006, -- DAP port
})
Keymaps
LSP
gd→ Go to definitiongD→ Go to declarationgy→ Type definitiongi→ Go to implementationgr→ List referencesK→ Hover<C-k>→ Signature help<leader>rn→ Rename symbol<leader>ca→ Code action<leader>f→ Format buffergl→ Show diagnostics[d/]d→ Previous/next diagnostic
DAP
F5-> Continue/StartF10-> Step overF11-> Step intoF12-> Step out<leader>db-> Toggle Breakpoint<leader>dB-> Conditional breakpoint
DAP UI
<leader>du-> , Toggle UI<leader>dr-> , Open REPL
License
MI