Fix packer stuff

This commit is contained in:
elkowar 2021-10-08 14:20:26 +02:00
parent d9a92bb735
commit 67c77d5155
No known key found for this signature in database
GPG key ID: E321AD71B1D1F27F
2 changed files with 176 additions and 286 deletions

View file

@ -1,344 +1,235 @@
(module dots.plugins (module dots.plugins
{require {a aniseed.core} {autoload {a aniseed.core
packer packer}
require-macros [macros]}) require-macros [macros]})
(defn abuse [use stuff rest] (defn [use stuff rest]
(use (a.assoc rest 1 stuff))) (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)) (use
(packer.startup :elkowar/yuck.vim {}
(fn [use] :nvim-lua/plenary.nvim {}
(abuse :elkowar/antifennel-nvim {:opt false :config #(set vim.g.antifennel_executable "/home/leon/tmp/antifennel/antifennel")}
use "/home/leon/coding/projects/nvim-gehzu" {}) :elkowar/kmonad.vim {}
(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 {})
(abuse :ruanyl/vim-gh-line {}
use :ruanyl/vim-gh-line {}) :rhysd/conflict-marker.vim {}
(abuse :wellle/visual-split.vim {}
use :rhysd/conflict-marker.vim {}) :sindrets/diffview.nvim {}
(abuse :folke/persistence.nvim {:opt false :config #(require "dots.plugins.persistence")}
use :wellle/visual-split.vim {})
(abuse :folke/zen-mode.nvim {:cmd ["ZenMode"]
use :sindrets/diffview.nvim {}) :opt false :config #(require "dots.plugins.zen-mode")}
(abuse
use :folke/persistence.nvim {:opt false :config #(require "dots.plugins.persistence")}) :folke/twilight.nvim {:opt false :config #(require "dots.plugins.twilight")}
(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"]})
(abuse :TimUntersberger/neogit {:opt false :config #(require "dots.plugins.neogit")
use :lifepillar/vim-gruvbox8 {:opt false :cmd ["Neogit"]}
:config
#(do (set vim.g.gruvbox_italics 0)
(set vim.g.gruvbox_italicise_strings 0) :lifepillar/vim-gruvbox8 {:opt false
(set vim.g.gruvbox_filetype_hi_groups 1) :config
(set vim.g.gruvbox_plugin_hi_groups 1) #(do (set vim.g.gruvbox_italics 0)
(vim.cmd "colorscheme gruvbox8") (set vim.g.gruvbox_italicise_strings 0)
((. (require :dots.utils) :highlight) :SignColumn {:bg (. (require :dots.colors) :dark0)}))}) (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 :SignColumn {:bg (. (require :dots.colors) :dark0)}))}
;(req dots.utils.highlight :LspDiagnosticsUnderlineError {:gui "underline"}))} ;(req dots.utils.highlight :LspDiagnosticsUnderlineError {:gui "underline"}))}
(abuse
use :nvim-telescope/telescope.nvim {:opt false :config #(require "dots.plugins.telescope") :nvim-telescope/telescope.nvim {:opt false :config #(require "dots.plugins.telescope")
:cmd ["Telescope"] :cmd ["Telescope"]
:requires [:nvim-lua/popup.nvim :requires [:nvim-lua/popup.nvim
:nvim-lua/plenary.nvim]}) :nvim-lua/plenary.nvim]}
(abuse
use :nvim-telescope/telescope-packer.nvim {}) :nvim-telescope/telescope-packer.nvim {}
(abuse
use :nvim-telescope/telescope-frecency.nvim {:requires [:tami5/sql.nvim] :nvim-telescope/telescope-frecency.nvim {:requires [:tami5/sql.nvim]
:opt false}) :opt false}
;:opt false :config #((. (require :telescope) :load_extension) "frecency")} ;: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 :kyazdani42/nvim-web-devicons {}
(abuse
use :norcalli/nvim.lua {})
(abuse
use :Famiu/feline.nvim {:opt false :config #(require "dots.plugins.feline")}) :nvim-treesitter/nvim-treesitter {:opt false :config #(require "dots.plugins.treesitter")
;config #(require "dots.plugins.feline")} :event ["BufEnter"]
:run ":TSUpdate"}
(abuse
use :akinsho/nvim-bufferline.lua {:opt false :config #(require "dots.plugins.bufferline")}) :JoosepAlviste/nvim-ts-context-commentstring {:event ["BufEnter"]
;:romgrk/barbar.nvim {:opt false :config #(require "dots.plugins.barbar")} :requires [:nvim-treesitter/nvim-treesitter]}
:nvim-treesitter/playground {:event ["BufEnter"]
:requires [:nvim-treesitter/nvim-treesitter]}
:jiangmiao/auto-pairs {}
(abuse :folke/which-key.nvim {}
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 {})
(abuse :Olical/aniseed {:branch "develop"}
use :lewis6991/gitsigns.nvim {:after ["vim-gruvbox8"]
:opt false :config #(require "dots.plugins.gitsigns")}) :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 {}) :tpope/vim-fugitive {}
(abuse
use :preservim/nerdcommenter {}) :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. :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 {}) :tpope/vim-surround {}
(abuse
use :nathanaelkane/vim-indent-guides {}) ; Can be toggled using <leader>ig (intent-guides) :nathanaelkane/vim-indent-guides {} ; Can be toggled using <leader>ig (intent-guides)
; <C-n> to select current word. <C-n> to select next occurrence. ; <C-n> to select current word. <C-n> to select next occurrence.
; with multiple lines selected in Visual mode, <C-n> to insert cursor in each line. I not i to insert in Visual-mode. ; with multiple lines selected in Visual mode, <C-n> to insert cursor in each line. I not i to insert in Visual-mode.
(abuse :terryma/vim-multiple-cursors {}
use :terryma/vim-multiple-cursors {}) :mg979/vim-visual-multi {}
(abuse
use :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
(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 :wellle/targets.vim {} ; more text objects. IE: cin (change in next parens). generally better handling of surrounding objects.
(abuse
use :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
:rcarriga/nvim-dap-ui {:opt false :opt false :config #((. (require :dapui) :setup))
:opt false :config #((. (require :dapui) :setup)) ;:opt false :config #(req dapui.setup)
;:opt false :config #(req dapui.setup) :requires [:mfussenegger/nvim-dap]}
:requires [:mfussenegger/nvim-dap]})
(abuse
use :mfussenegger/nvim-dap {:opt false}) :mfussenegger/nvim-dap {:opt false}
;:opt false :config #(require "dots.plugins.nvim-dap")} ;:opt false :config #(require "dots.plugins.nvim-dap")}
(abuse
use :nvim-telescope/telescope-dap.nvim {:opt false
:nvim-telescope/telescope-dap.nvim {:opt false :requires [:mfussenegger/nvim-dap
:requires [:mfussenegger/nvim-dap :nvim-telescope/telescope.nvim]}
:nvim-telescope/telescope.nvim]})
; code-related ----------------------------------------- <<< ; code-related ----------------------------------------- <<<
(abuse
use :ray-x/lsp_signature.nvim {:events [:BufEnter]}) :ray-x/lsp_signature.nvim {:events [:BufEnter]}
(abuse
use "/home/leon/coding/prs/trouble.nvim" {:opt false :config #(require "dots.plugins.trouble")
"/home/leon/coding/prs/trouble.nvim" {:opt false :config #(require "dots.plugins.trouble") :cmd ["Trouble" "TroubleClose" "TroubleRefresh" "TroubleToggle"]}
:cmd ["Trouble" "TroubleClose" "TroubleRefresh" "TroubleToggle"]})
;:folke/lsp-trouble.nvim {:opt false :config #(require "dots.plugins.trouble") ;:folke/lsp-trouble.nvim {:opt false :config #(require "dots.plugins.trouble")
;:cmd ["Trouble" "TroubleClose" "TroubleRefresh" "TroubleToggle"]} ;:cmd ["Trouble" "TroubleClose" "TroubleRefresh" "TroubleToggle"]}
(abuse
use :simrat39/symbols-outline.nvim {:opt false :config #(require "dots.plugins.symbols-outline")}
:simrat39/symbols-outline.nvim {:opt false :config #(require "dots.plugins.symbols-outline")})
(abuse :neovim/nvim-lspconfig {}
use
: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") ;:ms-jpq/coq_nvim {:opt false :config #(require "dots.plugins.coq-nvim")
;:branch "coq" ;:branch "coq"
;:ms-jpq/coq.artifacts {:branch "artifacts"} ;:ms-jpq/coq.artifacts {:branch "artifacts"}
(abuse use :hrsh7th/vim-vsnip {}) :hrsh7th/vim-vsnip {}
(abuse use :hrsh7th/cmp-vsnip {}) :hrsh7th/cmp-vsnip {}
(abuse use :hrsh7th/cmp-nvim-lsp {}) :hrsh7th/cmp-nvim-lsp {}
(abuse use :hrsh7th/cmp-buffer {}) :hrsh7th/cmp-buffer {}
(abuse
use :hrsh7th/nvim-cmp {:opt false
:hrsh7th/nvim-cmp :requires [:hrsh7th/cmp-nvim-lsp
{:opt false :hrsh7th/cmp-buffer
:requires [:hrsh7th/cmp-nvim-lsp :hrsh7th/cmp-vsnip]
:hrsh7th/cmp-buffer :config #(require "dots.plugins.cmp")}
:hrsh7th/cmp-vsnip]
:config #(require "dots.plugins.cmp")})
(abuse
use :tami5/lspsaga.nvim {:after "vim-gruvbox8"
:tami5/lspsaga.nvim {:after "vim-gruvbox8" :opt false
:opt false :commit "373bc031b39730cbfe492533c3acfac36007899a"
:commit "373bc031b39730cbfe492533c3acfac36007899a" :config #(require "dots.plugins.lspsaga")}
: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 :bduggan/vim-raku {:ft ["raku"]}
use :LnL7/vim-nix {:ft ["nix"]}
:Olical/conjure {}) :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 :rust-lang/rust.vim {:ft ["rust"]
:tami5/compe-conjure {:requires [:Olical/conjure]}) :requires ["mattn/webapi-vim"]
:opt false :config #(do (set vim.g.rustfmt_fail_silently 1))}
(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))})
(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"]
; :Saecki/crates.nvim {:requires ["nvim-lua/plenary.nvim"] :event ["BufRead Cargo.toml"]
; :event ["BufRead Cargo.toml"] :opt false :config #((. (require "crates") :setup))}
; :opt false :config #((. (require "crates") :setup))})
(abuse :qnighy/lalrpop.vim {}
use :edwinb/idris2-vim {:ft ["idris2"]}
:qnighy/lalrpop.vim {}) :vmchale/ats-vim {:ft ["ats" "dats" "sats"]}
:google/vim-jsonnet {}
(abuse :bakpakin/fennel.vim {}
use :evanleck/vim-svelte {})
: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 {})))
; >>> ; >>>

View file

@ -10,10 +10,9 @@
:<C-space> (cmp.mapping.complete) :<C-space> (cmp.mapping.complete)
:<esc> #(do (cmp.mapping.close) (vim.cmd "stopinsert")) :<esc> #(do (cmp.mapping.close) (vim.cmd "stopinsert"))
:<CR> (cmp.mapping.confirm {:select true})} :<CR> (cmp.mapping.confirm {:select true})}
:sources [{:name "nvim_lsp" :sources [{:name "nvim_lsp" :priority 5}
:priority 5} {:name "vsnip" :priority 3}
{:name "vsnip" {:name "crates"}]
:priority 3}]
;{:name "buffer"}] ;{:name "buffer"}]
:sorting {:comparators [#(do :sorting {:comparators [#(do
;(print ($1:get_kind) $1.completion_item.label "--" ($2:get_kind) $2.completion_item.label) ;(print ($1:get_kind) $1.completion_item.label "--" ($2:get_kind) $2.completion_item.label)