aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc/lua.txt
diff options
context:
space:
mode:
authormarshmallow <marshycity@gmail.com>2023-04-30 15:53:02 +1000
committerJustin M. Keyes <justinkz@gmail.com>2023-07-04 23:45:00 +0200
commitaf6e6ccf3dee815850639ec5613dda3442caa7d6 (patch)
tree8425b2b0dcf6592dd5f8a25d63187f337a047a2e /runtime/doc/lua.txt
parent3ecd45ded044c47efa76b74e9e3b720fbe27adc7 (diff)
downloadrneovim-af6e6ccf3dee815850639ec5613dda3442caa7d6.tar.gz
rneovim-af6e6ccf3dee815850639ec5613dda3442caa7d6.tar.bz2
rneovim-af6e6ccf3dee815850639ec5613dda3442caa7d6.zip
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>
Diffstat (limited to 'runtime/doc/lua.txt')
-rw-r--r--runtime/doc/lua.txt24
1 files changed, 24 insertions, 0 deletions
diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt
index fb6cbca6e3..f180471bde 100644
--- a/runtime/doc/lua.txt
+++ b/runtime/doc/lua.txt
@@ -2343,6 +2343,30 @@ input({opts}, {on_confirm}) *vim.ui.input()*
typed (it might be an empty string if nothing was
entered), or `nil` if the user aborted the dialog.
+open({path}) *vim.ui.open()*
+ Opens a path in the system's default handler. This function utilizes
+ `xdg-open`, `wslview`, `explorer`, or `open` commands depending on the
+ system to open the provided path.
+
+ Notifies the user if unsuccessful
+
+ Example: >lua
+
+ vim.ui.open("https://neovim.io/")
+
+ vim.ui.open("/path/to/file")
+<
+
+ Parameters: ~
+ • {path} (string) Path to be opened
+
+ Return: ~
+ SystemCompleted|nil result Result of command, if an appropriate one
+ could be found.
+
+ See also: ~
+ • |vim.system|
+
select({items}, {opts}, {on_choice}) *vim.ui.select()*
Prompts the user to pick from a list of items, allowing arbitrary
(potentially asynchronous) work until `on_choice`.