mirror of
https://github.com/neovim/neovim.git
synced 2024-12-23 20:55:18 -07:00
feat(vim.ui.open): support lemonade #30845
This commit is contained in:
parent
564173e556
commit
f4b620c4e6
@ -240,6 +240,10 @@ UI
|
|||||||
which controls the tool used to open the given path or URL. If you want to
|
which controls the tool used to open the given path or URL. If you want to
|
||||||
globally set this, you can override vim.ui.open using the same approach
|
globally set this, you can override vim.ui.open using the same approach
|
||||||
described at |vim.paste()|.
|
described at |vim.paste()|.
|
||||||
|
- `vim.ui.open()` now supports
|
||||||
|
[lemonade](https://github.com/lemonade-command/lemonade) as an option for
|
||||||
|
opening urls/files. This is handy if you are in an ssh connection and use
|
||||||
|
`lemonade`.
|
||||||
• The |ins-completion-menu| now supports cascading highlight styles.
|
• The |ins-completion-menu| now supports cascading highlight styles.
|
||||||
|hl-PmenuSel| and |hl-PmenuMatch| both inherit from |hl-Pmenu|, and
|
|hl-PmenuSel| and |hl-PmenuMatch| both inherit from |hl-Pmenu|, and
|
||||||
|hl-PmenuMatchSel| inherits highlights from both |hl-PmenuSel| and
|
|hl-PmenuMatchSel| inherits highlights from both |hl-PmenuSel| and
|
||||||
|
@ -159,8 +159,10 @@ function M.open(path, opt)
|
|||||||
cmd = { 'wslview', path }
|
cmd = { 'wslview', path }
|
||||||
elseif vim.fn.executable('explorer.exe') == 1 then
|
elseif vim.fn.executable('explorer.exe') == 1 then
|
||||||
cmd = { 'explorer.exe', path }
|
cmd = { 'explorer.exe', path }
|
||||||
|
elseif vim.fn.executable('lemonade') == 1 then
|
||||||
|
cmd = { 'lemonade', 'open', path }
|
||||||
else
|
else
|
||||||
return nil, 'vim.ui.open: no handler found (tried: wslview, explorer.exe, xdg-open)'
|
return nil, 'vim.ui.open: no handler found (tried: wslview, explorer.exe, xdg-open, lemonade)'
|
||||||
end
|
end
|
||||||
|
|
||||||
return vim.system(cmd, job_opt), nil
|
return vim.system(cmd, job_opt), nil
|
||||||
|
@ -153,7 +153,7 @@ describe('vim.ui', function()
|
|||||||
vim.fn.executable = function() return 0 end
|
vim.fn.executable = function() return 0 end
|
||||||
]]
|
]]
|
||||||
eq(
|
eq(
|
||||||
'vim.ui.open: no handler found (tried: wslview, explorer.exe, xdg-open)',
|
'vim.ui.open: no handler found (tried: wslview, explorer.exe, xdg-open, lemonade)',
|
||||||
exec_lua [[local _, err = vim.ui.open('foo') ; return err]]
|
exec_lua [[local _, err = vim.ui.open('foo') ; return err]]
|
||||||
)
|
)
|
||||||
end)
|
end)
|
||||||
|
Loading…
Reference in New Issue
Block a user