Skip to content

Releases: gdey/godotnvim

v0.5.0

Choose a tag to compare

@github-actions github-actions released this 28 Oct 06:09
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.

v0.4.0

Choose a tag to compare

@github-actions github-actions released this 26 Oct 14:55
0bc2cbc

Each scene open in Godot now gets its own Neovim tab page, and switching
scenes on either side switches the other. A new start_clean setting runs
Neovim without your config, to rule it out when something misbehaves.

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.
  • 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

  • Editor Settings → godot_nvim/start_clean (off by default) starts Neovim
    with --clean, without your config, plugins and ShaDa, to rule them out
    when something misbehaves. The plugin's own features, including the
    session and format on save, keep working. Changing it restarts Neovim,
    or waits for :qa if there are unsaved changes.

    Neovim started clean: the message says your config and plugins were skipped

  • Each scene open in Godot gets its own Neovim tab page. Switching scenes in
    Godot shows that scene's tab page, and switching tab pages in Neovim
    switches Godot's scene. Opening a scene makes its tab page; closing it
    closes the tab page and keeps its buffers. Scripts opened from Godot open
    in the current scene's tab page. The links are saved with the session.
    Editor Settings → godot_nvim/link_scene_tabs turns it off.

    Switching scene tabs in Godot switches Neovim's tab page

Removed

None.

Fixed

None.

v0.3.0

Choose a tag to compare

@github-actions github-actions released this 25 Oct 20:02
12f356a

Added

  • colorscheme/: vim2godot, a Go tool that converts a Vim or Neovim
    colorscheme (any on vimcolorschemes.com) into a Godot editor theme, a .tet
    for the script editor plus an EditorScript for the interface colors. It is
    not part of the addon download. cendre is included as an example.
  • Releases now also carry vim2godot prebuilt for Linux, macOS and Windows
    (amd64 and arm64) as colorscheme-<version>-<os>-<arch> archives, with the
    addon's version number, plus SHA256SUMS.txt. vim2godot -version prints
    the version.
  • :GodotRunFile [file] runs a @tool script that extends EditorScript,
    as the script editor's File → Run does. Without a file it runs the current
    buffer, writing it first if it has unsaved changes. Files outside the
    project run after a confirmation.
  • Dragging a property from the Inspector into Neovim inserts it with its
    node path, $Path/To/Node.property, or with Ctrl/Cmd held, the NodePath
    string "Path/To/Node:property".
  • Open files, cursor positions, splits and tabs are saved when the editor
    closes (or Neovim quits) and restored when the project opens again. The
    session lives in .godot/godot_nvim/session.vim. Editor Settings →
    godot_nvim/restore_session turns it off.

Fixed

  • A file opened from Godot while Neovim was still starting lost its line:
    Godot now holds files back until Neovim has started.
  • The plugin failed to load on Godot 4.5, which lacks
    EditorSettings.get_shortcut(). There, the run shortcuts that work while
    typing are taken from the editor's run bar.

v0.2.0

Choose a tag to compare

@github-actions github-actions released this 25 Oct 16:31
eacd895

Added

  • :GodotFunc <name> opens a GDScript function by name from anywhere in the
    project, with name completion. Several matches, or partial ones, go to the
    quickfix list. Godot's language server has no workspace symbol search.
  • Project → Tools → Create Neovim Editor Profiles: copies each editor feature
    profile to <name>-neovim with the Script screen hidden, and offers to
    switch to one. The README now recommends hiding the Script screen.
  • GDScript formatting on save, on by default. It uses GDQuest's
    gdscript-formatter (including the copy its Godot add-on installs) or
    gdtoolkit's gdformat, whichever is found, and does nothing if neither is
    installed. Editor Settings → godot_nvim/format_on_save turns it off and
    godot_nvim/formatter_command picks another command. :GodotFormat
    formats on demand.

v0.1.0

Choose a tag to compare

@github-actions github-actions released this 25 Oct 00:41
6440f67

First release.

Added

  • Neovim embedded in a main-screen tab through the UI protocol (ext_linegrid).
    GDScript, shaders and other text files open there instead of Godot's script
    editor.
  • Drag-and-drop of scene nodes and files from the Scene and FileSystem docks.
    The inserted text matches Godot's script editor ($Node, $"../Path",
    %Unique, preload(...), @onready var with Ctrl/Cmd).
  • The GDScript language server, connected automatically.
  • Debugger breakpoints as signs. Toggle them with F9 or a double-click on the
    gutter. They sync both ways with Godot's debugger, follow its go-to-line,
    and grey out while Skip Breakpoints is on.
  • Signs for methods connected to signals (⇠) and for overridden virtual or
    inherited methods (↱). :GodotConnections lists both for the method
    under the cursor.
  • A godot colorscheme built from the editor's text editor colors, updated
    when the editor theme changes (setting godot_nvim/use_editor_colors).
  • The editor's run shortcuts work inside Neovim (Run Project, Run Current
    Scene, Run Specific Scene, Pause, Stop), plus :GodotRun,
    :GodotRunCurrent, :GodotRunScene, :GodotPause and :GodotStop.
  • :w saves without moving focus out of Neovim. :q closes the buffer
    instead of Neovim, and :wq saves then closes it.
  • Asset Library packaging, and a release workflow that publishes the addon
    zip when a version tag is pushed.