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

Mon, 26 Jun 2023 14:11:01 -0500

author
Meredith Howard <mhoward@roomag.org>
date
Mon, 26 Jun 2023 14:11:01 -0500
changeset 1122
8a56361b077f
parent 1116
2d8f07b212e9
child 1124
cb981f8aba50
permissions
-rw-r--r--

Replace nvim_lsp_signature_help with lsp_signature.nvim

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",
1081
59e05e03851d unlazy indent-blankline.nvim, weird errors
Meredith Howard <mhoward@roomag.org>
parents: 1068
diff changeset
40 lazy = false,
1014
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
41 keys = {
1064
fcfa295076a8 Apply stylua
Meredith Howard <mhoward@roomag.org>
parents: 1045
diff changeset
42 { "<leader>ig", "<cmd>IndentBlanklineToggle<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,
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
46 char = "│",
1022
d509e282ae10 More nvim config
Meredith Howard <mhoward@roomag.org>
parents: 1015
diff changeset
47 -- filetype_exclude = { "help", "alpha", "dashboard", "neo-tree", "Trouble", "lazy" },
1014
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
48 show_trailing_blankline_indent = false,
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
49 show_current_context = false,
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 {
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
54 "echasnovski/mini.indentscope",
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
55 version = false, -- wait till new 0.7.0 release to put it back on semver
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
56 event = "BufReadPre",
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
57 opts = {
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
58 symbol = "│",
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
59 -- symbol = "▏",
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
60 options = { try_as_border = true },
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
61 draw = {
1064
fcfa295076a8 Apply stylua
Meredith Howard <mhoward@roomag.org>
parents: 1045
diff changeset
62 animation = function()
fcfa295076a8 Apply stylua
Meredith Howard <mhoward@roomag.org>
parents: 1045
diff changeset
63 return 2
fcfa295076a8 Apply stylua
Meredith Howard <mhoward@roomag.org>
parents: 1045
diff changeset
64 end,
1014
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
65 },
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
66 },
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
67 config = function(_, opts)
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
68 vim.api.nvim_create_autocmd("FileType", {
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
69 pattern = { "help", "alpha", "dashboard", "neo-tree", "Trouble", "lazy", "mason" },
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
70 callback = function()
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
71 vim.b.miniindentscope_disable = true
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 })
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
74 require("mini.indentscope").setup(opts)
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
75 end,
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
76 },
1116
2d8f07b212e9 add neo-tree
Meredith Howard <mhoward@roomag.org>
parents: 1081
diff changeset
77 {
2d8f07b212e9 add neo-tree
Meredith Howard <mhoward@roomag.org>
parents: 1081
diff changeset
78 "nvim-neo-tree/neo-tree.nvim",
2d8f07b212e9 add neo-tree
Meredith Howard <mhoward@roomag.org>
parents: 1081
diff changeset
79 branch = "v2.x",
2d8f07b212e9 add neo-tree
Meredith Howard <mhoward@roomag.org>
parents: 1081
diff changeset
80 cmd = "Neotree",
2d8f07b212e9 add neo-tree
Meredith Howard <mhoward@roomag.org>
parents: 1081
diff changeset
81 dependencies = {
2d8f07b212e9 add neo-tree
Meredith Howard <mhoward@roomag.org>
parents: 1081
diff changeset
82 "nvim-lua/plenary.nvim",
2d8f07b212e9 add neo-tree
Meredith Howard <mhoward@roomag.org>
parents: 1081
diff changeset
83 "MunifTanjim/nui.nvim",
2d8f07b212e9 add neo-tree
Meredith Howard <mhoward@roomag.org>
parents: 1081
diff changeset
84 {
2d8f07b212e9 add neo-tree
Meredith Howard <mhoward@roomag.org>
parents: 1081
diff changeset
85 "s1n7ax/nvim-window-picker",
2d8f07b212e9 add neo-tree
Meredith Howard <mhoward@roomag.org>
parents: 1081
diff changeset
86 config = function(_, _)
2d8f07b212e9 add neo-tree
Meredith Howard <mhoward@roomag.org>
parents: 1081
diff changeset
87 local theme = require("kanagawa.colors").setup().theme
2d8f07b212e9 add neo-tree
Meredith Howard <mhoward@roomag.org>
parents: 1081
diff changeset
88 require("window-picker").setup({
2d8f07b212e9 add neo-tree
Meredith Howard <mhoward@roomag.org>
parents: 1081
diff changeset
89 use_winbar = "always",
2d8f07b212e9 add neo-tree
Meredith Howard <mhoward@roomag.org>
parents: 1081
diff changeset
90 fg_color = theme.ui.fg_reverse,
2d8f07b212e9 add neo-tree
Meredith Howard <mhoward@roomag.org>
parents: 1081
diff changeset
91 current_win_hl_color = theme.syn.constant,
2d8f07b212e9 add neo-tree
Meredith Howard <mhoward@roomag.org>
parents: 1081
diff changeset
92 other_win_hl_color = theme.syn.fun,
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 end,
2d8f07b212e9 add neo-tree
Meredith Howard <mhoward@roomag.org>
parents: 1081
diff changeset
95 },
2d8f07b212e9 add neo-tree
Meredith Howard <mhoward@roomag.org>
parents: 1081
diff changeset
96 },
2d8f07b212e9 add neo-tree
Meredith Howard <mhoward@roomag.org>
parents: 1081
diff changeset
97 opts = {
2d8f07b212e9 add neo-tree
Meredith Howard <mhoward@roomag.org>
parents: 1081
diff changeset
98 enable_git_status = false,
2d8f07b212e9 add neo-tree
Meredith Howard <mhoward@roomag.org>
parents: 1081
diff changeset
99 window = { mappings = { ["<F2>"] = "close_window" } },
2d8f07b212e9 add neo-tree
Meredith Howard <mhoward@roomag.org>
parents: 1081
diff changeset
100 filesystem = { hijack_netrw_behavior = "disabled" },
2d8f07b212e9 add neo-tree
Meredith Howard <mhoward@roomag.org>
parents: 1081
diff changeset
101 default_component_configs = {
2d8f07b212e9 add neo-tree
Meredith Howard <mhoward@roomag.org>
parents: 1081
diff changeset
102 icon = {
2d8f07b212e9 add neo-tree
Meredith Howard <mhoward@roomag.org>
parents: 1081
diff changeset
103 folder_closed = "▷",
2d8f07b212e9 add neo-tree
Meredith Howard <mhoward@roomag.org>
parents: 1081
diff changeset
104 folder_open = "▽",
2d8f07b212e9 add neo-tree
Meredith Howard <mhoward@roomag.org>
parents: 1081
diff changeset
105 folder_empty = "¤",
2d8f07b212e9 add neo-tree
Meredith Howard <mhoward@roomag.org>
parents: 1081
diff changeset
106 default = "•",
2d8f07b212e9 add neo-tree
Meredith Howard <mhoward@roomag.org>
parents: 1081
diff changeset
107 },
2d8f07b212e9 add neo-tree
Meredith Howard <mhoward@roomag.org>
parents: 1081
diff changeset
108 },
2d8f07b212e9 add neo-tree
Meredith Howard <mhoward@roomag.org>
parents: 1081
diff changeset
109 },
2d8f07b212e9 add neo-tree
Meredith Howard <mhoward@roomag.org>
parents: 1081
diff changeset
110 },
1014
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
111 }

mercurial