.config/nvim/lua/plugins/ui.lua

Mon, 03 Jun 2024 22:22:16 -0500

author
Meredith Howard <mhoward@roomag.org>
date
Mon, 03 Jun 2024 22:22:16 -0500
changeset 1174
753971334371
parent 1147
23f9b157fe8a
child 1175
7907b9c30399
permissions
-rw-r--r--

Switch neodev -> lazydev

1022
d509e282ae10 More nvim config
Meredith Howard <mhoward@roomag.org>
parents: 1015
diff changeset
1 local g = vim.g
d509e282ae10 More nvim config
Meredith Howard <mhoward@roomag.org>
parents: 1015
diff changeset
2
d509e282ae10 More nvim config
Meredith Howard <mhoward@roomag.org>
parents: 1015
diff changeset
3 -- >> Viewdoc
d509e282ae10 More nvim config
Meredith Howard <mhoward@roomag.org>
parents: 1015
diff changeset
4 g.no_viewdoc_abbrev = 1
d509e282ae10 More nvim config
Meredith Howard <mhoward@roomag.org>
parents: 1015
diff changeset
5 g.viewdoc_open = "topleft new"
d509e282ae10 More nvim config
Meredith Howard <mhoward@roomag.org>
parents: 1015
diff changeset
6 g.viewdoc_winwidth_max = 100
d509e282ae10 More nvim config
Meredith Howard <mhoward@roomag.org>
parents: 1015
diff changeset
7
1116
2d8f07b212e9 add neo-tree
Meredith Howard <mhoward@roomag.org>
parents: 1081
diff changeset
8 g.neo_tree_remove_legacy_commands = 1
2d8f07b212e9 add neo-tree
Meredith Howard <mhoward@roomag.org>
parents: 1081
diff changeset
9
1014
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
10 return {
1068
537a428597b5 tweak lazy loading
Meredith Howard <mhoward@roomag.org>
parents: 1064
diff changeset
11 { "powerman/vim-plugin-viewdoc", event = "VeryLazy" },
1022
d509e282ae10 More nvim config
Meredith Howard <mhoward@roomag.org>
parents: 1015
diff changeset
12
1014
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
13 {
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
14 "nvim-lualine/lualine.nvim",
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
15 opts = {
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
16 options = {
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
17 theme = "auto",
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
18 icons_enabled = false,
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
19 section_separators = "",
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
20 component_separators = "",
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
21 },
1045
456c039881a8 tweak status lines
Meredith Howard <mhoward@roomag.org>
parents: 1022
diff changeset
22 sections = {
1064
fcfa295076a8 Apply stylua
Meredith Howard <mhoward@roomag.org>
parents: 1045
diff changeset
23 lualine_a = { "mode" },
fcfa295076a8 Apply stylua
Meredith Howard <mhoward@roomag.org>
parents: 1045
diff changeset
24 lualine_b = { "filename" },
fcfa295076a8 Apply stylua
Meredith Howard <mhoward@roomag.org>
parents: 1045
diff changeset
25 lualine_c = { "diagnostics" },
fcfa295076a8 Apply stylua
Meredith Howard <mhoward@roomag.org>
parents: 1045
diff changeset
26 lualine_x = { "encoding", "fileformat" },
fcfa295076a8 Apply stylua
Meredith Howard <mhoward@roomag.org>
parents: 1045
diff changeset
27 lualine_y = { "filetype" },
fcfa295076a8 Apply stylua
Meredith Howard <mhoward@roomag.org>
parents: 1045
diff changeset
28 lualine_z = { "progress", "location" },
1045
456c039881a8 tweak status lines
Meredith Howard <mhoward@roomag.org>
parents: 1022
diff changeset
29 },
1014
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
30 tabline = {
1064
fcfa295076a8 Apply stylua
Meredith Howard <mhoward@roomag.org>
parents: 1045
diff changeset
31 lualine_a = { { "buffers", mode = 4, show_filename_only = false } },
fcfa295076a8 Apply stylua
Meredith Howard <mhoward@roomag.org>
parents: 1045
diff changeset
32 lualine_z = { "branch" },
1015
21950cadff6b Ongoing nvim config
Meredith Howard <mhoward@roomag.org>
parents: 1014
diff changeset
33 },
1064
fcfa295076a8 Apply stylua
Meredith Howard <mhoward@roomag.org>
parents: 1045
diff changeset
34 extensions = { "quickfix" },
fcfa295076a8 Apply stylua
Meredith Howard <mhoward@roomag.org>
parents: 1045
diff changeset
35 },
1014
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
36 },
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
37
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
38 {
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
39 "lukas-reineke/indent-blankline.nvim",
1130
91a00bcc28f9 Update for indent-blankline 3.x
Meredith Howard <mhoward@roomag.org>
parents: 1124
diff changeset
40 main = "ibl",
1014
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
41 keys = {
1130
91a00bcc28f9 Update for indent-blankline 3.x
Meredith Howard <mhoward@roomag.org>
parents: 1124
diff changeset
42 { "<leader>ig", "<cmd>IBLToggle<cr>" },
1014
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
43 },
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
44 opts = {
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
45 enabled = false,
1130
91a00bcc28f9 Update for indent-blankline 3.x
Meredith Howard <mhoward@roomag.org>
parents: 1124
diff changeset
46 indent = { char = "│" },
91a00bcc28f9 Update for indent-blankline 3.x
Meredith Howard <mhoward@roomag.org>
parents: 1124
diff changeset
47 whitespace = { remove_blankline_trail = true },
91a00bcc28f9 Update for indent-blankline 3.x
Meredith Howard <mhoward@roomag.org>
parents: 1124
diff changeset
48 scope = { enabled = false },
1014
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
49 },
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
50 },
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
51
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
52 {
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
53 "echasnovski/mini.indentscope",
1147
23f9b157fe8a Load indentscope even on new nameless bufs
Meredith Howard <mhoward@roomag.org>
parents: 1131
diff changeset
54 event = "VeryLazy",
1014
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
55 opts = {
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
56 symbol = "│",
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
57 options = { try_as_border = true },
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
58 draw = {
1064
fcfa295076a8 Apply stylua
Meredith Howard <mhoward@roomag.org>
parents: 1045
diff changeset
59 animation = function()
fcfa295076a8 Apply stylua
Meredith Howard <mhoward@roomag.org>
parents: 1045
diff changeset
60 return 2
fcfa295076a8 Apply stylua
Meredith Howard <mhoward@roomag.org>
parents: 1045
diff changeset
61 end,
1014
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
62 },
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
63 },
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
64 config = function(_, opts)
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
65 vim.api.nvim_create_autocmd("FileType", {
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
66 pattern = { "help", "alpha", "dashboard", "neo-tree", "Trouble", "lazy", "mason" },
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
67 callback = function()
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
68 vim.b.miniindentscope_disable = true
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
69 end,
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
70 })
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
71 require("mini.indentscope").setup(opts)
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
72 end,
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
73 },
1116
2d8f07b212e9 add neo-tree
Meredith Howard <mhoward@roomag.org>
parents: 1081
diff changeset
74 {
2d8f07b212e9 add neo-tree
Meredith Howard <mhoward@roomag.org>
parents: 1081
diff changeset
75 "nvim-neo-tree/neo-tree.nvim",
1124
cb981f8aba50 neotree v3.x
Meredith Howard <mhoward@roomag.org>
parents: 1116
diff changeset
76 branch = "v3.x",
1116
2d8f07b212e9 add neo-tree
Meredith Howard <mhoward@roomag.org>
parents: 1081
diff changeset
77 cmd = "Neotree",
2d8f07b212e9 add neo-tree
Meredith Howard <mhoward@roomag.org>
parents: 1081
diff changeset
78 dependencies = {
2d8f07b212e9 add neo-tree
Meredith Howard <mhoward@roomag.org>
parents: 1081
diff changeset
79 "nvim-lua/plenary.nvim",
2d8f07b212e9 add neo-tree
Meredith Howard <mhoward@roomag.org>
parents: 1081
diff changeset
80 "MunifTanjim/nui.nvim",
2d8f07b212e9 add neo-tree
Meredith Howard <mhoward@roomag.org>
parents: 1081
diff changeset
81 {
2d8f07b212e9 add neo-tree
Meredith Howard <mhoward@roomag.org>
parents: 1081
diff changeset
82 "s1n7ax/nvim-window-picker",
2d8f07b212e9 add neo-tree
Meredith Howard <mhoward@roomag.org>
parents: 1081
diff changeset
83 config = function(_, _)
2d8f07b212e9 add neo-tree
Meredith Howard <mhoward@roomag.org>
parents: 1081
diff changeset
84 local theme = require("kanagawa.colors").setup().theme
2d8f07b212e9 add neo-tree
Meredith Howard <mhoward@roomag.org>
parents: 1081
diff changeset
85 require("window-picker").setup({
2d8f07b212e9 add neo-tree
Meredith Howard <mhoward@roomag.org>
parents: 1081
diff changeset
86 use_winbar = "always",
2d8f07b212e9 add neo-tree
Meredith Howard <mhoward@roomag.org>
parents: 1081
diff changeset
87 fg_color = theme.ui.fg_reverse,
2d8f07b212e9 add neo-tree
Meredith Howard <mhoward@roomag.org>
parents: 1081
diff changeset
88 current_win_hl_color = theme.syn.constant,
2d8f07b212e9 add neo-tree
Meredith Howard <mhoward@roomag.org>
parents: 1081
diff changeset
89 other_win_hl_color = theme.syn.fun,
2d8f07b212e9 add neo-tree
Meredith Howard <mhoward@roomag.org>
parents: 1081
diff changeset
90 })
2d8f07b212e9 add neo-tree
Meredith Howard <mhoward@roomag.org>
parents: 1081
diff changeset
91 end,
2d8f07b212e9 add neo-tree
Meredith Howard <mhoward@roomag.org>
parents: 1081
diff changeset
92 },
2d8f07b212e9 add neo-tree
Meredith Howard <mhoward@roomag.org>
parents: 1081
diff changeset
93 },
2d8f07b212e9 add neo-tree
Meredith Howard <mhoward@roomag.org>
parents: 1081
diff changeset
94 opts = {
2d8f07b212e9 add neo-tree
Meredith Howard <mhoward@roomag.org>
parents: 1081
diff changeset
95 enable_git_status = false,
2d8f07b212e9 add neo-tree
Meredith Howard <mhoward@roomag.org>
parents: 1081
diff changeset
96 window = { mappings = { ["<F2>"] = "close_window" } },
2d8f07b212e9 add neo-tree
Meredith Howard <mhoward@roomag.org>
parents: 1081
diff changeset
97 filesystem = { hijack_netrw_behavior = "disabled" },
2d8f07b212e9 add neo-tree
Meredith Howard <mhoward@roomag.org>
parents: 1081
diff changeset
98 default_component_configs = {
2d8f07b212e9 add neo-tree
Meredith Howard <mhoward@roomag.org>
parents: 1081
diff changeset
99 icon = {
2d8f07b212e9 add neo-tree
Meredith Howard <mhoward@roomag.org>
parents: 1081
diff changeset
100 folder_closed = "▷",
2d8f07b212e9 add neo-tree
Meredith Howard <mhoward@roomag.org>
parents: 1081
diff changeset
101 folder_open = "▽",
2d8f07b212e9 add neo-tree
Meredith Howard <mhoward@roomag.org>
parents: 1081
diff changeset
102 folder_empty = "¤",
2d8f07b212e9 add neo-tree
Meredith Howard <mhoward@roomag.org>
parents: 1081
diff changeset
103 default = "•",
2d8f07b212e9 add neo-tree
Meredith Howard <mhoward@roomag.org>
parents: 1081
diff changeset
104 },
2d8f07b212e9 add neo-tree
Meredith Howard <mhoward@roomag.org>
parents: 1081
diff changeset
105 },
2d8f07b212e9 add neo-tree
Meredith Howard <mhoward@roomag.org>
parents: 1081
diff changeset
106 },
2d8f07b212e9 add neo-tree
Meredith Howard <mhoward@roomag.org>
parents: 1081
diff changeset
107 },
1014
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
108 }

mercurial