Make nvimremote script more generic

main
Ensar Sarajčić 2022-10-23 09:20:28 +02:00
parent 07a992164a
commit 091e323694
3 changed files with 9 additions and 8 deletions

View File

@ -2,15 +2,16 @@
set -e
SERVER_NAME=$1
FILE=$2
LINE=$3
COLUMN=$4
WINDOW_NAME=$1
SERVER_NAME=$2
FILE=$3
LINE=$4
COLUMN=$5
if test -S $SERVER_NAME; then
/usr/bin/wmctrl -a "Neovim Godot"
/usr/bin/wmctrl -a "$WINDOW_NAME"
~/.asdf/shims/nvim --server $SERVER_NAME --remote $2
~/.asdf/shims/nvim --server $SERVER_NAME --remote-send ":call cursor($LINE, $COLUMN)<CR>"
else
/usr/bin/alacritty --title "Neovim Godot" -e /usr/bin/fish -c "nvim --listen $SERVER_NAME $2 --cmd \"call cursor($LINE, $COLUMN)\""
/usr/bin/alacritty --title "$WINDOW_NAME" -e /usr/bin/fish -c "nvim --listen $SERVER_NAME $2 --cmd \"call cursor($LINE, $COLUMN)\""
fi

View File

@ -96,7 +96,7 @@ text_editor/script_list/current_script_background_color = Color( 1, 1, 1, 0.3 )
text_editor/script_list/group_help_pages = true
text_editor/script_list/sort_scripts_by = 0
text_editor/script_list/list_script_names_as = 0
text_editor/external/exec_flags = "/tmp/godotnvim.sock {file} {line} {col}"
text_editor/external/exec_flags = "NeovimGodot /tmp/godotnvim.sock {file} {line} {col}"
editors/grid_map/preview_size = 64
editors/tile_map/preview_size = 64
editors/tile_map/palette_min_width = 80

View File

@ -38,7 +38,7 @@ text_editor/theme/highlighting/search_result_color = Color(1, 1, 1, 0.07)
text_editor/completion/add_type_hints = true
text_editor/external/use_external_editor = true
text_editor/external/exec_path = "/home/ensar/bin/nvimremote"
text_editor/external/exec_flags = "/tmp/godotnvim.sock {file} {line} {col}"
text_editor/external/exec_flags = "NeovimGodot /tmp/godotnvim.sock {file} {line} {col}"
asset_library/available_urls = {
"godotengine.org (Official)": "https://godotengine.org/asset-library/api"
}