Comments (9)
If there is something Nvim core can add which would eliminate the need for the rust component, that would very much be something we would try to support.
from firenvim.
I see, the rust binary can probably be replaced with a plugin then, thanks :)
from firenvim.
I haven't tried to run firenvim in windows yet but it should work, it just requires adding a few keys to the registry. I plan on adding this functionality to the rust component.
The rust component is just a really simple program which translates firefox's native messaging protocol into "raw" messages. Removing it would require adding a way for neovim to automatically detect the messages it's receiving are using firefox's protocol (this could probably be achieved by checking whether the two arguments neovim was started with are the ones Firefox gives to programs it starts) but I'm not sure this belongs in neovim (although I'll admit I'd love to have less code to maintain :p). Is there any support on neovim's side to specify "preprocessing" actions that would be applied to messages received on stdin?
Sorry this repo hasn't been updated in a while, I've been very busy. I do plan on getting back to this and making it actually usable on all three platforms and all webextension-supporting browsers.
from firenvim.
Is there any support on neovim's side to specify "preprocessing" actions that would be applied to messages received on stdin?
stdin can be processed arbitrarily by starting Nvim with --embed --headless
and calling stdioopen()
to create a channel on stdin/stdout. See :help stdioopen()
from firenvim.
I have added proper windows support to the native binary, built it and uploaded it to the releases pages (this is temporary - I still plan on turning it into a plugin that wouldn't require a native executable).
@justinmk I've been wondering, is it possible to open ports in vimscript/lua? Currently the main problem with firenvim is latency (up to 10ms to send a message and get an answer!). This happens because messages go through several layers of IPC. Thus I believe that the optimal architecture would be to have firenvim talk with neovim through a websocket, without going through a remote plugin. I can write the websocket code myself/steal it from somewhere but I need to have nvim listen on a port to do that.
from firenvim.
is it possible to open ports in vimscript/lua?
@glacambre serverstart()
starts a msgpack-RPC server. And Nvim always has at least one of these running at startup (v:servername
).
If you don't want to use msgpack-rpc we could maybe add that as a feature-request. But it's probably a good idea to use msgpack-rpc, since one needs some sort of protocol.
from firenvim.
@justinmk I do want to use msgpack-rpc but over websockets, which have their own protocol. So this is what sending a message would look like:
Browser sends a msgpack-rpc message over a websocket
|
v
Lua plugin running inside neovim receives the request on the socket it opened in neovim,
translates the websocket-msgpack-rpc message into a regular msgpack-rpc message and writes
it to a neovim channel
|
v
neovim processes the msgpack-rpc message and replies on the same channel
|
v
Lua plugin receives the answer, wraps in into a websocket request and sends it on its TCP
socket
|
v
Browser receives the message and does whatever it wants with it
That's why I would need to be able to open "normal" TCP sockets.
from firenvim.
@glacambre would you mind creating a feature-request?
from firenvim.
I'm going to close this since Firenvim now works on windows. If you want to follow progress on removing the native binary, please subscribe to #22.
from firenvim.
Related Issues (20)
- Uninstallation only removes binary in WSL but not files and registry keys on Windows host HOT 1
- Unexpected directory created on Windows host after installation on Windows host side HOT 1
- "Neovim died without answering" HOT 11
- Detect potential AppArmor issues on `firenvim#install()` HOT 1
- using in note-taking App HOT 9
- Firenvim conflict with Github "Review changes" text box HOT 4
- "Unexpected output. Run nvim --headless and ensure it prints nothing." HOT 5
- Completion menu not correctly cleared, leading to screen corruption. HOT 10
- Is it possible to support firefox mobile? HOT 4
- Add explanation on how to use it with snap / flatpak HOT 1
- Firenvim has started reporting "neovim is not responding" HOT 8
- [Bug] `nvim.exe` process is not killed when closing `Firenvim` `Neovim` instance HOT 4
- Review/update recovery instructions in wiki HOT 1
- [Feature Request] pass eval_js result to lua functions HOT 2
- "TypeError: nvim.call_atomic is not a function" on Nvim HEAD HOT 3
- [feature]: extend `selector`'s behavior to choose elements HOT 2
- Empty lines are sometimes doubled when editing text box in Firefox
- Neovim plugin version (0.2.15) and browser addon version (0.2.16) do not match. HOT 9
- Is there a way to have Google Apps Script autocomplete? HOT 3
- Add table of content to README HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from firenvim.