Skip to content

v0.5.0

Choose a tag to compare

@github-actions github-actions released this 28 Oct 06:09
· 15 commits to main since this release
Immutable release. Only release title and notes can be modified.
5351333

Color literals get a swatch that opens Godot's color picker, and resource
paths get their file's icon, which opens the file or picks another.
:GodotErrors lists script errors from the whole project, and the language
server now connects reliably when Godot starts.

About godotnvim

godotnvim replaces Godot's script editor with an embedded Neovim, drawn
inside the editor. Your Neovim config, plugins and keymaps load as usual, and
the parts of Godot's script editor that matter keep working.

Neovim tab with breakpoint, override and signal signs in the editor's colors

  • Drag and drop: nodes, files and Inspector properties drop in as the
    same text Godot inserts, with Ctrl/Cmd for @onready var, preload and
    NodePath forms.
  • Language server: hover docs, go-to-definition, references, rename and
    completion from Godot's GDScript language server, plus :GodotFunc to jump
    to any function in the project and :GodotErrors to list script errors
    across it.
  • Colors and resources: a swatch before each Color literal opens
    Godot's color picker, and an icon before each preload or load path
    opens the file or picks another.
  • Debugger: breakpoints show in the gutter and stay in sync with Godot's
    debugger both ways.
  • Signs: methods that signals connect to, and methods that override a base
    class, are marked as in Godot's script editor.
  • Running: Godot's run, pause and stop shortcuts work while you type, and
    :GodotRunFile runs an EditorScript.
  • Format on save with gdscript-formatter or gdformat.
  • Sessions and scene tabs: open files, splits and tabs come back when the
    project reopens, and each open scene gets its own Neovim tab page.
  • Colors: Neovim takes the script editor's colors, and vim2godot (in this
    release's assets) turns any Vim colorscheme into a Godot theme.

Hover docs from Godot's language server

Ctrl-dropping two nodes inserts @onready vars

Needs Godot 4.5+ and Neovim, installed separately. To install, copy
addons/godot_nvim from godot_nvim-<version>.zip into your project's
addons/ folder and enable Neovim Script Editor under Project → Project
Settings → Plugins. See the
README for the details.

Changelog

Added

  • Icons for resource paths, like the color swatches. Before each preload,
    load or ResourceLoader.load path (res://, uid:// or relative) sits
    the file's FileSystem icon, or the image itself for textures.
    Double-clicking it or :GodotOpenResource opens the file: a scene in
    Godot's 2D or 3D editor, a script in Neovim, anything else in the
    Inspector. :GodotPickResource picks another file of the same kind in
    Godot's Quick Open dialog and replaces the path. Both are also in
    Neovim's right-click menu.

    Icons and image previews before preload calls in Neovim

  • A color picker for Color literals, like the script editor's. A swatch in
    the color sits before each literal; clicking it, :GodotColor or gC
    opens Godot's color picker there, and each pick rewrites the literal in
    the form you choose (Color(r, g, b, a), a hex string, HSV, OKHSL, 8-bit
    or 0x hex). One u undoes the picks.

    The color picker on a Color literal in Neovim

  • :GodotErrors checks every script in the project with Godot's language
    server and, if any have errors, lists them in the quickfix list and opens
    it. :GodotErrors! lists warnings too. The language server only reports
    errors for open files, so before this you only saw errors in scripts you
    had opened.

    :GodotErrors lists errors from scripts that aren't open

  • The Signals dock's Go to Method (right-click a connection) and
    double-clicking a connection open the connected method in Neovim, where
    they used to open Godot's script editor. The method is found in Neovim's
    buffer, so unsaved edits that moved it count.

    Go to Method jumps to the connected method in Neovim

  • vim.g.godot_nvim is set before your config loads, so it can tell the
    Neovim inside Godot apart, for example to turn off lazy.nvim's update list
    there.

  • A project website, gdey.github.io/godotnvim,
    with the features, install steps, the README as documentation and this
    changelog.

Removed

None.

Fixed

  • :GodotRunScene with an image or other imported file ran it as a scene
    instead of warning that it is not one.
  • Starting Godot showed Could not connect to 127.0.0.1:6005, reason: "ECONNREFUSED" in Neovim, and .gd files opened at startup got no
    language server. Godot starts its language server only once the editor has
    loaded, after Neovim opens the session's files; the plugin now waits for
    the server before attaching, and :GodotErrors waits for it too.
  • The addon is no longer exported with your game. Its scripts were included
    in every export, though nothing loaded them; an export plugin now skips
    everything under addons/godot_nvim/ while the plugin is enabled.
  • :bwipeout or :bdelete on a buffer that was the only window of a scene's
    tab page closed the tab page and switched Godot to another scene. The tab
    page now stays and shows the next buffer, as Neovim does with a single tab
    page.