This commit is contained in:
2023-09-28 12:21:01 +02:00
parent 7e3ad70840
commit e2772e383c
17 changed files with 517 additions and 722 deletions

View File

@@ -1,4 +1,4 @@
(import-macros {: g! : exec : map! : augroup!} :hibiscus.vim)
(import-macros {: g! : exec! : map! : augroup!} :hibiscus.vim)
(import-macros {: setup} :macros)
(g! :neo_tree_remove_legacy_commands 1)
@@ -14,8 +14,8 @@
:window {:mappings {:/ "noop"
:g/ "fuzzy_finder"
:f "noop"
:ff (fn [] (exec [[:Telescope "find_files"]]))
:fg (fn [] (exec [[:Telescope "live_grep"]]))
:ff (fn [] (exec! [[:Telescope "find_files"]]))
:fg (fn [] (exec! [[:Telescope "live_grep"]]))
:<CR> "custom_open"
:e "open"
:<S-Right> (fn [])
@@ -38,17 +38,17 @@
:height (+ (math.ceil height) 1)
:row 0
:col 2})]
(exec [[:setlocal "nonumber"]])
(exec! [[:setlocal "nonumber"]])
(vim.api.nvim_buf_attach bufnr false {:on_detach (fn [_ bufnr]
(image:delete bufnr {:free true}))})
(image:display 1 0 bufnr {}))
_ (do
(exec [[:silent
(exec! [[:silent
"!file -bL --mime" quoted_path
"| grep -qv '^text\\|^inode\\|^application/json'"]])
(if (= vim.v.shell_error 1)
((. (require :neo-tree.sources.filesystem.commands) :open_with_window_picker) state)
(exec [[:silent
(exec! [[:silent
"!xdg-open" quoted_path
"&"]]))))))}}
:renderers {:directory [[:indent]
@@ -67,7 +67,7 @@
[:git_status]]}})
(map! [n] :f ":Neotree focus<CR>")
(map! [n] :F (fn [] (exec [[:Neotree "toggle"] [:Neotree "toggle" "action=show"]])))
(map! [n] :F (fn [] (exec! [[:Neotree "toggle"] [:Neotree "toggle" "action=show"]])))
(augroup! :neo-tree [[FileType] [qf] "set nobuflisted|call feedkeys(\"F\")"])