This repository has been archived on 2024-10-28. You can view files and clone it, but cannot push or open issues or pull requests.
nvim-config/fnl/plugin.fnl

234 lines
7.4 KiB
Plaintext
Raw Normal View History

2022-11-30 22:27:40 -08:00
;;; plugin.fnl - plugin configurations
(import-macros {: bind! : hook!
: use! : setup!
2023-08-16 11:22:03 -07:00
: module-call!
: module-fn! } :macros)
2022-11-30 22:27:40 -08:00
(fn [use]
;; Packer
(use! :wbthomason/packer.nvim)
;; tangerine.nvim (auto fennel compile)
(use! :udayvir-singh/tangerine.nvim)
2023-05-25 02:03:52 -07:00
;; hy syntax
(use! :hylang/vim-hy)
2023-07-28 00:59:41 -07:00
;; rainbow delimiters
(use! :HiPhish/rainbow-delimiters.nvim)
2022-11-30 22:27:40 -08:00
;; Treesitter
(use! :nvim-treesitter/nvim-treesitter
:config
(setup! :nvim-treesitter.configs
2023-02-07 20:16:58 -08:00
;:ensure_installed :all
;:sync_install false
;:auto_install true
:highlight { :enable true
:additional_vim_regex_highlighting false }
:indent { :enable true }))
2022-11-30 22:27:40 -08:00
;; nightfox.nvim (colorscheme)
(use! :EdenEast/nightfox.nvim
:after :nvim-treesitter
:config
(vim.cmd.colorscheme :carbonfox))
2022-11-30 22:27:40 -08:00
2023-02-08 01:24:34 -08:00
;; Arm asm syntax
(use! :https://git.zander.im/Zander671/arm-syntax-vim.git)
2022-11-30 22:27:40 -08:00
;; Devicons
(use! :kyazdani42/nvim-web-devicons)
;; lualine.nvim
(use! :nvim-lualine/lualine.nvim
:after [ :nightfox.nvim :nvim-web-devicons ]
:config
(setup! :lualine
:options { :section_separators ""
2023-08-16 11:22:03 -07:00
:component_separators "│" }))
2022-11-30 22:27:40 -08:00
;; bufferline.nvim
(use! :akinsho/bufferline.nvim
:after [ :nvim-web-devicons :nightfox.nvim ]
:config
(setup! :bufferline
:options {
:always_show_bufferline false
:mode :tabs
:numbers :buffer-id
:show_buffer_close_icons false
:show_close_icon false }))
2022-11-30 22:27:40 -08:00
2023-04-21 18:37:24 -07:00
(use! :nvim-lua/plenary.nvim
:opt true
:module :plenary)
2023-02-07 12:16:21 -08:00
;; telescope (a fuzzy finder)
(use! :nvim-telescope/telescope.nvim
2023-02-07 20:16:58 -08:00
:cmd :Telescope
:module :telescope
2023-04-21 18:37:24 -07:00
:requires [ { 1 :nvim-telescope/telescope-ui-select.nvim
2023-02-07 20:16:58 -08:00
:opt true }
{ 1 :nvim-telescope/telescope-fzf-native.nvim
:opt true
:run :make }]
:setup
2023-02-23 11:41:01 -08:00
(module-call! :plugin.telescope :setup)
2023-02-07 12:16:21 -08:00
:config
2023-02-23 11:41:01 -08:00
(module-call! :plugin.telescope :config))
2022-11-30 22:27:40 -08:00
2023-02-07 22:31:05 -08:00
;; Trouble
(use! :folke/trouble.nvim
:cmd [ :Trouble
:TroubleToggle
:TroubleClose
:TroubleRefresh ]
:config
(setup! :trouble))
2022-11-30 22:27:40 -08:00
;; Nvim surround
(use! :kylechui/nvim-surround
:config
(setup! :nvim-surround))
2022-11-30 22:27:40 -08:00
;; Leap
(use! :ggandor/leap.nvim
:after :nvim-treesitter
:config
((. (require :leap) :add_default_mappings))
(bind! :o :z "<plug>(leap-forward-to)")
(bind! :o :Z "<plug>(leap-backward-to)")
(vim.api.nvim_set_hl 0 :LeapBackdrop { :link :Comment }))
2022-11-30 22:27:40 -08:00
;; Leap spooky (remote operations)
(use! :ggandor/leap-spooky.nvim
:after :leap.nvim
:config
(setup! :leap-spooky))
2022-11-30 22:27:40 -08:00
;; Flit (leap for 'till' and 'forward' motions)
(use! :ggandor/flit.nvim
:after :leap.nvim
:config
(setup! :flit))
2022-11-30 22:27:40 -08:00
;; Comment.nvim
(use! :numToStr/Comment.nvim
2023-02-07 20:16:58 -08:00
:keys [ :gc :gb ]
:config
(setup! :Comment))
2022-11-30 22:27:40 -08:00
2022-12-07 03:39:47 -08:00
;; illuminate (same symbol highlight)
2022-11-30 22:27:40 -08:00
(use! :RRethy/vim-illuminate
:config
2023-02-07 22:31:05 -08:00
(module-call! :illuminate
:configure { :providers [
"lsp"
"treesitter"
"ragex" ]
:filetypes_denylist [
:Trouble
:markdown
:text
:gitconfig
:gitignore ]
:delay 0 })
(hook! :FileType :lua #(vim.api.nvim_set_hl 0
:IlluminatedWordText
{})))
2022-11-30 22:27:40 -08:00
;; Snippy
(use! :dcampos/nvim-snippy
:config
(let [map (require :snippy.mapping)]
(bind! [ :i :s ] :<tab> ((. map :next) :<tab>))
(bind! [ :i :s ] :<s-tab> (map.previous :<tab>))))
2022-11-30 22:27:40 -08:00
;; nvim-cmp (autocomplete)
(use! :hrsh7th/nvim-cmp
:requires [ :hrsh7th/cmp-buffer
:hrsh7th/cmp-path
:hrsh7th/cmp-cmdline
:hrsh7th/cmp-nvim-lsp
{ 1 :ray-x/cmp-treesitter
:after :nvim-cmp }
:dcampos/cmp-snippy ]
:config
(module-call! :plugin.cmp :configure))
2022-11-30 22:27:40 -08:00
2023-01-01 16:18:50 -08:00
;; does what the name says, lets you pick icons
2022-12-31 01:45:54 -08:00
(use! :ziontee113/icon-picker.nvim
2023-01-01 16:18:50 -08:00
:cmd [ :IconPickerNormal :IconPickerYank ]
:setup
(bind! :n :<leader>ci "<cmd>IconPickerNormal<cr>")
(bind! :n :<leader>cy "<cmd>IconPickerYank<cr>")
2022-12-31 01:45:54 -08:00
:config
2023-02-07 20:16:58 -08:00
(vim.cmd "PackerLoad telescope.nvim")
2022-12-31 01:45:54 -08:00
(setup! :icon-picker
2023-01-01 16:18:50 -08:00
:disable_legacy_commands true))
2022-12-31 01:45:54 -08:00
2023-02-05 15:54:06 -08:00
(use! :jbyuki/nabla.nvim
:module :nabla
:setup
(bind! :n :<leader>p #(module-call! :nabla :popup)))
2023-07-28 00:59:41 -07:00
; oil (file manager)
(use! :stevearc/oil.nvim
:config
(setup! :oil
:columns { :icon :permissions :size: :mtime }))
2022-12-09 00:23:02 -08:00
;; guess style from buffer
(use! :NMAC427/guess-indent.nvim
:config
(setup! :guess-indent :auto_cmd true))
2022-12-09 00:23:02 -08:00
2022-11-30 22:27:40 -08:00
;; lspconfig
(use! :neovim/nvim-lspconfig
2023-01-01 16:18:50 -08:00
:after :cmp-nvim-lsp
:config
(module-call! :plugin.lsp :configure))
2022-11-30 22:27:40 -08:00
;; nvim-jdtls
(use! :mfussenegger/nvim-jdtls
:config
(module-call! :plugin.jdtls :configure))
2022-11-30 22:27:40 -08:00
2023-08-16 11:22:03 -07:00
;; formatter.nvim
(use! :mhartington/formatter.nvim
:cmd [ :Format :FormatWrite ]
:setup
(bind! :n :<leader>o "<cmd>Format<cr>")
(bind! :v :<leader>o ":Format<cr>")
:config
(setup! :formatter
:logging true
:log_level _G.vim.log.levels.WARN
:filetype {
:c [ (module-fn! :formatter.filetypes.c :astyle) ]
:cpp [ (module-fn! :formatter.filetypes.cpp :astyle) ]
:cmake [
(module-fn! :formatter.filetypes.cmake :cmakeformat) ]
:java [ (fn [] {:exe :astyle
:stdin true
:args [ :--mode=java ]}) ]
:sh [ (module-fn! :formatter.filetypes.sh :shfmt) ]
:rust [ (module-fn! :formatter.filetypes.rust :rustfmt) ]
:tex [ (module-fn! :formatter.filetypes.latex :latexindent) ]
:python [ (module-fn! :formatter.filetypes.python :yapf) ]
:json [ (module-fn! :formatter.filetypes.json :prettier) ]
:html [ (module-fn! :formatter.filetypes.html :prettier) ]
:css [ (module-fn! :formatter.filetypes.css :prettier) ]
:javascript [ (module-fn! :formatter.filetypes.javascript :prettier) ]
:markdown [
(module-fn! :formatter.filetypes.markdown :prettier ) ]
:fennel [ (fn [] {:exe :fnlfmt
:stdin true
:args [ "-" ]})]}))
2022-11-30 22:27:40 -08:00
;; Sync all packages on first launch
(if _G.first_launch
(module-call! :packer :sync)))