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

nvim support? #28

Open
Drew-Daniels opened this issue Dec 19, 2024 · 2 comments · May be fixed by #30
Open

nvim support? #28

Drew-Daniels opened this issue Dec 19, 2024 · 2 comments · May be fixed by #30

Comments

@Drew-Daniels
Copy link

Thanks for building this! Seems really useful.

I've been trying to configure open-in-editor to open files with the scheme: nvim://{path}:{line}, and am confused on whether or not nvim is supported with this tool.

The README seems to indicate that nvim is supported, but after performing these steps, and taking a look at the open-in-editor script, I don't see any code that find would neovim.

image

Here are the steps I performed:

  • Set EDITOR in my environment with launchctl setenv EDITOR /opt/homebrew/bin/nvim
    • I also have export EDITOR=nvim in my ~/.zshrc file - I'm not sure if this would conflict with anything, but I did try setting it to the full path as well in case it was causing an issue, but it hasn't made a difference.
  • Downloaded the open-in-editor script into a scripts folder that I have included on my PATH, made it executable with chmod +x
  • I have downloaded the OpenInEditor.app folder and placed it in my /Applications folder
  • Installed duti with brew install duti
  • Registered the OpenInEditor application as the one to handle nvim URLs: duti -s org.dandavison.OpenInEditor nvim

However, when I check to make sure that the association works, it looks like nothing changed:

$ duti -x nvim
Failed to get default application for extension 'nvim'

Additionally, when I try opening terminal hyperlinks with the format: nvim:///Users/drew/projects/dotfiles/fish/functions/_autopair_backspace.fish, I see a flash like something is getting executed, but nvim never opens with this file.

2024-12-18_20-59-04.mp4

I've had also previously tried following these step to install the MacOS application instead, of cloning the OpenInEditor.app folder into /Applications, but when I tried this method, it appeared that nothing actually got installed into my /Applications directory for some reason.

$ brew tap dandavison/open-in-editor https://github.com/dandavison/open-in-editor.git
$ brew install --cask open-in-editor

Information about my system:

$ uname -a
Darwin drews-m1-mbp 23.6.0 Darwin Kernel Version 23.6.0: Mon Jul 29 21:14:30 PDT 2024; root:xnu-10063.141.2~1/RELEASE_ARM64_T6000 arm64
@glostis glostis linked a pull request Jan 6, 2025 that will close this issue
@glostis
Copy link

glostis commented Jan 6, 2025

I’ve opened PR #30 which may be of interest to you.

@Drew-Daniels
Copy link
Author

Awesome, thanks a lot @glostis !

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 a pull request may close this issue.

2 participants