nvim-gx
is a simple replacement for the gx
mapping provided by
netrw.
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
The plugin maps gx
in normal mode:
vim.keymap.set('n', 'gx', require('gx').gx)
Using vim-plug:
Plug 'josa42/nvim-gx'
Using packer.nvim
use {
'josa42/nvim-gx'
}
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 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.