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 [...]
(local packer (require :packer)) (let [pkgs [...]]
(packer.startup (packer.startup
(fn [use] (fn [use]
(abuse (for [i 1 (a.count pkgs) 2]
use "/home/leon/coding/projects/nvim-gehzu" {}) (let [name (. pkgs i)
(abuse opts (. pkgs (+ i 1))]
use "/home/leon/coding/projects/yuck.vim" {}) (-?> (. opts :mod) (safe-require-plugin-config))
(abuse (use (a.assoc opts 1 name))))))))
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
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"]})
(abuse (use
use :lifepillar/vim-gruvbox8 {:opt false :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 {}
: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")}
:TimUntersberger/neogit {:opt false :config #(require "dots.plugins.neogit")
:cmd ["Neogit"]}
:lifepillar/vim-gruvbox8 {:opt false
:config :config
#(do (set vim.g.gruvbox_italics 0) #(do (set vim.g.gruvbox_italics 0)
(set vim.g.gruvbox_italicise_strings 0) (set vim.g.gruvbox_italicise_strings 0)
(set vim.g.gruvbox_filetype_hi_groups 1) (set vim.g.gruvbox_filetype_hi_groups 1)
(set vim.g.gruvbox_plugin_hi_groups 1) (set vim.g.gruvbox_plugin_hi_groups 1)
(vim.cmd "colorscheme gruvbox8") (vim.cmd "colorscheme gruvbox8")
((. (require :dots.utils) :highlight) :SignColumn {:bg (. (require :dots.colors) :dark0)}))}) ((. (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 :kyazdani42/nvim-web-devicons {}
use :nvim-treesitter/nvim-treesitter {:opt false :config #(require "dots.plugins.treesitter")
:nvim-treesitter/nvim-treesitter {:opt false :config #(require "dots.plugins.treesitter")
:event ["BufEnter"] :event ["BufEnter"]
:run ":TSUpdate"}) :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] :JoosepAlviste/nvim-ts-context-commentstring {:event ["BufEnter"]
;:event ["BufReadPost"] :requires [:nvim-treesitter/nvim-treesitter]}
;:opt false :config #((. (require "nvim-biscuits") :setup) {})}
:nvim-treesitter/playground {:event ["BufEnter"]
:requires [:nvim-treesitter/nvim-treesitter]}
:jiangmiao/auto-pairs {}
:folke/which-key.nvim {}
(abuse :Olical/aniseed {:branch "develop"}
use :jiangmiao/auto-pairs {})
(abuse :norcalli/nvim.lua {}
use :folke/which-key.nvim {})
; json query stuff :Famiu/feline.nvim {:opt false :config #(require "dots.plugins.feline")}
;:gennaro-tedesco/nvim-jqx {:ft ["json"]} :akinsho/nvim-bufferline.lua {:opt false :config #(require "dots.plugins.bufferline")}
(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 {})
(abuse
use :Famiu/feline.nvim {:opt false :config #(require "dots.plugins.feline")})
;config #(require "dots.plugins.feline")}
(abuse
use :akinsho/nvim-bufferline.lua {:opt false :config #(require "dots.plugins.bufferline")})
;:romgrk/barbar.nvim {:opt false :config #(require "dots.plugins.barbar")}
(abuse
use
:sindrets/diffview.nvim {:cmd ["DiffviewOpen" "DiffviewToggleFiles"] :sindrets/diffview.nvim {:cmd ["DiffviewOpen" "DiffviewToggleFiles"]
:opt false :config #(require "dots.plugins.diffview")}) :opt false :config #(require "dots.plugins.diffview")}
(abuse
use :tweekmonster/startuptime.vim {:cmd ["StartupTime"]})
(abuse
use :tpope/vim-repeat {})
(abuse :tweekmonster/startuptime.vim {:cmd ["StartupTime"]}
use :lewis6991/gitsigns.nvim {:after ["vim-gruvbox8"]
:opt false :config #(require "dots.plugins.gitsigns")}) :tpope/vim-repeat {}
(abuse :lewis6991/gitsigns.nvim {:after ["vim-gruvbox8"]
use :tpope/vim-fugitive {}) :opt false :config #(require "dots.plugins.gitsigns")}
(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. :tpope/vim-fugitive {}
(abuse
use :tpope/vim-surround {}) :preservim/nerdcommenter {}
(abuse
use :nathanaelkane/vim-indent-guides {}) ; Can be toggled using <leader>ig (intent-guides) :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 <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. ; ( use :iamcco/markdown-preview.nvim {:run vim.fn.mkdp#util#install})
; (abuse 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")})
(abuse
use
:neovim/nvim-lspconfig {})
;:hrsh7th/nvim-compe {:opt false :config #(require "dots.plugins.compe")} :simrat39/symbols-outline.nvim {:opt false :config #(require "dots.plugins.symbols-outline")}
;:/home/leon/coding/prs/nvim-compe {:event [:InsertEnter]
;:opt false :config #(require "dots.plugins.compe")} :neovim/nvim-lspconfig {}
;: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
{:opt false
:requires [:hrsh7th/cmp-nvim-lsp :requires [:hrsh7th/cmp-nvim-lsp
:hrsh7th/cmp-buffer :hrsh7th/cmp-buffer
:hrsh7th/cmp-vsnip] :hrsh7th/cmp-vsnip]
:config #(require "dots.plugins.cmp")}) :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")}
(abuse :pangloss/vim-javascript {} ; syntax highlighting JS
use :ianks/vim-tsx {}
:tami5/compe-conjure {:requires [:Olical/conjure]}) :leafgarland/typescript-vim {}
:HerringtonDarkholme/yats.vim {} ; typescript syntax highlighting
(abuse :mxw/vim-jsx {}
use :mattn/emmet-vim {:opt false :config #(require "dots.plugins.emmet")}
:ciaranm/detectindent {:opt false :config #(require "dots.plugins.detect-indent")}) :purescript-contrib/purescript-vim {}
(abuse :derekelkins/agda-vim {:ft ["agda"]}
use :pechorin/any-jump.vim {}) :neovimhaskell/haskell-vim { :ft ["haskell"]}
(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"] :rust-lang/rust.vim {:ft ["rust"]
:requires ["mattn/webapi-vim"] :requires ["mattn/webapi-vim"]
:opt false :config #(do (set vim.g.rustfmt_fail_silently 1))}) :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)