From 67c77d51557d5c75c68cb8aac3090f5b4687f646 Mon Sep 17 00:00:00 2001 From: elkowar <5300871+elkowar@users.noreply.github.com> Date: Fri, 8 Oct 2021 14:20:26 +0200 Subject: [PATCH] Fix packer stuff --- nvim/.config/nvim/fnl/dots/plugins.fnl | 455 ++++++++------------- nvim/.config/nvim/fnl/dots/plugins/cmp.fnl | 7 +- 2 files changed, 176 insertions(+), 286 deletions(-) diff --git a/nvim/.config/nvim/fnl/dots/plugins.fnl b/nvim/.config/nvim/fnl/dots/plugins.fnl index ec81711..132f74e 100644 --- a/nvim/.config/nvim/fnl/dots/plugins.fnl +++ b/nvim/.config/nvim/fnl/dots/plugins.fnl @@ -1,344 +1,235 @@ - - - - - - - (module dots.plugins - {require {a aniseed.core} + {autoload {a aniseed.core + packer packer} require-macros [macros]}) -(defn abuse [use stuff rest] +(defn [use stuff rest] (use (a.assoc rest 1 stuff))) +(defn- safe-require-plugin-config [name] + (let [(ok? val-or-err) (pcall require (.. "dots.plugins." name))] + (when (not ok?) + (print (.. "Plugin config error: " val-or-err))))) + +(defn use [...] + (let [pkgs [...]] + (packer.startup + (fn [use] + (for [i 1 (a.count pkgs) 2] + (let [name (. pkgs i) + opts (. pkgs (+ i 1))] + (-?> (. opts :mod) (safe-require-plugin-config)) + (use (a.assoc opts 1 name)))))))) -(local packer (require :packer)) -(packer.startup - (fn [use] - (abuse - use "/home/leon/coding/projects/nvim-gehzu" {}) - (abuse - use "/home/leon/coding/projects/yuck.vim" {}) - (abuse - use :nvim-lua/plenary.nvim {}) - (abuse - use :elkowar/antifennel-nvim {:opt false :config #(set vim.g.antifennel_executable "/home/leon/tmp/antifennel/antifennel")}) - (abuse - use :elkowar/kmonad.vim {}) +(use + :elkowar/yuck.vim {} + :nvim-lua/plenary.nvim {} + :elkowar/antifennel-nvim {:opt false :config #(set vim.g.antifennel_executable "/home/leon/tmp/antifennel/antifennel")} + :elkowar/kmonad.vim {} - (abuse - use :ruanyl/vim-gh-line {}) - (abuse - use :rhysd/conflict-marker.vim {}) - (abuse - use :wellle/visual-split.vim {}) - (abuse - use :sindrets/diffview.nvim {}) - (abuse - use :folke/persistence.nvim {:opt false :config #(require "dots.plugins.persistence")}) - (abuse - use :folke/zen-mode.nvim {:cmd ["ZenMode"] - :opt false :config #(require "dots.plugins.zen-mode")}) - (abuse - use :folke/twilight.nvim {:opt false :config #(require "dots.plugins.twilight")}) - (abuse - use :TimUntersberger/neogit {:opt false :config #(require "dots.plugins.neogit") - :cmd ["Neogit"]}) + :ruanyl/vim-gh-line {} + :rhysd/conflict-marker.vim {} + :wellle/visual-split.vim {} + :sindrets/diffview.nvim {} + :folke/persistence.nvim {:opt false :config #(require "dots.plugins.persistence")} + + :folke/zen-mode.nvim {:cmd ["ZenMode"] + :opt false :config #(require "dots.plugins.zen-mode")} + + :folke/twilight.nvim {:opt false :config #(require "dots.plugins.twilight")} - (abuse - use :lifepillar/vim-gruvbox8 {:opt false - :config - #(do (set vim.g.gruvbox_italics 0) - (set vim.g.gruvbox_italicise_strings 0) - (set vim.g.gruvbox_filetype_hi_groups 1) - (set vim.g.gruvbox_plugin_hi_groups 1) - (vim.cmd "colorscheme gruvbox8") - ((. (require :dots.utils) :highlight) :SignColumn {:bg (. (require :dots.colors) :dark0)}))}) + :TimUntersberger/neogit {:opt false :config #(require "dots.plugins.neogit") + :cmd ["Neogit"]} + + + :lifepillar/vim-gruvbox8 {:opt false + :config + #(do (set vim.g.gruvbox_italics 0) + (set vim.g.gruvbox_italicise_strings 0) + (set vim.g.gruvbox_filetype_hi_groups 1) + (set vim.g.gruvbox_plugin_hi_groups 1) + (vim.cmd "colorscheme gruvbox8") + ((. (require :dots.utils) :highlight) :SignColumn {:bg (. (require :dots.colors) :dark0)}))} ;(req dots.utils.highlight :SignColumn {:bg (. (require :dots.colors) :dark0)}))} ;(req dots.utils.highlight :LspDiagnosticsUnderlineError {:gui "underline"}))} - (abuse - use :nvim-telescope/telescope.nvim {:opt false :config #(require "dots.plugins.telescope") - :cmd ["Telescope"] - :requires [:nvim-lua/popup.nvim - :nvim-lua/plenary.nvim]}) + + :nvim-telescope/telescope.nvim {:opt false :config #(require "dots.plugins.telescope") + :cmd ["Telescope"] + :requires [:nvim-lua/popup.nvim + :nvim-lua/plenary.nvim]} - (abuse - use :nvim-telescope/telescope-packer.nvim {}) - (abuse - use :nvim-telescope/telescope-frecency.nvim {:requires [:tami5/sql.nvim] - :opt false}) + + :nvim-telescope/telescope-packer.nvim {} + + :nvim-telescope/telescope-frecency.nvim {:requires [:tami5/sql.nvim] + :opt false} ;:opt false :config #((. (require :telescope) :load_extension) "frecency")} - (abuse - use :kyazdani42/nvim-web-devicons {}) - - (abuse - use :nvim-treesitter/nvim-treesitter {:opt false :config #(require "dots.plugins.treesitter") - :event ["BufEnter"] - :run ":TSUpdate"}) - - (abuse - use :JoosepAlviste/nvim-ts-context-commentstring {:event ["BufEnter"] - :requires [:nvim-treesitter/nvim-treesitter]}) - (abuse - use :nvim-treesitter/playground {:event ["BufEnter"] - :requires [:nvim-treesitter/nvim-treesitter]}) - ;:p00f/nvim-ts-rainbow {} - ;:romgrk/nvim-treesitter-context {} - - - ;:code-biscuits/nvim-biscuits {:requires [:nvim-treesitter/nvim-treesitter] - ;:event ["BufReadPost"] - ;:opt false :config #((. (require "nvim-biscuits") :setup) {})} - - - - (abuse - use :jiangmiao/auto-pairs {}) - - (abuse - use :folke/which-key.nvim {}) - - ; json query stuff - ;:gennaro-tedesco/nvim-jqx {:ft ["json"]} - - (abuse use :Olical/aniseed {:branch "develop"}); :tag "v3.16.0"} - ;(abuse use :Olical/aniseed {:tag "v3.21.0"}); :tag "v3.16.0"} - ; (abuse use :Olical/aniseed {:branch "master"}); :tag "v3.16.0"} - ;:Olical/aniseed {}; :tag "v3.16.0"} - ; general purpose lua wrappers for nvim stuff - (abuse - use :norcalli/nvim.lua {}) + :kyazdani42/nvim-web-devicons {} - (abuse - use :Famiu/feline.nvim {:opt false :config #(require "dots.plugins.feline")}) - ;config #(require "dots.plugins.feline")} + + :nvim-treesitter/nvim-treesitter {:opt false :config #(require "dots.plugins.treesitter") + :event ["BufEnter"] + :run ":TSUpdate"} - (abuse - use :akinsho/nvim-bufferline.lua {:opt false :config #(require "dots.plugins.bufferline")}) - ;:romgrk/barbar.nvim {:opt false :config #(require "dots.plugins.barbar")} + + :JoosepAlviste/nvim-ts-context-commentstring {:event ["BufEnter"] + :requires [:nvim-treesitter/nvim-treesitter]} + + :nvim-treesitter/playground {:event ["BufEnter"] + :requires [:nvim-treesitter/nvim-treesitter]} + :jiangmiao/auto-pairs {} - (abuse - use - :sindrets/diffview.nvim {:cmd ["DiffviewOpen" "DiffviewToggleFiles"] - :opt false :config #(require "dots.plugins.diffview")}) - (abuse - use :tweekmonster/startuptime.vim {:cmd ["StartupTime"]}) - (abuse - use :tpope/vim-repeat {}) + :folke/which-key.nvim {} - (abuse - use :lewis6991/gitsigns.nvim {:after ["vim-gruvbox8"] - :opt false :config #(require "dots.plugins.gitsigns")}) + :Olical/aniseed {:branch "develop"} + + :norcalli/nvim.lua {} + + :Famiu/feline.nvim {:opt false :config #(require "dots.plugins.feline")} + :akinsho/nvim-bufferline.lua {:opt false :config #(require "dots.plugins.bufferline")} + + :sindrets/diffview.nvim {:cmd ["DiffviewOpen" "DiffviewToggleFiles"] + :opt false :config #(require "dots.plugins.diffview")} + + :tweekmonster/startuptime.vim {:cmd ["StartupTime"]} + + :tpope/vim-repeat {} + + + :lewis6991/gitsigns.nvim {:after ["vim-gruvbox8"] + :opt false :config #(require "dots.plugins.gitsigns")} - (abuse - use :tpope/vim-fugitive {}) - (abuse - use :preservim/nerdcommenter {}) - (abuse - use :godlygeek/tabular {:cmd ["Tabularize"]}) ; :Tab /regex can align code on occurrences of the given regex. I.e. :Tab /= aligns all = signs in a block. - (abuse - use :tpope/vim-surround {}) - (abuse - use :nathanaelkane/vim-indent-guides {}) ; Can be toggled using ig (intent-guides) + + :tpope/vim-fugitive {} + + :preservim/nerdcommenter {} + + :godlygeek/tabular {:cmd ["Tabularize"]} ; :Tab /regex can align code on occurrences of the given regex. I.e. :Tab /= aligns all = signs in a block. + + :tpope/vim-surround {} + + :nathanaelkane/vim-indent-guides {} ; Can be toggled using ig (intent-guides) ; to select current word. to select next occurrence. ; with multiple lines selected in Visual mode, to insert cursor in each line. I not i to insert in Visual-mode. - (abuse - use :terryma/vim-multiple-cursors {}) - (abuse - use :mg979/vim-visual-multi {}) - (abuse - use :hauleth/sad.vim {}) ; Use siw instead of ciw. when using . afterwards, will find the next occurrence of the changed word and change it too - (abuse - use :wellle/targets.vim {}) ; more text objects. IE: cin (change in next parens). generally better handling of surrounding objects. + :terryma/vim-multiple-cursors {} + :mg979/vim-visual-multi {} + + :hauleth/sad.vim {} ; Use siw instead of ciw. when using . afterwards, will find the next occurrence of the changed word and change it too + + :wellle/targets.vim {} ; more text objects. IE: cin (change in next parens). generally better handling of surrounding objects. - ; (abuse use :iamcco/markdown-preview.nvim {:run vim.fn.mkdp#util#install}) + ; ( use :iamcco/markdown-preview.nvim {:run vim.fn.mkdp#util#install}) - (abuse - use - :rcarriga/nvim-dap-ui {:opt false - :opt false :config #((. (require :dapui) :setup)) - ;:opt false :config #(req dapui.setup) - :requires [:mfussenegger/nvim-dap]}) + + :rcarriga/nvim-dap-ui {:opt false + :opt false :config #((. (require :dapui) :setup)) + ;:opt false :config #(req dapui.setup) + :requires [:mfussenegger/nvim-dap]} - (abuse - use :mfussenegger/nvim-dap {:opt false}) + + :mfussenegger/nvim-dap {:opt false} ;:opt false :config #(require "dots.plugins.nvim-dap")} - (abuse - use - :nvim-telescope/telescope-dap.nvim {:opt false - :requires [:mfussenegger/nvim-dap - :nvim-telescope/telescope.nvim]}) + + :nvim-telescope/telescope-dap.nvim {:opt false + :requires [:mfussenegger/nvim-dap + :nvim-telescope/telescope.nvim]} ; code-related ----------------------------------------- <<< - (abuse - use :ray-x/lsp_signature.nvim {:events [:BufEnter]}) - (abuse - use - "/home/leon/coding/prs/trouble.nvim" {:opt false :config #(require "dots.plugins.trouble") - :cmd ["Trouble" "TroubleClose" "TroubleRefresh" "TroubleToggle"]}) + + :ray-x/lsp_signature.nvim {:events [:BufEnter]} + + "/home/leon/coding/prs/trouble.nvim" {:opt false :config #(require "dots.plugins.trouble") + :cmd ["Trouble" "TroubleClose" "TroubleRefresh" "TroubleToggle"]} ;:folke/lsp-trouble.nvim {:opt false :config #(require "dots.plugins.trouble") ;:cmd ["Trouble" "TroubleClose" "TroubleRefresh" "TroubleToggle"]} - (abuse - use - :simrat39/symbols-outline.nvim {:opt false :config #(require "dots.plugins.symbols-outline")}) - (abuse - use - :neovim/nvim-lspconfig {}) + + :simrat39/symbols-outline.nvim {:opt false :config #(require "dots.plugins.symbols-outline")} + + :neovim/nvim-lspconfig {} - ;:hrsh7th/nvim-compe {:opt false :config #(require "dots.plugins.compe")} - ;:/home/leon/coding/prs/nvim-compe {:event [:InsertEnter] - ;:opt false :config #(require "dots.plugins.compe")} ;:ms-jpq/coq_nvim {:opt false :config #(require "dots.plugins.coq-nvim") ;:branch "coq" - ;:ms-jpq/coq.artifacts {:branch "artifacts"} - (abuse use :hrsh7th/vim-vsnip {}) + :hrsh7th/vim-vsnip {} - (abuse use :hrsh7th/cmp-vsnip {}) - (abuse use :hrsh7th/cmp-nvim-lsp {}) - (abuse use :hrsh7th/cmp-buffer {}) - (abuse - use - :hrsh7th/nvim-cmp - {:opt false - :requires [:hrsh7th/cmp-nvim-lsp - :hrsh7th/cmp-buffer - :hrsh7th/cmp-vsnip] - :config #(require "dots.plugins.cmp")}) + :hrsh7th/cmp-vsnip {} + :hrsh7th/cmp-nvim-lsp {} + :hrsh7th/cmp-buffer {} + + :hrsh7th/nvim-cmp {:opt false + :requires [:hrsh7th/cmp-nvim-lsp + :hrsh7th/cmp-buffer + :hrsh7th/cmp-vsnip] + :config #(require "dots.plugins.cmp")} - (abuse - use - :tami5/lspsaga.nvim {:after "vim-gruvbox8" - :opt false - :commit "373bc031b39730cbfe492533c3acfac36007899a" - :config #(require "dots.plugins.lspsaga")}) + + :tami5/lspsaga.nvim {:after "vim-gruvbox8" + :opt false + :commit "373bc031b39730cbfe492533c3acfac36007899a" + :config #(require "dots.plugins.lspsaga")} - (abuse - use - :sbdchd/neoformat {}) + + :sbdchd/neoformat {} ;; -------------------- - ; (use :AndrewRadev/splitjoin.vim {}) + :Olical/conjure {} + :ciaranm/detectindent {:opt false :config #(require "dots.plugins.detect-indent")} + :pechorin/any-jump.vim {} + :justinmk/vim-sneak {:opt false :config #(require "dots.plugins.sneak")} + :psliwka/vim-smoothie {} + :editorconfig/editorconfig-vim {} + :tommcdo/vim-exchange {} + :eraserhd/parinfer-rust {:run "cargo build --release"} - (abuse - use - :Olical/conjure {}) + :bduggan/vim-raku {:ft ["raku"]} + :LnL7/vim-nix {:ft ["nix"]} + :kevinoid/vim-jsonc {} + :norcalli/nvim-colorizer.lua {:opt false :config #(require "dots.plugins.nvim-colorizer")} + :pangloss/vim-javascript {} ; syntax highlighting JS + :ianks/vim-tsx {} + :leafgarland/typescript-vim {} + :HerringtonDarkholme/yats.vim {} ; typescript syntax highlighting + :mxw/vim-jsx {} + :mattn/emmet-vim {:opt false :config #(require "dots.plugins.emmet")} + :purescript-contrib/purescript-vim {} + :derekelkins/agda-vim {:ft ["agda"]} + :neovimhaskell/haskell-vim { :ft ["haskell"]} - (abuse - use - :tami5/compe-conjure {:requires [:Olical/conjure]}) - - (abuse - use - :ciaranm/detectindent {:opt false :config #(require "dots.plugins.detect-indent")}) - (abuse - use :pechorin/any-jump.vim {}) - (abuse - use :justinmk/vim-sneak {:opt false :config #(require "dots.plugins.sneak")}) - (abuse - use :psliwka/vim-smoothie {}) - (abuse - use :editorconfig/editorconfig-vim {}) - (abuse - use :tommcdo/vim-exchange {}) - - ;:frazrepo/vim-rainbow {} - - ;:bhurlow/vim-parinfer {:ft ["fennel" "carp" "lisp" "elisp"]} - - (abuse use :eraserhd/parinfer-rust {:run "cargo build --release"}) - - ;:/home/leon/coding/prs/parinfer-rust {} - ;"elkowar/parinfer-rust" {:run "cargo build --release" - ;:branch "yuck"} - - (abuse - use :bduggan/vim-raku {:ft ["raku"]}) - (abuse - use :LnL7/vim-nix {:ft ["nix"]}) - - (abuse - use :kevinoid/vim-jsonc {}) - - (abuse - use :norcalli/nvim-colorizer.lua {:opt false :config #(require "dots.plugins.nvim-colorizer")}) - (abuse - use :pangloss/vim-javascript {}) ; syntax highlighting JS - (abuse - use :ianks/vim-tsx {}) - (abuse - use :leafgarland/typescript-vim {}) - (abuse - use :HerringtonDarkholme/yats.vim {}) ; typescript syntax highlighting - (abuse - use :mxw/vim-jsx {}) - (abuse - use :mattn/emmet-vim {:opt false :config #(require "dots.plugins.emmet")}) - - (abuse - use :purescript-contrib/purescript-vim {}) - - - (abuse - use :derekelkins/agda-vim {:ft ["agda"]}) - (abuse - use :neovimhaskell/haskell-vim { :ft ["haskell"]}) - - (abuse - use - :rust-lang/rust.vim {:ft ["rust"] - :requires ["mattn/webapi-vim"] - :opt false :config #(do (set vim.g.rustfmt_fail_silently 1))}) + + :rust-lang/rust.vim {:ft ["rust"] + :requires ["mattn/webapi-vim"] + :opt false :config #(do (set vim.g.rustfmt_fail_silently 1))} - (abuse use :simrat39/rust-tools.nvim {:requires ["nvim-lua/popup.nvim" "nvim-lua/plenary.nvim"]}) + :simrat39/rust-tools.nvim {:requires ["nvim-lua/popup.nvim" "nvim-lua/plenary.nvim"]} - ; (use - ; :Saecki/crates.nvim {:requires ["nvim-lua/plenary.nvim"] - ; :event ["BufRead Cargo.toml"] - ; :opt false :config #((. (require "crates") :setup))}) + :Saecki/crates.nvim {:requires ["nvim-lua/plenary.nvim"] + :event ["BufRead Cargo.toml"] + :opt false :config #((. (require "crates") :setup))} - (abuse - use - :qnighy/lalrpop.vim {}) - - (abuse - use - :edwinb/idris2-vim {:ft ["idris2"]}) - ;:ShinKage/nvim-idris2 {} - (abuse - use - :vmchale/ats-vim {:ft ["ats" "dats" "sats"]}) - - (abuse - use - :google/vim-jsonnet {}) - - (abuse - use - :bakpakin/fennel.vim {}) - - (abuse - use - :evanleck/vim-svelte {}))) + :qnighy/lalrpop.vim {} + :edwinb/idris2-vim {:ft ["idris2"]} + :vmchale/ats-vim {:ft ["ats" "dats" "sats"]} + :google/vim-jsonnet {} + :bakpakin/fennel.vim {} + :evanleck/vim-svelte {}) ; >>> diff --git a/nvim/.config/nvim/fnl/dots/plugins/cmp.fnl b/nvim/.config/nvim/fnl/dots/plugins/cmp.fnl index 095fc3d..ff104ff 100644 --- a/nvim/.config/nvim/fnl/dots/plugins/cmp.fnl +++ b/nvim/.config/nvim/fnl/dots/plugins/cmp.fnl @@ -10,10 +10,9 @@ : (cmp.mapping.complete) : #(do (cmp.mapping.close) (vim.cmd "stopinsert")) : (cmp.mapping.confirm {:select true})} - :sources [{:name "nvim_lsp" - :priority 5} - {:name "vsnip" - :priority 3}] + :sources [{:name "nvim_lsp" :priority 5} + {:name "vsnip" :priority 3} + {:name "crates"}] ;{:name "buffer"}] :sorting {:comparators [#(do ;(print ($1:get_kind) $1.completion_item.label "--" ($2:get_kind) $2.completion_item.label)