]> git.rmz.io Git - dotfiles.git/blob - nvim/lua/plugins/ui.lua
nvim/ui: send long messages to split
[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,
22 long_message_to_split = true,
23 },
24 cmdline = {
25 view = "cmdline",
26 },
27 routes = {
28 { -- send file written messages to mini
29 filter = {
30 event = "msg_show",
31 kind = "",
32 find = "%[w%]",
33 },
34 opts = { skip = true },
35 },
36 },
37 },
38 config = function(_, opts)
39 -- ensure [w] is written to msg_show so we can match it
40 vim.opt.shortmess:append("w")
41 vim.opt.shortmess:remove("W")
42
43 require("noice").setup(opts)
44 end,
45 },
46 {
47 "lualine.nvim",
48 --TODO: Things that were in vim but are missing
49 -- - git line add/mod/del ar next to branch name rather on right
50 -- - one status line per splits
51 -- - maybe a single one is OK too?
52 -- - I think I want a line stating wihch file is in the split though
53 -- - unix/dos eof markers
54 -- - really I only want to know if it's not unix
55 -- - filetype in text form. It's quite important to glance this quickly
56 },
57 {
58 "indent-blankline.nvim",
59 },
60 {
61 "mini.indentscope",
62 opts = {
63 draw = {
64 animation = require("mini.indentscope").gen_animation.linear({ duration = 10 }),
65 },
66 },
67 },
68 {
69 "alpha-nvim",
70 opts = function()
71 local dashboard = require("alpha.themes.dashboard")
72 local logo = [[
73 ██╗ █████╗ ███████╗██╗ ██╗██╗ ██╗██╗███╗ ███╗ Z
74 ██║ ██╔══██╗╚══███╔╝╚██╗ ██╔╝██║ ██║██║████╗ ████║ Z
75 ██║ ███████║ ███╔╝ ╚████╔╝ ██║ ██║██║██╔████╔██║ z
76 ██║ ██╔══██║ ███╔╝ ╚██╔╝ ╚██╗ ██╔╝██║██║╚██╔╝██║ z
77 ███████╗██║ ██║███████╗ ██║ ╚████╔╝ ██║██║ ╚═╝ ██║
78 ╚══════╝╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═══╝ ╚═╝╚═╝ ╚═╝
79 ]]
80
81 dashboard.section.header.val = vim.split(logo, "\n")
82 dashboard.section.buttons.val = {
83 dashboard.button("f", " " .. " Find file", ":Telescope find_files <CR>"),
84 dashboard.button("n", " " .. " New file", ":ene <BAR> startinsert <CR>"),
85 dashboard.button("r", " " .. " Recent files", ":Telescope oldfiles <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 }