From e09e27b7f07ffbf99032734265305a6b330e6902 Mon Sep 17 00:00:00 2001 From: Uthman Mohamed <83053931+1239uth@users.noreply.github.com> Date: Tue, 19 Mar 2024 17:39:32 -0400 Subject: [PATCH] Use `vim.ui.open` if exists --- lua/lazyvim/plugins/editor.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lua/lazyvim/plugins/editor.lua b/lua/lazyvim/plugins/editor.lua index 79454539..5e2c8012 100644 --- a/lua/lazyvim/plugins/editor.lua +++ b/lua/lazyvim/plugins/editor.lua @@ -72,6 +72,12 @@ return { ["O"] = { command = function(state) local filepath = state.tree:get_node().path + + if vim.ui.open then + vim.ui.open(filepath) + return + end + local uname = vim.loop.os_uname() local OS = uname.sysname local is_mac = OS == "Darwin"