Skip to content

nvim support? #28

@Drew-Daniels

Description

@Drew-Daniels

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions