Skip to content

Improve Godot run commands with scene picking and script-aware scene resolution#29

Merged
Mathijs-Bakker merged 3 commits intomasterfrom
feat/godot_commands
Apr 1, 2026
Merged

Improve Godot run commands with scene picking and script-aware scene resolution#29
Mathijs-Bakker merged 3 commits intomasterfrom
feat/godot_commands

Conversation

@Mathijs-Bakker
Copy link
Copy Markdown
Owner

Summary

This PR expands the plugin’s non-DAP run workflow so Godot projects and scenes can be launched directly from Neovim.

It adds run commands for projects and scenes, optional Telescope-based scene picking, and improves :GodotRunCurrentScene so it also works from .gd and .cs buffers when those scripts are attached to a scene.

Changes

  • Add non-DAP run commands:
    • :GodotRunProject
    • :GodotRunCurrentScene
    • :GodotRunScene {path}
    • :GodotRunScenePicker
  • Make :GodotRunCurrentScene work from:
    • .tscn buffers
    • .gd buffers attached to a scene
    • .cs buffers attached to a scene
  • When multiple scenes reference the current script, use Telescope to let the user choose one
  • Keep Telescope optional:
    • :GodotRunScenePicker requires Telescope
    • core run commands do not
  • Document the new commands and behavior in README/help
  • Add headless tests for:
    • command registration
    • project launching
    • current scene launching from .tscn
    • scene resolution from .gd / .cs
    • Telescope picker behavior
    • invalid scene path rejection

Why

Opening a .tscn directly in Neovim is not the common workflow in Godot projects. Most of the time, users are editing a script attached to a scene, so :GodotRunCurrentScene needs to work from the current script buffer to be practical.

Testing

  • Ran nvim --headless -u NONE -c "luafile tests/run.lua" -c "qa!"
  • All 36 tests passed

Related

Closes #28

@Mathijs-Bakker Mathijs-Bakker added the enhancement New feature or request label Apr 1, 2026
@Mathijs-Bakker Mathijs-Bakker merged commit b0ae696 into master Apr 1, 2026
1 check passed
@Mathijs-Bakker Mathijs-Bakker deleted the feat/godot_commands branch April 1, 2026 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feat:] Add non-DAP Godot run commands for projects and scenes

1 participant