Smart Neovim launcher for yyx990803/launch-editor
Rust 86.2%
Other 13.8%
5 1 1

Clone this repository

https://tangled.org/nasso.dev/launch-editor-nvim
git@tangled.org:nasso.dev/launch-editor-nvim

For self-hosted knots, clone URLs may differ based on your setup.

README.md

launch-editor-nvim#

something you can set as $LAUNCH_EDITOR for launch-editor to open a file in an existing nvim process

uses artificial intelligence to choose the best neovim process to open the file in, based on the current working directory of neovim and the path of the file to open

based on https://theosteiner.de/open-neovim-from-your-browser-integrating-nvim-with-sveltes-inspector and some discussion in the comment section under that blog post. thanks everyone!

installation#

cargo install --locked launch-editor-nvim

then just set $LAUNCH_EDITOR (e.g., in ~/.zshenv):

export LAUNCH_EDITOR=launch-editor-nvim

platform support#

platform tested should work
macOS yeah yeah
any other unix no yeah
windows no no

frequently asked questions#

why did you write in rust what should really be a shell script#

because its fun and also i wanted to be able to cargo install it anywhere

how does the artificial intelligence decide which neovim process to target?#

  1. the current working directory of the neovim process must be an ancestor of the file to open
  2. the process with the closest ancestor "wins"

does it really use artificial intelligence?#

it makes use of somewhat arbitrary heuristics to take a decision for you. it also helps you be more productive, so it's like a sort of "copilot" i guess. it also involves a lot of if statements, enough to be called an ai-enabled app

this isn't artificial intelligence#

this isn't a question

infrequently asked questions#

should i play outer wilds#

no, you MUST (see RFC 2119)