Skip to content

Feat: add nvim support (macOS only)#200

Open
shren207 wants to merge 3 commits intoinfi-pc:masterfrom
shren207:feat/support-nvim
Open

Feat: add nvim support (macOS only)#200
shren207 wants to merge 3 commits intoinfi-pc:masterfrom
shren207:feat/support-nvim

Conversation

@shren207
Copy link

@shren207 shren207 commented Feb 1, 2026

Closes #196

Summary

test_nvim.mp4
📹 tmux session demo video
test_nvim_with_tmux.mp4

Adds Neovim as an editor target with a custom nvim:// URL handler for macOS, based on this approach.

🚨 Limitations

  • macOS only
  • One-time setup required — for registering nvim:// URL handler

How it works

One-time setup (user runs curl | bash)
  setup-nvim-handler.sh [--terminal=<name>]
    → Detects nvim + terminal (or uses --terminal override)
    → Creates ~/.local/bin/nvim-url-handler.sh
    → Creates ~/Applications/NvimURLHandler.app
    → Registers nvim:// URL scheme via Launch Services

Runtime (every Alt+Click)
  window.open("nvim://file/path/to/file.tsx:15:4")
    → macOS routes to NvimURLHandler.app
      → Calls nvim-url-handler.sh
        → tmux session set? → nvim --server --remote (reuse existing instance)
        → Otherwise        → open nvim in a new terminal window

Supported terminals

Terminal Detection Exit behavior
Ghostty .app exists Auto-closes (--quit-after-last-window-closed)
iTerm2 .app exists Opens in new tab
Kitty PATH or .app Auto-closes (-o macos_quit_when_last_window_closed)
Terminal.app Fallback Auto-closes via osascript

Auto-detect priority: Ghostty > iTerm2 > Kitty > Terminal.app

Users can also specify a terminal explicitly:

curl -fsSL <script-url> | bash -s -- --terminal=kitty

Note: The curl command above points to master, so it won't work until this PR is merged. To test locally:

# from the fork
curl -fsSL https://raw.githubusercontent.com/shren207/locatorjs/feat/support-nvim/scripts/setup-nvim-handler.sh | bash

# or from a local checkout
bash scripts/setup-nvim-handler.sh

The runtime UI provides a terminal selector so users can pick their terminal and copy the correct command.

@vercel
Copy link

vercel bot commented Feb 1, 2026

@shren207 is attempting to deploy a commit to the Michael Musil's projects Team on Vercel.

A member of the Team first needs to authorize it.

@shren207 shren207 mentioned this pull request Feb 1, 2026
- Add nvim:// URL target to allTargets in shared package
- Add tmuxSession field to ProjectOptions type and deserialization
- Extend buildLink() to support ${tmuxSession} template variable
- Add NvimSetupGuide component with macOS setup instructions
- Add TmuxSessionForm for configuring tmux session name
- Integrate both into LinkOptions when nvim target is selected
- Make Options panel scrollable to accommodate additional content
- Shell script to register nvim:// custom URL scheme on macOS
- Supports Ghostty, iTerm2, Kitty, Terminal.app
- Handles tmux session attachment for reusing running Neovim instances
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.

feat: NVIM support

1 participant