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, defaultnvimgodotdev_nvim_node_copy/output/neovim_server_address: the Neovim server address to target, default/tmp/godot.nvimon macOS/Linux and\\.\pipe\godot.nvimon Windowsgodotdev_nvim_node_copy/output/fallback_to_clipboard: if enabled, failed remote insertion falls back to the clipboard
Experimental neovim_remote mode inserts text at the current Neovim cursor. It is not drag-and-drop and works best when the target script is already open in Neovim.
To use experimental direct insertion:
- Enable the editor server in
godotdev.nvim, for example withautostart_editor_server = true, or start it manually with:GodotStartEditorServer. - Make sure the server address in Godot matches the Neovim server address configured in
godotdev.nvim. - Set
godotdev_nvim_node_copy/output/modetoneovim_remote.
This works well when you are inserting multiple nodes into a file that is already open in Neovim. With the current godotdev.nvim defaults, gdscript-formatter --reorder-code can reorder inserted @onready snippets for you on save.
- 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


