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

Thu, 02 Mar 2023 21:15:29 -0600

author
Meredith Howard <mhoward@roomag.org>
date
Thu, 02 Mar 2023 21:15:29 -0600
changeset 1058
c8754b0414b9
parent 1045
456c039881a8
child 1064
fcfa295076a8
permissions
-rw-r--r--

add bundled languages to avoid errors

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
1014
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
8 return {
1022
d509e282ae10 More nvim config
Meredith Howard <mhoward@roomag.org>
parents: 1015
diff changeset
9 "powerman/vim-plugin-viewdoc",
d509e282ae10 More nvim config
Meredith Howard <mhoward@roomag.org>
parents: 1015
diff changeset
10
1014
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
11 {
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
12 "nvim-lualine/lualine.nvim",
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
13 opts = {
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
14 options = {
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
15 theme = "auto",
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
16 icons_enabled = false,
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
17 section_separators = "",
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
18 component_separators = "",
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
19 },
1045
456c039881a8 tweak status lines
Meredith Howard <mhoward@roomag.org>
parents: 1022
diff changeset
20 sections = {
456c039881a8 tweak status lines
Meredith Howard <mhoward@roomag.org>
parents: 1022
diff changeset
21 lualine_a = {'mode'},
456c039881a8 tweak status lines
Meredith Howard <mhoward@roomag.org>
parents: 1022
diff changeset
22 lualine_b = {'filename'},
456c039881a8 tweak status lines
Meredith Howard <mhoward@roomag.org>
parents: 1022
diff changeset
23 lualine_c = {'diagnostics'},
456c039881a8 tweak status lines
Meredith Howard <mhoward@roomag.org>
parents: 1022
diff changeset
24 lualine_x = {'encoding', 'fileformat'},
456c039881a8 tweak status lines
Meredith Howard <mhoward@roomag.org>
parents: 1022
diff changeset
25 lualine_y = {'filetype'},
456c039881a8 tweak status lines
Meredith Howard <mhoward@roomag.org>
parents: 1022
diff changeset
26 lualine_z = {'progress', 'location'}
456c039881a8 tweak status lines
Meredith Howard <mhoward@roomag.org>
parents: 1022
diff changeset
27 },
1014
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
28 tabline = {
1045
456c039881a8 tweak status lines
Meredith Howard <mhoward@roomag.org>
parents: 1022
diff changeset
29 lualine_a = { {'buffers', mode = 4, show_filename_only = false} },
456c039881a8 tweak status lines
Meredith Howard <mhoward@roomag.org>
parents: 1022
diff changeset
30 lualine_z = { 'branch' },
1015
21950cadff6b Ongoing nvim config
Meredith Howard <mhoward@roomag.org>
parents: 1014
diff changeset
31 },
21950cadff6b Ongoing nvim config
Meredith Howard <mhoward@roomag.org>
parents: 1014
diff changeset
32 extensions = {"quickfix"},
1014
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
33 }
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
34 },
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
35
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 "lukas-reineke/indent-blankline.nvim",
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
38 event = "BufReadPost",
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
39 keys = {
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
40 {"<leader>ig", "<cmd>IndentBlanklineToggle<cr>"},
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
41 },
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
42 opts = {
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
43 enabled = false,
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
44 char = "│",
1022
d509e282ae10 More nvim config
Meredith Howard <mhoward@roomag.org>
parents: 1015
diff changeset
45 -- filetype_exclude = { "help", "alpha", "dashboard", "neo-tree", "Trouble", "lazy" },
1014
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
46 show_trailing_blankline_indent = false,
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
47 show_current_context = false,
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
48 },
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 "echasnovski/mini.indentscope",
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
53 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
54 event = "BufReadPre",
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 -- symbol = "▏",
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
58 options = { try_as_border = true },
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
59 draw = {
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
60 animation = function() return 2 end,
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
61 },
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 config = function(_, opts)
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
64 vim.api.nvim_create_autocmd("FileType", {
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
65 pattern = { "help", "alpha", "dashboard", "neo-tree", "Trouble", "lazy", "mason" },
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
66 callback = function()
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
67 vim.b.miniindentscope_disable = true
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
68 end,
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
69 })
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
70 require("mini.indentscope").setup(opts)
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
71 end,
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
72 },
b57969db48db start nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
73 }

mercurial