-
-
Save SamuelDavis/17c151569772cd76be26b9bcb21aff18 to your computer and use it in GitHub Desktop.
Start Nvim for Godot; when opening a .gd file in Godot, defer to either a running instance of Neovim if it exists, or a new one.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # usage: Exec Path: gvim | |
| # Exec Args: {file} | |
| # default lspconfig.gdscript.setup() is fine | |
| SOCK="/tmp/godot.sock" | |
| FILE=${1} | |
| if [ -S "$SOCK" ]; then | |
| nvim --server "$SOCK" --remote "$@" | |
| else | |
| gnome-terminal --active -- nvim --listen "$SOCK" "$@" | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment