Home
Softono

Godot.nvim

Open source MIT Lua
151
Stars
3
Forks
1
Issues
3
Watchers
11 months
Last Commit

 About Godot.nvim

Run and debug your Godot game in neovim

Platforms

Web Self-hosted

Languages

Lua

Links

Need Help Installing Godot.nvim?

We provide expert installation service for this software. Our team will install, configure, and secure Godot.nvim on your server. plans start at just $30.

Godot.nvim

View on GitHub

lommix/godot.nvim

A Neovim plugin that seamlessly integrates Godot for GDScript development, debugging, and more — all without leaving Neovim’s powerful editing environment.

nvimgodotlogo

Demo

godotnvim.webm

Features

  • Debugging:

    • Attach to Godot to debug your scene.
    • Break on cursor or on runtime errors.
    • Step, continue, quit — all from within Neovim.
  • Godot 3 & 4 Support:

    • Works with older Godot 3 projects or the latest Godot 4 DAP integration.
  • Language Server (LSP):

    • Includes a simple setup for GDScript LSP (via lspconfig).
  • Treesitter Integration:

    • Basic grammar highlighting for gdscript, godot_resource, and gdshader files.
  • Watchers and Console:

    • On break, open a watcher window that shows local variables, globals, members, and a trace.
    • A separate console window logs information from the running Godot process.

Requirements

  • Neovim 0.7+ (for Lua-based config)
  • nvim-dap for debugging (optional, but strongly recommended)
  • nvim-treesitter for syntax highlighting (optional but recommended)
  • nvim-lspconfig for GDScript LSP (optional but recommended)
  • A local Godot executable (godot or godot4, etc.)

Installation

Use your favorite plugin manager. For example, with lazy.nvim:

{
  "lommix/godot.nvim",
  lazy = true,
  cmd = { "GodotDebug", "GodotBreakAtCursor", "GodotStep", "GodotQuit", "GodotContinue" },
},

Configuration

In your Neovim configuration, create a file or directly place:

{
  -- Path to your Godot executable
  bin = "godot",

  -- DAP configuration
  dap = {
    host = "127.0.0.1",
    port = 6006,
  },

  -- GUI settings for console (passed to nvim_open_win)
  gui = {
    console_config = {
      anchor = "SW",
      border = "double",
      col = 1,
      height = 10,
      relative = "editor",
      row = 99999,
      style = "minimal",
      width = 99999,
    },
  },

  -- Expose user commands automatically (optional)
  expose_commands = true,
}

Usage

Commands (if expose_commands = true or if you call godot.debugger.expose_commands() manually):

  • :GodotDebug – Launch Godot in debug mode.
  • :GodotBreakAtCursor – Launch Godot and break at the current cursor line in a .gd file.
  • :GodotStep – Step to the next instruction.
  • :GodotContinue – Continue execution after a break.
  • :GodotQuit – Quit the current debug session.

In addition, the plugin creates two special windows on break:

  • A console window showing log output.
  • A watcher window displaying current locals, globals, and trace data.

Contributing

Feel free to open issues or submit pull requests to enhance this plugin.

License

MIT © 2023 Contributors