diff options
Diffstat (limited to '')
| -rw-r--r-- | dot_config/nvim/fnl/plugins/bindings/init.fnl | 5 | ||||
| -rw-r--r-- | dot_config/nvim/fnl/plugins/flash.fnl | 19 | ||||
| -rw-r--r-- | dot_config/nvim/fnl/plugins/init.fnl | 28 | ||||
| -rw-r--r-- | dot_config/nvim/fnl/plugins/langs.fnl | 25 | ||||
| -rw-r--r-- | dot_config/nvim/fnl/plugins/lsp/capabilities.fnl | 1 | ||||
| -rw-r--r-- | dot_config/nvim/fnl/plugins/lsp/init.fnl | 33 | ||||
| -rw-r--r-- | dot_config/nvim/fnl/plugins/mini/init.fnl | 20 | ||||
| -rw-r--r-- | dot_config/nvim/fnl/plugins/mini/starter.fnl | 15 | ||||
| -rw-r--r-- | dot_config/nvim/fnl/plugins/neo-tree.fnl | 8 | ||||
| -rw-r--r-- | dot_config/nvim/fnl/plugins/os/init.fnl | 1 | ||||
| -rw-r--r-- | dot_config/nvim/fnl/plugins/os/linux.fnl | 1 | ||||
| -rw-r--r-- | dot_config/nvim/fnl/plugins/os/osx.fnl | 1 | ||||
| -rw-r--r-- | dot_config/nvim/fnl/plugins/surround.fnl | 5 | ||||
| -rw-r--r-- | dot_config/nvim/fnl/plugins/telescope.fnl | 20 |
14 files changed, 182 insertions, 0 deletions
diff --git a/dot_config/nvim/fnl/plugins/bindings/init.fnl b/dot_config/nvim/fnl/plugins/bindings/init.fnl new file mode 100644 index 0000000..4cfb558 --- /dev/null +++ b/dot_config/nvim/fnl/plugins/bindings/init.fnl @@ -0,0 +1,5 @@ +(import-macros {: tbl} :toast.macros) +[(tbl :folke/which-key.nvim & + :lazy true + :opts {}) + [:tpope/vim-rsi]] diff --git a/dot_config/nvim/fnl/plugins/flash.fnl b/dot_config/nvim/fnl/plugins/flash.fnl new file mode 100644 index 0000000..ece5de4 --- /dev/null +++ b/dot_config/nvim/fnl/plugins/flash.fnl @@ -0,0 +1,19 @@ +(import-macros {: tbl : recc} :toast.macros) +[(tbl :folke/flash.nvim & + :opts {:modes {:search {:enabled false}}} + :event :VeryLazy + :keys [(tbl :s #(recc :flash :jump) & + :mode [:n :x :o] + :desc :Flash) + (tbl :S #(recc :flash :treesitter) & + :mode [:n :x :o] + :desc "Flash Treesitter") + (tbl :r #(recc :flash :remote) & + :mode :o + :desc "Remote Flash") + (tbl :R #(recc :flash :treesitter_search) & + :mode [:o :x] + :desc "Flash Treesitter Search") + (tbl :<c-s> #(recc :flash :toggle) & + :mode :c + :desc "Toggle Flash Search")])] diff --git a/dot_config/nvim/fnl/plugins/init.fnl b/dot_config/nvim/fnl/plugins/init.fnl new file mode 100644 index 0000000..a867ecc --- /dev/null +++ b/dot_config/nvim/fnl/plugins/init.fnl @@ -0,0 +1,28 @@ +(import-macros {: tbl} :toast.macros) +(local conjureft [:clojure + :fennel + :hy + :janet + :julia + :lisp + :racket + :scheme]) + +; simple stuff that doesn't need any handling +; and doesn't fit in elsewhere +[(tbl :folke/lazy.nvim & :version false) + (tbl :Olical/nfnl & :ft :fennel) + (tbl :stevearc/dressing.nvim & + :opts {}) + (tbl :Olical/conjure & + :config (fn [_ opts] + (each [k v (pairs opts)] + (tset vim.g (.. :conjure# k) v))) + :opts {:mapping#prefix :<localleader>e + :extract#tree_sitter#enabled true + ; disabling lua, python, rust + :filetypes conjureft + :filetype#fennel :conjure.client.fennel.stdio + :filetype#janet :conjure.client.janet.stdio} + :ft conjureft) + [:tpope/vim-repeat]] diff --git a/dot_config/nvim/fnl/plugins/langs.fnl b/dot_config/nvim/fnl/plugins/langs.fnl new file mode 100644 index 0000000..5bfb817 --- /dev/null +++ b/dot_config/nvim/fnl/plugins/langs.fnl @@ -0,0 +1,25 @@ +(import-macros {: tbl} :toast.macros) +; language support +[(tbl :nvim-treesitter/nvim-treesitter & + :version false + :build ::TSUpdate + :dependnecies [:nvim-treesitter/nvim-treesitter-textobjects] + :main :nvim-treesitter.configs + :opts {:ensure_installed :all + :ignore_install [:norg] + :sync_install :true + :highlight {:enable true + :disable [:markdown] + :additional_vim_regex_highlighting [:markdown]}}) + ; non-treesitter languages + (tbl :janet-lang/janet.vim & :ft :janet) + (tbl :preservim/vim-markdown & + :version false + :dependencies [:godlygeek/tabular] + :ft :markdown) + ; helper for lisps + (tbl :gpanders/nvim-parinfer & + :ft [:clojure + :fennel + :janet + :scm])] diff --git a/dot_config/nvim/fnl/plugins/lsp/capabilities.fnl b/dot_config/nvim/fnl/plugins/lsp/capabilities.fnl new file mode 100644 index 0000000..607602c --- /dev/null +++ b/dot_config/nvim/fnl/plugins/lsp/capabilities.fnl @@ -0,0 +1 @@ +nil diff --git a/dot_config/nvim/fnl/plugins/lsp/init.fnl b/dot_config/nvim/fnl/plugins/lsp/init.fnl new file mode 100644 index 0000000..10685d2 --- /dev/null +++ b/dot_config/nvim/fnl/plugins/lsp/init.fnl @@ -0,0 +1,33 @@ +(import-macros {: tbl : recc} :toast.macros) + +(fn gopts [plist] + {:clangd {} + :clojure_lsp {:root_dir (plist :project.clj :deps.edn :bb.edn :build.boot :shadow-cljs.edn :.git)} + :denols {:autostart false + :root_dir (plist :deno.json :deno.jsonc)} + :gopls {} + :ltex {} + :lua_ls {} + :texlab {:filetypes [:tex :plaintex :bib :latex]} + :tsserver {:autostart false + :root_dir (plist :tsconfig.json :package.json)} + :zls {}}) + +(local attach (require :plugins.lsp.attach)) +(local caps (require :plugins.lsp.capabilities)) + +[(tbl :neovim/nvim-lspconfig & + :config (fn [_ opts] + (each [k v (pairs opts)] + (set v.on_attach (or attach v.on_attach)) + (when (= :table (type caps)) + (set v.capabilities (or v.capabilities caps))) + (let [s (. (require :lspconfig) k) + c (or v.cmd s.document_config.default_config.cmd)] + (when (not= 0 (vim.fn.executable (. c 1))) + (s.setup v))))) + :opts (fn [] + (let [plist (fn [...] + (local p (recc :lspconfig.util :root_pattern ...)) + #(p $))] + (gopts plist))))] diff --git a/dot_config/nvim/fnl/plugins/mini/init.fnl b/dot_config/nvim/fnl/plugins/mini/init.fnl new file mode 100644 index 0000000..f175ed7 --- /dev/null +++ b/dot_config/nvim/fnl/plugins/mini/init.fnl @@ -0,0 +1,20 @@ +(import-macros {: tbl : recc} :toast.macros) +[(tbl :echasnovski/mini.nvim & + :version false + :config (fn [_ opts] + (each [k v (pairs opts)] + (recc (.. :mini. k) :setup v))) + :opts (fn [] {:ai {} + :align {} + :basics {} + :bracketed {:indent {:options {:change_type :diff}}} + :comment {} + :completion {} + :cursorword {} + :indentscope {} + :move {} + :splitjoin {} + ; :starter (require :plugins.mini.starter) + :statusline {} + :tabline {} + :trailspace {}}))] diff --git a/dot_config/nvim/fnl/plugins/mini/starter.fnl b/dot_config/nvim/fnl/plugins/mini/starter.fnl new file mode 100644 index 0000000..99d71f9 --- /dev/null +++ b/dot_config/nvim/fnl/plugins/mini/starter.fnl @@ -0,0 +1,15 @@ +(let [starter (require :mini.starter) + telescope [{:action "Telescope commands" + :name :Commands} + {:action "Telescope find_files" + :name :Files} + {:action "Telescope help_tags" + :name "Help tags"} + {:action "Telescope live_grep" + :name "Live grep"} + {:action "Telescope oldfiles" + :name "Old files"}]] + (each [_ v (ipairs telescope)] + (set v.section :Telescope)) + {:items [telescope + (starter.sections.builtin_actions)]}) diff --git a/dot_config/nvim/fnl/plugins/neo-tree.fnl b/dot_config/nvim/fnl/plugins/neo-tree.fnl new file mode 100644 index 0000000..396f420 --- /dev/null +++ b/dot_config/nvim/fnl/plugins/neo-tree.fnl @@ -0,0 +1,8 @@ +(import-macros {: tbl : recc} :toast.macros) +[(tbl :nvim-neo-tree/neo-tree.nvim & + :cmd :Neotree + :dependencies [:nvim-lua/plenary.nvim + :MunifTanjim/nui.nvim] + :keys [(tbl :<leader>n #(recc :neo-tree.command :execute {:toggle true}) & + :desc :Neotree)] + :opts {})] diff --git a/dot_config/nvim/fnl/plugins/os/init.fnl b/dot_config/nvim/fnl/plugins/os/init.fnl new file mode 100644 index 0000000..44afc2c --- /dev/null +++ b/dot_config/nvim/fnl/plugins/os/init.fnl @@ -0,0 +1 @@ +(require (.. :plugins.os. (jit.os:lower))) diff --git a/dot_config/nvim/fnl/plugins/os/linux.fnl b/dot_config/nvim/fnl/plugins/os/linux.fnl new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/dot_config/nvim/fnl/plugins/os/linux.fnl @@ -0,0 +1 @@ +{} diff --git a/dot_config/nvim/fnl/plugins/os/osx.fnl b/dot_config/nvim/fnl/plugins/os/osx.fnl new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/dot_config/nvim/fnl/plugins/os/osx.fnl @@ -0,0 +1 @@ +{} diff --git a/dot_config/nvim/fnl/plugins/surround.fnl b/dot_config/nvim/fnl/plugins/surround.fnl new file mode 100644 index 0000000..6fdb678 --- /dev/null +++ b/dot_config/nvim/fnl/plugins/surround.fnl @@ -0,0 +1,5 @@ +(import-macros {: tbl} :toast.macros) +[(tbl :kylechui/nvim-surround & + :version :* ; omit to use main branch for latest features + :event :VeryLazy + :opts {})] diff --git a/dot_config/nvim/fnl/plugins/telescope.fnl b/dot_config/nvim/fnl/plugins/telescope.fnl new file mode 100644 index 0000000..44aa9d5 --- /dev/null +++ b/dot_config/nvim/fnl/plugins/telescope.fnl @@ -0,0 +1,20 @@ +(import-macros {: tbl : recc} :toast.macros) + +(fn gen [key fun desc] + (tbl (.. :<leader>f key) #(recc :telescope.builtin fun) & :desc desc)) + +[(tbl :nvim-telescope/telescope.nvim & + :dependencies [:nvim-lua/plenary.nvim + (tbl :nvim-telescope/telescope-fzf-native.nvim & + :build :make)] + :config (fn [_ opts] + (let [ts (require :telescope)] + (ts.setup opts) + (ts.load_extension :fzf))) + :cmd :Telescope + :keys [(gen :f :find_files "Find File") + (gen :g :live_grep "Live Grep") + (gen :b :buffers "Find Buffer") + (gen :h :help_tags "Find Help") + (gen :c :commands "Find Command") + (gen :t :treesitter "Find Treesitter")])] |
