From f8643931f09176ec02b03f0460f228fa4d37de36 Mon Sep 17 00:00:00 2001 From: Pierre Jeanjean Date: Thu, 28 Sep 2023 14:32:58 +0200 Subject: [PATCH] [NeoVim] Update to new hibiscus syntax --- .config/nvim/fnl/settings/lsp/ltex.fnl | 6 +++--- .config/nvim/fnl/settings/neo-tree.fnl | 20 ++++++++++---------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.config/nvim/fnl/settings/lsp/ltex.fnl b/.config/nvim/fnl/settings/lsp/ltex.fnl index 4662f20..ea1a836 100644 --- a/.config/nvim/fnl/settings/lsp/ltex.fnl +++ b/.config/nvim/fnl/settings/lsp/ltex.fnl @@ -58,15 +58,15 @@ (fn [command _] (do_command (. command.arguments 1 :falsePositives) :hiddenFalsePositives))) (fn post_attach [] - (exec! [[:setlocal "spell"] [:setlocal "nospell"]]) + (exec! [setlocal spell] [setlocal nospell]) (update_config "en-US" "dictionary") (update_config "en-US" "disabledRules") (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") nil) "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") nil) "Add word to spellfile and update ltex") diff --git a/.config/nvim/fnl/settings/neo-tree.fnl b/.config/nvim/fnl/settings/neo-tree.fnl index 5fe84d9..1a8aa31 100644 --- a/.config/nvim/fnl/settings/neo-tree.fnl +++ b/.config/nvim/fnl/settings/neo-tree.fnl @@ -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])) : "custom_open" :e "open" : (fn []) @@ -38,19 +38,19 @@ :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 - "!file -bL --mime" quoted_path - "| grep -qv '^text\\|^inode\\|^application/json'"]]) + (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 - "!xdg-open" quoted_path - "&"]]))))))}} + (exec! [silent + !xdg-open `(.. "'" quoted_path "'") + &]))))))}} :renderers {:directory [[:indent] [:icon] [:current_filter] @@ -67,7 +67,7 @@ [:git_status]]}}) (map! [n] :f ":Neotree focus") -(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\")"])