Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Second attempt at a neovim-backed repl #82

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

Conversation

caleb-allen
Copy link
Owner

@caleb-allen caleb-allen commented Jul 29, 2023

Not ready for use!

For development:

Start the "development instance" with:

nvim --listen '127.0.0.1:5555'

Start the logging output with:

while true
nc -l -p 1234
end

Then run the package:

julia -i -e 'using VimBindings; VimBindings.enable_logging("Nvim")

For reference, this branch is using Neovim.jl. The documentation for the neovim api are very helpful: https://neovim.io/doc/user/api.html

@Moelf
Copy link

Moelf commented Jul 30, 2023

while true
nc -l -p 1234

where do you run this?

@caleb-allen
Copy link
Owner Author

@Moelf I run it in a separate terminal; this is in a fish shell, so the while syntax may not work with bash.

You should be able to run nc -l -p 1234 on its own.

Alternately, if you leave out the VimBindings.enable_logging("Nvim") then it will run without logging.

(I really should write up a doc about development, my apologies!)

@Moelf
Copy link

Moelf commented Jul 30, 2023

I specifically switched to bash from fish thought it's some bash thing 🤦

next thing I get is

julia> Unhandled Task ERROR: MethodError: no method matching nvim_connect(::Int64, ::VimBindings.Nvim.ReplBindingsHandler)

Closest candidates are:
  nvim_connect(::String, ::Any...)
   @ Neovim ~/.julia/packages/Neovim/Gi1rU/src/Neovim.jl:27

Stacktrace:
 [1] start(addr::Int64)
   @ VimBindings.Nvim ~/Documents/github/VimBindings.jl/src/nvim.jl:14
 [2] init
   @ ~/Documents/github/VimBindings.jl/src/VimBindings.jl:176 [inlined]
 [3] prompt!(term::REPL.Terminals.TTYTerminal, prompt::REPL.LineEdit.ModalInterface, s::REPL.LineEdit.MIState)
   @ VimBindings ~/Documents/github/VimBindings.jl/src/lineeditalt.jl:14
 [4] run_interface(terminal::REPL.Terminals.TextTerminal, m::REPL.LineEdit.ModalInterface, s::REPL.LineEdit.MIState)

I think you may have a specialized method somewhere locally?

@caleb-allen
Copy link
Owner Author

caleb-allen commented Jul 30, 2023 via email

@caleb-allen
Copy link
Owner Author

I think you may have a specialized method somewhere locally?

Oh, you're right. I'm about to board a flight, I'll try to get that into this PR soon though. My bad.

@caleb-allen
Copy link
Owner Author

Alright, I've made a fork of Neovim.jl with my changes, try to dev it and see if that fixes the issues.

https://github.com/caleb-allen/Neovim.jl

Probably worth making a PR later on, once development has settled.

Let me know if you encounter more issues

@caleb-allen
Copy link
Owner Author

The majority of the relevant code in the PR is in nvim.jl; the majority of the package code is bypassed.

You can also ignore/delete any commented code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants