[NeoVim] Update to new hibiscus syntax

This commit is contained in:
2023-09-28 14:32:58 +02:00
parent e2772e383c
commit f8643931f0
2 changed files with 13 additions and 13 deletions

View File

@@ -58,15 +58,15 @@
(fn [command _] (do_command (. command.arguments 1 :falsePositives) :hiddenFalsePositives))) (fn [command _] (do_command (. command.arguments 1 :falsePositives) :hiddenFalsePositives)))
(fn post_attach [] (fn post_attach []
(exec! [[:setlocal "spell"] [:setlocal "nospell"]]) (exec! [setlocal spell] [setlocal nospell])
(update_config "en-US" "dictionary") (update_config "en-US" "dictionary")
(update_config "en-US" "disabledRules") (update_config "en-US" "disabledRules")
(update_config "en-US" "hiddenFalsePositives") (update_config "en-US" "hiddenFalsePositives")
(map! [n :buffer :verbose] :zug (fn [] (exec! [[:normal! "zug"]]) (map! [n :buffer :verbose] :zug (fn [] (exec! [normal! zug])
(update_config "en-US" "dictionary") (update_config "en-US" "dictionary")
nil) nil)
"Remove word from spellfile and update ltex") "Remove word from spellfile and update ltex")
(map! [n :buffer :verbose] :zg (fn [] (exec! [[:normal! "zg"]]) (map! [n :buffer :verbose] :zg (fn [] (exec! [normal! zg])
(update_config "en-US" "dictionary") (update_config "en-US" "dictionary")
nil) nil)
"Add word to spellfile and update ltex") "Add word to spellfile and update ltex")

View File

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