From 9b86dca4ee3b58d8735b6ddcb465c74e69be819e Mon Sep 17 00:00:00 2001 From: Uthman Mohamed <83053931+1239uth@users.noreply.github.com> Date: Sun, 17 Mar 2024 23:09:01 -0400 Subject: [PATCH] feat(neo-tree): add mapping "O" to open with system default --- lua/lazyvim/plugins/editor.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lua/lazyvim/plugins/editor.lua b/lua/lazyvim/plugins/editor.lua index a2ba5e35..e38a1961 100644 --- a/lua/lazyvim/plugins/editor.lua +++ b/lua/lazyvim/plugins/editor.lua @@ -69,6 +69,14 @@ return { end, desc = "copy path to clipboard", }, + ["O"] = { + command = function(state) + local filepath = state.tree:get_node().path + + os.execute("open " .. string.format("'%s'", filepath)) + end, + desc = "open_with_system_defaults", + }, }, }, default_component_configs = {