Add better behavior for godot nvim external editor

main
Ensar Sarajčić 2022-05-14 18:33:52 +02:00
parent 879859bd71
commit f477f569bf
7 changed files with 44 additions and 12 deletions

1
.gitattributes vendored 100644
View File

@ -0,0 +1 @@
*.tres filter=personal-godot-configuration-projects

View File

@ -0,0 +1,16 @@
#!/bin/sh
set -e
SERVER_NAME=$1
FILE=$2
LINE=$3
COLUMN=$4
if test -S $SERVER_NAME; then
/usr/bin/wmctrl -a "Neovim Godot"
~/.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)\""
fi

View File

@ -13,6 +13,7 @@ text_editor/highlighting/background_color = Color( 0.125, 0.14375, 0.19375, 1 )
text_editor/highlighting/completion_background_color = Color( 0.2, 0.23, 0.31, 1 )
text_editor/highlighting/completion_selected_color = Color( 1, 1, 1, 0.07 )
text_editor/highlighting/completion_existing_color = Color( 1, 1, 1, 0.14 )
text_editor/highlighting/completion_scroll_color = Color( 1, 1, 1, 0.07 )
text_editor/highlighting/completion_font_color = Color( 0.8, 0.8075, 0.8275, 1 )
text_editor/highlighting/text_color = Color( 0.8, 0.8075, 0.8275, 1 )
text_editor/highlighting/line_number_color = Color( 0.8, 0.8075, 0.8275, 0.5 )
@ -30,11 +31,11 @@ text_editor/highlighting/mark_color = Color( 1, 0.47, 0.42, 0.3 )
text_editor/highlighting/breakpoint_color = Color( 1, 0.47, 0.42, 1 )
text_editor/highlighting/code_folding_color = Color( 1, 1, 1, 0.7 )
text_editor/highlighting/search_result_color = Color( 1, 1, 1, 0.07 )
text_editor/completion/add_type_hints = true
asset_library/available_urls = {
"godotengine.org (Official)": "https://godotengine.org/asset-library/api"
}
asset_library/use_threads = true
projects/::tmp::test-issue = "/tmp/test-issue"
export/android/android_sdk_path = ""
export/android/debug_keystore = ""
export/android/debug_keystore_user = "androiddebugkey"
@ -86,8 +87,8 @@ debugger/profiler_frame_max_functions = 512
text_editor/files/auto_reload_scripts_on_external_change = true
text_editor/files/auto_reload_and_parse_scripts_on_save = true
text_editor/files/open_dominant_script_on_scene_change = true
text_editor/external/use_external_editor = false
text_editor/external/exec_path = ""
text_editor/external/use_external_editor = true
text_editor/external/exec_path = "/home/ensar/bin/nvimremote"
text_editor/script_list/script_temperature_enabled = true
text_editor/script_list/highlight_current_script = true
text_editor/script_list/script_temperature_history_size = 15
@ -95,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 = "{file}"
text_editor/external/exec_flags = "/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
@ -143,3 +144,4 @@ editors/3d_gizmos/gizmo_colors/joint_body_b = Color( 0.6, 0.9, 1, 1 )
text_editor/highlighting/gdscript/function_definition_color = Color( 0.4, 0.9, 1, 1 )
text_editor/highlighting/gdscript/node_path_color = Color( 0.39, 0.76, 0.35, 1 )
text_editor/help/sort_functions_alphabetically = true
interface/inspector/capitalize_properties = true

View File

@ -34,6 +34,10 @@ text_editor/theme/highlighting/mark_color = Color(1, 0.47, 0.42, 0.3)
text_editor/theme/highlighting/breakpoint_color = Color(1, 0.47, 0.42, 1)
text_editor/theme/highlighting/code_folding_color = Color(1, 1, 1, 0.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}"
asset_library/available_urls = {
"godotengine.org (Official)": "https://godotengine.org/asset-library/api"
}

View File

@ -0,0 +1,15 @@
-- Godot config
vim.wo.foldmethod = "expr"
vim.bo.tabstop = 4
vim.bo.shiftwidth = 4
vim.keymap.set("n", "<F4>", ":GodotRunLast<CR>", {
buffer = true,
})
vim.keymap.set("n", "<F5>", ":GodotRun<CR>", {
buffer = true,
})
vim.keymap.set("n", "<F6>", ":GodotRunCurrent<CR>", {
buffer = true,
})

View File

@ -1,8 +0,0 @@
setlocal foldmethod=expr
setlocal tabstop=4
setlocal shiftwidth=4
nnoremap <buffer> <F4> :GodotRunLast<CR>
nnoremap <buffer> <F5> :GodotRun<CR>
nnoremap <buffer> <F6> :GodotRunCurrent<CR>
nnoremap <buffer> <F7> :GodotRunFZF<CR>
let b:undo_ftplugin .= '|setlocal foldmethod< tabstop< shiftwidth<'

View File

@ -25,6 +25,8 @@
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
[filter "personal-godot-configuration-projects"]
clean = sed -e "/projects.*/d"
[include]
path = ~/.gitconfig.local
[includeIf "gitdir/i:~/Projects/Optimum/"]