mirror of
https://github.com/neovim/neovim.git
synced 2025-12-15 19:05:40 +00:00
feat(vim.ui): vim.ui.open, "gx" without netrw
Co-authored-by: Mathias Fußenegger <mfussenegger@users.noreply.github.com> Co-authored-by: Justin M. Keyes <justinkz@gmail.com> Co-authored-by: ii14 <59243201+ii14@users.noreply.github.com>
This commit is contained in:
committed by
Justin M. Keyes
parent
3ecd45ded0
commit
af6e6ccf3d
@@ -18,3 +18,11 @@ vim.api.nvim_create_user_command('InspectTree', function(cmd)
|
||||
vim.treesitter.inspect_tree()
|
||||
end
|
||||
end, { desc = 'Inspect treesitter language tree for buffer', count = true })
|
||||
|
||||
if vim.g.use_lua_gx == nil or vim.g.use_lua_gx == true then
|
||||
vim.keymap.set({ 'n', 'x' }, 'gx', function()
|
||||
local uri = vim.fn.expand('<cfile>')
|
||||
|
||||
vim.ui.open(uri)
|
||||
end, { desc = 'Open URI under cursor with system app' })
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user