helm/home/profiles/nvim/config/fnl/conf/plugins.fnl
2024-08-26 23:17:11 -07:00

45 lines
2.1 KiB
Fennel

(local nvim (require :lib/nvim))
(local navic (require :nvim-navic))
(import-macros {: do-req } :lib/macros)
(let [lualine (require :lualine)]
(lualine.setup {:options {:theme "ayu"}
:sections {:lualine_c [:filename {1 navic.get_location
:cond navic.is_available}]
:lualine_y [(fn []
; TODO broken
(let [msg "No Active Lsp"
buf_ft (vim.api.nvim_buf_get_option 0 "filetype")
clients (vim.lsp.get_active_clients)]
(if (= (next clients) nil) msg)
(each [_ client (ipairs clients)]
(let [filetypes (. client :config :filetypes)]
(if (and filetypes (vim.fn.index filetypes buf_ft)) client.name)))
msg))]
:lualine_x [:filetype]}}))
(require :neo-tree)
(do-req :gitsigns :setup)
(do-req :marks :setup)
(do-req :mini.pairs :setup)
(do-req :mini.diff :setup)
(do-req :mini.ai :setup)
;TODO (do-req :mini.surround :setup)
(do-req :todo-comments :setup)
(do-req :ibl :setup)
(do-req :nvim-treesitter.configs :setup {:highlight {:enable true}
:textobjects {:enable true}
:indent {:enable true}})
(do-req :treesitter-context :setup {:max_lines 5})
(do-req :auto-session :setup {:log_level "info"
:auto_session_suppress_dirs ["~/"]})
(nvim.opt :sessionoptions "blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal")
(do-req :aerial :setup {:on_attach (fn [bufnr]
(do
(vim.keymap.set "n" "{" "<cmd>AerialPrev<CR>" { :buffer bufnr})
(vim.keymap.set "n" "}" "<cmd>AerialNext<CR>" { :buffer bufnr})))})