[NeoVim] Fix file open in neo-tree
This commit is contained in:
@@ -17,6 +17,7 @@
|
|||||||
:ff (fn [] (exec [[:Telescope "find_files"]]))
|
:ff (fn [] (exec [[:Telescope "find_files"]]))
|
||||||
:fg (fn [] (exec [[:Telescope "live_grep"]]))
|
:fg (fn [] (exec [[:Telescope "live_grep"]]))
|
||||||
:<CR> "custom_open"
|
:<CR> "custom_open"
|
||||||
|
:e "open"
|
||||||
:<S-Right> (fn [])
|
:<S-Right> (fn [])
|
||||||
:<S-Left> (fn [])}}
|
:<S-Left> (fn [])}}
|
||||||
:commands {:custom_open (fn [state]
|
:commands {:custom_open (fn [state]
|
||||||
@@ -44,11 +45,12 @@
|
|||||||
_ (do
|
_ (do
|
||||||
(exec [[:silent
|
(exec [[:silent
|
||||||
"!file -bL --mime" quoted_path
|
"!file -bL --mime" quoted_path
|
||||||
"| grep -qv '^text\\|^inode' "
|
"| grep -qv '^text\\|^inode\\|^application/json'"]])
|
||||||
"&& xdg-open" quoted_path
|
|
||||||
"&"]])
|
|
||||||
(if (= vim.v.shell_error 1)
|
(if (= vim.v.shell_error 1)
|
||||||
((. (require :neo-tree.sources.filesystem.commands) :open) state))))))}}
|
((. (require :neo-tree.sources.filesystem.commands) :open_with_window_picker) state)
|
||||||
|
(exec [[:silent
|
||||||
|
"!xdg-open" quoted_path
|
||||||
|
"&"]]))))))}}
|
||||||
:renderers {:directory [[:indent]
|
:renderers {:directory [[:indent]
|
||||||
[:icon]
|
[:icon]
|
||||||
[:current_filter]
|
[:current_filter]
|
||||||
|
|||||||
Reference in New Issue
Block a user