]> git.rmz.io Git - dotfiles.git/blob - nvim/lua/plugins/ui.lua
nvim: replace delimitmate with mini.pairs
[dotfiles.git] / nvim / lua / plugins / ui.lua
1 ---@type LazyPluginSpec
2 return {
3 {
4 "nvim-notify",
5 },
6 {
7 "bufferline.nvim",
8 ---@type BufferlineConfig
9 opts = {
10 options = {
11 always_show_bufferline = false,
12 },
13 },
14 },
15 {
16 "noice.nvim",
17 ---@type NoiceConfig
18 opts = {
19 presets = {
20 command_palette = false, -- don't position the cmdline and popupmenu together
21 lsp_doc_border = true, -- add a border to hover docs and signature help
22 },
23 cmdline = {
24 view = "cmdline",
25 },
26 routes = {
27 { -- send file written messages to mini
28 filter = {
29 event = "msg_show",
30 kind = "",
31 find = "%[w%]",
32 },
33 opts = { skip = true },
34 },
35 },
36 },
37 config = function(_, opts)
38 -- ensure [w] is written to msg_show so we can match it
39 vim.opt.shortmess:append("w")
40 vim.opt.shortmess:remove("W")
41
42 require("noice").setup(opts)
43 end,
44 },
45 {
46 "lualine.nvim",
47 --TODO: Things that were in vim but are missing
48 -- - git line add/mod/del ar next to branch name rather on right
49 -- - one status line per splits
50 -- - maybe a single one is OK too?
51 -- - I think I want a line stating wihch file is in the split though
52 -- - unix/dos eof markers
53 -- - really I only want to know if it's not unix
54 -- - filetype in text form. It's quite important to glance this quickly
55 },
56 {
57 "indent-blankline.nvim",
58 },
59 {
60 "mini.indentscope",
61 opts = {
62 draw = {
63 animation = require("mini.indentscope").gen_animation.linear({ duration = 10 }),
64 },
65 },
66 },
67 {
68 "alpha-nvim",
69 opts = function()
70 local dashboard = require("alpha.themes.dashboard")
71 local logo = [[
72 ██╗ █████╗ ███████╗██╗ ██╗██╗ ██╗██╗███╗ ███╗ Z
73 ██║ ██╔══██╗╚══███╔╝╚██╗ ██╔╝██║ ██║██║████╗ ████║ Z
74 ██║ ███████║ ███╔╝ ╚████╔╝ ██║ ██║██║██╔████╔██║ z
75 ██║ ██╔══██║ ███╔╝ ╚██╔╝ ╚██╗ ██╔╝██║██║╚██╔╝██║ z
76 ███████╗██║ ██║███████╗ ██║ ╚████╔╝ ██║██║ ╚═╝ ██║
77 ╚══════╝╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═══╝ ╚═╝╚═╝ ╚═╝
78 ]]
79
80 dashboard.section.header.val = vim.split(logo, "\n")
81 dashboard.section.buttons.val = {
82 dashboard.button("f", " " .. " Find file", ":Telescope find_files <CR>"),
83 dashboard.button("n", " " .. " New file", ":ene <BAR> startinsert <CR>"),
84 dashboard.button("r", " " .. " Recent files", ":Telescope oldfiles <CR>"),
85 dashboard.button("g", " " .. " Find text", ":Telescope live_grep <CR>"),
86 dashboard.button("c", " " .. " Config", ":e $MYVIMRC <CR>"),
87 dashboard.button("s", " " .. " Restore Session", [[:lua require("persistence").load() <cr>]]),
88 dashboard.button("l", "󰒲 " .. " Lazy", ":Lazy<CR>"),
89 dashboard.button("q", " " .. " Close", ":bdelete<CR>"),
90 }
91 for _, button in ipairs(dashboard.section.buttons.val) do
92 button.opts.hl = "AlphaButtons"
93 button.opts.hl_shortcut = "AlphaShortcut"
94 end
95 dashboard.section.footer.opts.hl = "Type"
96 dashboard.section.header.opts.hl = "AlphaHeader"
97 dashboard.section.buttons.opts.hl = "AlphaButtons"
98 dashboard.opts.layout[1].val = 8
99 return dashboard
100 end,
101 },
102 {
103 "nvim-navic",
104 },
105 {
106 "nvim-web-devicons",
107 },
108 {
109 "nui.nvim",
110 },
111 }