;;; plugin.fnl - plugin configurations (import-macros {: bind! : hook! : use! : setup! : module-call!} :macros) (fn [use] ;; Packer (use! :wbthomason/packer.nvim) ;; tangerine.nvim (auto fennel compile) (use! :udayvir-singh/tangerine.nvim) ;; Treesitter (use! :nvim-treesitter/nvim-treesitter :config (setup! :nvim-treesitter.configs ;:ensure_installed :all ;:sync_install false ;:auto_install true :highlight { :enable true :additional_vim_regex_highlighting false } :indent { :enable true })) ;; nightfox.nvim (colorscheme) (use! :EdenEast/nightfox.nvim :after :nvim-treesitter :config (vim.cmd.colorscheme :carbonfox)) ;; Arm asm syntax (use! :https://git.zander.im/Zander671/arm-syntax-vim.git) ;; 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 "" :component_separators "│" } ; :sections { :lualine_x [ ; { 1 #(.. "recording @" (vim.fn.reg_recording)) ; :cond #(not= (# (vim.fn.reg_recording)) 0) } ; :encoding ; :fileformat ; :filetype ]} )) ;; 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 })) (use! :nvim-lua/plenary.nvim :opt true :module :plenary) ;; telescope (a fuzzy finder) (use! :nvim-telescope/telescope.nvim :cmd :Telescope :module :telescope :requires [ { 1 :nvim-telescope/telescope-ui-select.nvim :opt true } { 1 :nvim-telescope/telescope-fzf-native.nvim :opt true :run :make }] :setup (module-call! :plugin.telescope :setup) :config (module-call! :plugin.telescope :config)) ;; Trouble (use! :folke/trouble.nvim :cmd [ :Trouble :TroubleToggle :TroubleClose :TroubleRefresh ] :config (setup! :trouble)) ;; Nvim surround (use! :kylechui/nvim-surround :config (setup! :nvim-surround)) ;; Leap (use! :ggandor/leap.nvim :after :nvim-treesitter :config ((. (require :leap) :add_default_mappings)) (bind! :o :z "(leap-forward-to)") (bind! :o :Z "(leap-backward-to)") (vim.api.nvim_set_hl 0 :LeapBackdrop { :link :Comment })) ;; Leap spooky (remote operations) (use! :ggandor/leap-spooky.nvim :after :leap.nvim :config (setup! :leap-spooky)) ;; Flit (leap for 'till' and 'forward' motions) (use! :ggandor/flit.nvim :after :leap.nvim :config (setup! :flit)) ;; Comment.nvim (use! :numToStr/Comment.nvim :keys [ :gc :gb ] :config (setup! :Comment)) ;; illuminate (same symbol highlight) (use! :RRethy/vim-illuminate :config (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 {}))) ;; Snippy (use! :dcampos/nvim-snippy :config (let [map (require :snippy.mapping)] (bind! [ :i :s ] : ((. map :next) :)) (bind! [ :i :s ] : (map.previous :)))) ;; 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)) ;; does what the name says, lets you pick icons (use! :ziontee113/icon-picker.nvim :cmd [ :IconPickerNormal :IconPickerYank ] :setup (bind! :n :ci "IconPickerNormal") (bind! :n :cy "IconPickerYank") :config (vim.cmd "PackerLoad telescope.nvim") (setup! :icon-picker :disable_legacy_commands true)) (use! :jbyuki/nabla.nvim :module :nabla :setup (bind! :n :p #(module-call! :nabla :popup))) ;; guess style from buffer (use! :NMAC427/guess-indent.nvim :config (setup! :guess-indent :auto_cmd true)) ;; lspconfig (use! :neovim/nvim-lspconfig :after :cmp-nvim-lsp :config (module-call! :plugin.lsp :configure)) (use! :jose-elias-alvarez/null-ls.nvim :after :nvim-lspconfig :config (module-call! :plugin.lsp :setup-null-ls)) (use! :j-hui/fidget.nvim :after :nvim-lspconfig :config (setup! :fidget)) ;; nvim-jdtls (use! :mfussenegger/nvim-jdtls :ft :java :after :nvim-lspconfig :config (module-call! :plugin.jdtls :configure)) ;; Sync all packages on first launch (if _G.first_launch (module-call! :packer :sync)))