Sat, 18 May 2024 10:56:07 -0500
simplify nvim-cmp setup
1022 | 1 | local g = vim.g |
2 | ||
3 | -- >> Undotree | |
4 | g.undotree_SplitWidth = 45 | |
5 | g.undotree_SetFocusWhenToggle = 1 | |
6 | g.undotree_ShortIndicators = 1 | |
7 | g.undotree_DiffCommand = "diff -dp -U 1" | |
8 | ||
9 | -- >> Tagbar | |
10 | g.tagbar_autoclose = 1 | |
11 | g.tagbar_autofocus = 1 | |
12 | g.tagbar_compact = 1 | |
13 | g.tagbar_width = 30 | |
14 | ||
1034
d412eecafebf
Add + configure interestingwords
Meredith Howard <mhoward@roomag.org>
parents:
1031
diff
changeset
|
15 | -- >> interestingwords |
d412eecafebf
Add + configure interestingwords
Meredith Howard <mhoward@roomag.org>
parents:
1031
diff
changeset
|
16 | -- These are jellybeans colors and some complements |
d412eecafebf
Add + configure interestingwords
Meredith Howard <mhoward@roomag.org>
parents:
1031
diff
changeset
|
17 | g.interestingWordsGUIColors = { |
1064 | 18 | "#C4A258", |
19 | "#6AADA0", | |
20 | "#71B9F8", | |
21 | "#A037B0", | |
22 | "#CF6A4C", | |
23 | "#D8AD4C", | |
1034
d412eecafebf
Add + configure interestingwords
Meredith Howard <mhoward@roomag.org>
parents:
1031
diff
changeset
|
24 | } |
d412eecafebf
Add + configure interestingwords
Meredith Howard <mhoward@roomag.org>
parents:
1031
diff
changeset
|
25 | g.interestingWordsTermColors = { |
1064 | 26 | "179", |
27 | "73", | |
28 | "75", | |
29 | "133", | |
30 | "167", | |
31 | "136", | |
1034
d412eecafebf
Add + configure interestingwords
Meredith Howard <mhoward@roomag.org>
parents:
1031
diff
changeset
|
32 | } |
d412eecafebf
Add + configure interestingwords
Meredith Howard <mhoward@roomag.org>
parents:
1031
diff
changeset
|
33 | |
1014 | 34 | return { |
1020
b1b644e9825d
Add more plain vim plugins
Meredith Howard <mhoward@roomag.org>
parents:
1014
diff
changeset
|
35 | "tpope/vim-unimpaired", |
b1b644e9825d
Add more plain vim plugins
Meredith Howard <mhoward@roomag.org>
parents:
1014
diff
changeset
|
36 | "tomtom/tcomment_vim", |
1126
fe77c5eed375
Add autopairs with cr-only behavior, switch to treesitter-endwise
Meredith Howard <mhoward@roomag.org>
parents:
1101
diff
changeset
|
37 | |
fe77c5eed375
Add autopairs with cr-only behavior, switch to treesitter-endwise
Meredith Howard <mhoward@roomag.org>
parents:
1101
diff
changeset
|
38 | { |
fe77c5eed375
Add autopairs with cr-only behavior, switch to treesitter-endwise
Meredith Howard <mhoward@roomag.org>
parents:
1101
diff
changeset
|
39 | "windwp/nvim-autopairs", |
fe77c5eed375
Add autopairs with cr-only behavior, switch to treesitter-endwise
Meredith Howard <mhoward@roomag.org>
parents:
1101
diff
changeset
|
40 | event = { "InsertEnter" }, |
fe77c5eed375
Add autopairs with cr-only behavior, switch to treesitter-endwise
Meredith Howard <mhoward@roomag.org>
parents:
1101
diff
changeset
|
41 | config = function (_, _) |
fe77c5eed375
Add autopairs with cr-only behavior, switch to treesitter-endwise
Meredith Howard <mhoward@roomag.org>
parents:
1101
diff
changeset
|
42 | local npairs = require("nvim-autopairs") |
fe77c5eed375
Add autopairs with cr-only behavior, switch to treesitter-endwise
Meredith Howard <mhoward@roomag.org>
parents:
1101
diff
changeset
|
43 | npairs.setup({}) |
fe77c5eed375
Add autopairs with cr-only behavior, switch to treesitter-endwise
Meredith Howard <mhoward@roomag.org>
parents:
1101
diff
changeset
|
44 | local Rule = require("nvim-autopairs.rule") |
fe77c5eed375
Add autopairs with cr-only behavior, switch to treesitter-endwise
Meredith Howard <mhoward@roomag.org>
parents:
1101
diff
changeset
|
45 | |
fe77c5eed375
Add autopairs with cr-only behavior, switch to treesitter-endwise
Meredith Howard <mhoward@roomag.org>
parents:
1101
diff
changeset
|
46 | -- Only run autopairs for opening a multiline block |
fe77c5eed375
Add autopairs with cr-only behavior, switch to treesitter-endwise
Meredith Howard <mhoward@roomag.org>
parents:
1101
diff
changeset
|
47 | npairs.clear_rules() |
fe77c5eed375
Add autopairs with cr-only behavior, switch to treesitter-endwise
Meredith Howard <mhoward@roomag.org>
parents:
1101
diff
changeset
|
48 | for _,bracket in pairs { { '(', ')' }, { '[', ']' }, { '{', '}' } } do |
fe77c5eed375
Add autopairs with cr-only behavior, switch to treesitter-endwise
Meredith Howard <mhoward@roomag.org>
parents:
1101
diff
changeset
|
49 | npairs.add_rules { |
fe77c5eed375
Add autopairs with cr-only behavior, switch to treesitter-endwise
Meredith Howard <mhoward@roomag.org>
parents:
1101
diff
changeset
|
50 | Rule(bracket[1], bracket[2]) |
1141
00240c15eca5
only do autopairs bracket endwise at end of line
Meredith Howard <mhoward@roomag.org>
parents:
1131
diff
changeset
|
51 | :end_wise(function(opts) |
00240c15eca5
only do autopairs bracket endwise at end of line
Meredith Howard <mhoward@roomag.org>
parents:
1131
diff
changeset
|
52 | return opts.next_char == '' |
00240c15eca5
only do autopairs bracket endwise at end of line
Meredith Howard <mhoward@roomag.org>
parents:
1131
diff
changeset
|
53 | end) |
1126
fe77c5eed375
Add autopairs with cr-only behavior, switch to treesitter-endwise
Meredith Howard <mhoward@roomag.org>
parents:
1101
diff
changeset
|
54 | } |
fe77c5eed375
Add autopairs with cr-only behavior, switch to treesitter-endwise
Meredith Howard <mhoward@roomag.org>
parents:
1101
diff
changeset
|
55 | end |
fe77c5eed375
Add autopairs with cr-only behavior, switch to treesitter-endwise
Meredith Howard <mhoward@roomag.org>
parents:
1101
diff
changeset
|
56 | end, |
fe77c5eed375
Add autopairs with cr-only behavior, switch to treesitter-endwise
Meredith Howard <mhoward@roomag.org>
parents:
1101
diff
changeset
|
57 | }, |
fe77c5eed375
Add autopairs with cr-only behavior, switch to treesitter-endwise
Meredith Howard <mhoward@roomag.org>
parents:
1101
diff
changeset
|
58 | |
fe77c5eed375
Add autopairs with cr-only behavior, switch to treesitter-endwise
Meredith Howard <mhoward@roomag.org>
parents:
1101
diff
changeset
|
59 | -- "tpope/vim-endwise", |
fe77c5eed375
Add autopairs with cr-only behavior, switch to treesitter-endwise
Meredith Howard <mhoward@roomag.org>
parents:
1101
diff
changeset
|
60 | -- treesitter-endwise only applies if the parser is installed. do i want to |
fe77c5eed375
Add autopairs with cr-only behavior, switch to treesitter-endwise
Meredith Howard <mhoward@roomag.org>
parents:
1101
diff
changeset
|
61 | -- worry about a fallback? |
fe77c5eed375
Add autopairs with cr-only behavior, switch to treesitter-endwise
Meredith Howard <mhoward@roomag.org>
parents:
1101
diff
changeset
|
62 | |
1029
9265f8508e4c
Copy other ft and plugin settings
Meredith Howard <mhoward@roomag.org>
parents:
1022
diff
changeset
|
63 | "godlygeek/tabular", |
1064 | 64 | { "mbbill/undotree", cmd = "UndotreeToggle" }, |
1020
b1b644e9825d
Add more plain vim plugins
Meredith Howard <mhoward@roomag.org>
parents:
1014
diff
changeset
|
65 | |
1014 | 66 | "tpope/vim-vinegar", |
1131
f3044a1658fc
nvim: switch to preferring last symver tag / add exceptions
Meredith Howard <mhoward@roomag.org>
parents:
1126
diff
changeset
|
67 | { "lfv89/vim-interestingwords", branch = "master" }, |
1020
b1b644e9825d
Add more plain vim plugins
Meredith Howard <mhoward@roomag.org>
parents:
1014
diff
changeset
|
68 | "kshenoy/vim-signature", |
1064 | 69 | { "majutsushi/tagbar", cmd = "TagbarToggle" }, |
1031 | 70 | |
71 | { | |
72 | "RRethy/vim-illuminate", | |
1064 | 73 | event = { "BufReadPost", "BufNewFile" }, |
1031 | 74 | opts = { |
75 | delay = 250, | |
76 | large_file_cutoff = 15000, | |
77 | }, | |
78 | config = function(_, opts) | |
79 | require("illuminate").configure(opts) | |
80 | end, | |
81 | }, | |
1014 | 82 | } |