niscolas / nvim-godot Goto Github PK
View Code? Open in Web Editor NEWUse Neovim as your Godot code editor!
Home Page: https://hub.docker.com/repository/docker/niscolas/nvim-godot/
License: MIT License
Use Neovim as your Godot code editor!
Home Page: https://hub.docker.com/repository/docker/niscolas/nvim-godot/
License: MIT License
I was having problem with nvim opening multiple not existing files after the first one so i fixed the script
#!/usr/bin/env bash
# CHANGE IF NEEDED:
# - replace with your Terminal Emulator executable
term_exec="alacritty"
# - replace with your Neovim executable
nvim_exec="nvim"
# - replace with other path for the Neovim server pipe
server_path="$HOME/.cache/nvim/godot-server.pipe"
start_server() {
"$term_exec" -e "$nvim_exec" --listen "$server_path"
}
open_file_in_server() {
# - escape stuff because nvim will not
filename=$(printf %q "$1")
"$term_exec" -e "$nvim_exec" --server "$server_path" --remote-send "<C-\><C-n>:n $filename<CR>:call cursor($2)<CR>"
}
if ! [ -e "$server_path" ]; then
# - start server FIRST then open the file
start_server &
sleep 200ms # - wait for the server to start
open_file_in_server "$1" "$2"
else
open_file_in_server "$1" "$2"
fi
the original version of the script would work if your file paths had no spaces in them
there is one more problem and it is with the {line} param in godot is that if the bug is at line 10 godot will send line 9 to the nvim-server i can't test the {col} param but it might have the same problem or my nvim config reads 1 as the first line not 0 as the first line for cursor cmd (didn't fix it)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.