josa42 / nvim-gx

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

nvim GX – Test Badge

nvim-gx is a simple replacement for the gx mapping provided by netrw.


✨ Features

Open URLs and more in the default browser:

  • URLs (eg. https://example.org)
  • domains with common TLDs (eg. example.org)
  • github repos (eg. josa42/nvim-gx)1
  • github issues (eg. #13377)1
  • github commit (eg. b13f2e)1
  • npm packages (eg. import 'express')2
  • github links (eg. [example](https://example.org))2

⌨️ Key Mappings

The plugin maps gx in normal mode:

vim.keymap.set('n', 'gx', require('gx').gx)

🚛 Installation

Using vim-plug:

Plug 'josa42/nvim-gx'

Using packer.nvim

use {
  'josa42/nvim-gx'
}

📦 Dependencies

To resolve repos, issues or commits gh needs to be installed and authenticated.

# verify authentication:
gh auth status

# authenticate with GitHub:
gh auth

To resolve npm packages and markdown links nvim-treesitter needs to be installed.

require('nvim-treesitter.configs').setup({
  ensure_installed = { 'javascript', 'markdown', 'markdown_inline' },
})

🔧 Setup

Setup function to set options.

Usage:

require('gx').setup({
  show_notifications = true,
  show_progress = false,
})

Valid keys for {opts}

  • show_notifications
    Determines if notifications are shown.

  • show_progress:
    Determines if progress notifications are shown.


License

MIT © Josa Gesell


Footnotes

  1. Requires gh to be installed and authenticated, run gh auth to authenticate. 2 3

  2. Requires nvim-treesitter/nvim-treesitter 2

About

License:MIT License


Languages

Language:Lua 99.4%Language:Shell 0.6%