godotdev.nvim-node-copy is a small Godot editor addon for users of godotdev.nvim.
It adds node-reference actions for the currently selected node and can either copy the generated text to the clipboard or, experimentally, insert it directly at the current cursor position in the active Neovim buffer.
- Copy the selected node path relative to the current scene root
- Copy a
$Node/Childreference - Copy a
get_node("Node/Child")expression - Copy a typed
@onready varsnippet - Copy a typed
GetNode<T>()C# expression - Copy a C# property snippet
- Works from the current editor selection
- Clipboard workflow for manual paste
- Experimental direct insertion at the current cursor in the active Neovim buffer through Neovim's editor server
- Open your project in Godot.
- Go to the
AssetLibtab. - Search for
godotdev.nvim node copy. - Open the asset page and click
Download. - Keep the install destination as your project root so Godot imports the
addon into
res://addons/godotdev_nvim_node_copy. - After import, go to
Project > Project Settings > Pluginsand enablegodotdev.nvim-node-copy.
Copy the addons/godotdev_nvim_node_copy folder into your Godot project:
res://addons/godotdev_nvim_node_copy
Then enable the plugin in:
Project > Project Settings > Plugins
Select a node in the Scene dock, then use either:
- the Scene Tree right-click menu
- the 2D editor right-click menu
- or the
Project > Toolsmenu
Available actions:
Project > Tools > godotdev.nvim: Copy Node PathProject > Tools > godotdev.nvim: Copy $ ReferenceProject > Tools > godotdev.nvim: Copy get_node()Project > Tools > godotdev.nvim: Copy @onready VarProject > Tools > godotdev.nvim: Copy C# GetNode<T>()Project > Tools > godotdev.nvim: Copy C# Property
By default, the generated text is copied to your clipboard. You can also configure the addon to use an experimental insert-at-cursor mode for an already-open Neovim buffer.
For a selected Player node:
Player$Playerget_node("Player")@onready var player: CharacterBody2D = $PlayerGetNode<CharacterBody2D>("Player")private CharacterBody2D Player => GetNode<CharacterBody2D>("Player");- The addon uses the selected node relative to the currently edited scene root.
- If the selected node is the scene root itself, the generated snippets use
selfwhere appropriate. - The addon supports both GDScript and C# snippet output.
The addon can be configured in Project Settings with:
godotdev_nvim_node_copy/enable_gdscriptgodotdev_nvim_node_copy/enable_csharpgodotdev_nvim_node_copy/output/modegodotdev_nvim_node_copy/output/neovim_executablegodotdev_nvim_node_copy/output/neovim_server_addressgodotdev_nvim_node_copy/output/fallback_to_clipboard
This controls which language-specific copy actions appear in:
Project > Tools- the Scene Tree right-click menu
- the 2D editor right-click menu
Copy Node Path remains available regardless of language selection.
Output settings:
godotdev_nvim_node_copy/output/mode:clipboardorneovim_remotegodotdev_nvim_node_copy/output/neovim_executable: the executable used for remote insertion, defaultnvrgodotdev_nvim_node_copy/output/neovim_server_address: the Neovim server address to target, default/tmp/godot.nvimon Linux/macOS and\\.\pipe\godot.nvimon Windowsgodotdev_nvim_node_copy/output/fallback_to_clipboard: if enabled, failed remote insertion falls back to the clipboard
godotdev.nvim-node-copy supports an experimental neovim_remote output mode.
Instead of only copying generated node snippets to the clipboard, the addon can send them directly to the current cursor position in an already open Neovim buffer through Neovim's editor server.
This is experimental because it is not drag-and-drop. It is a cursor-based insertion workflow and depends on your Neovim server setup being correct.
- inserting multiple node references into the same file while that file is already open in Neovim
- staying inside a fast Godot → Neovim workflow without manual paste each time
- letting
godotdev.nvimandgdscript-formatter --reorder-codereorganize inserted@onreadylines on save
- a replacement for Godot's internal-editor drag-and-drop
- aware of the best location in your file to insert code
- guaranteed to work unless Godot and Neovim both point to the same active server address
It inserts text at the current Neovim cursor position.
To use neovim_remote mode:
-
Start the Neovim session you want Godot to target with a stable server address, for example:
nvim --listen /tmp/godot.nvim
-
Install
nvrand make sure it is available:which nvr
-
Configure the Godot addon Project Settings:
godotdev_nvim_node_copy/output/mode = neovim_remotegodotdev_nvim_node_copy/output/neovim_server_address = /tmp/godot.nvimgodotdev_nvim_node_copy/output/neovim_executable = /full/path/to/nvr
- Clipboard mode remains the default and most predictable workflow.
- If remote insertion fails, the addon can fall back to the clipboard.
- Inserted snippets end with a newline so repeated inserts do not stack on the same line.
- The remote insertion flow works on Linux and macOS with the same
nvrplus--listensetup. - Windows is intended to work through a named pipe server address, but it has not been verified in this repository yet.
For Windows, start Neovim with a named pipe, for example:
nvim --listen \\\\.\\pipe\\godot.nvimThen configure:
godotdev_nvim_node_copy/output/mode = neovim_remotegodotdev_nvim_node_copy/output/neovim_server_address = \\\\.\\pipe\\godot.nvimgodotdev_nvim_node_copy/output/neovim_executable = /full/path/to/nvr.exe
- Commit the SVG
.importfile for the addon icon so users get consistent editor import settings. - The icon is intended to use
editor/scale_with_editor_scale=truefor proper HiDPI behavior. - The current icon import keeps fixed colors with
editor/convert_colors_with_editor_theme=false.
- Support
%UniqueNodewhen appropriate - Add C# snippet variants
- Let users choose snippet style in plugin settings
Release steps are documented in RELEASING.md.


