rmagatti / gx-extended.nvim

Extending the use of Neovim's `gx`
MIT License
31 stars 3 forks source link

Add vim.ui.select picker for when multiple handlers are registered #11

Closed rmagatti closed 1 year ago

rmagatti commented 1 year ago

Rework matching and opening functions for better multi-registration handling

The plugin now takes the following steps after gx:

  1. Checks what glob patterns match the absolute current path
  2. For each of these matched patterns it tries calling match_to_url
  3. If more than one succeeds it shows the selection menu through vim.ui.select. If not it opens the only succeeding call.

Changes

[lua/gx-extended/lib.lua]

https://github.com/rmagatti/gx-extended.nvim/assets/2881382/f7f09f3b-cd88-4f91-a1db-d2f4dc9246c2

Closes #10