aboutsummaryrefslogtreecommitdiff
path: root/env/.config/vis/plugins.lua
blob: 58ec327080eb75226d158371fe6ac4ad5114859b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
pcall(require,'plugins/vis-autoclose')

local color_ok,colorizer = pcall(require,'plugins/vis-colorizer')
if color_ok then
    colorizer.three = false
    colorizer.six   = true
end

pcall(require,'plugins/complete-filename')

local spell_ok, spellcheck = pcall(require,'plugins/vis-spellcheck')
if spell_ok then
    spellcheck.disable_syntax_awareness = true
    spellcheck.typo_style = "fore:black,back:red"
end

pcall(require,'plugins/vis-chain')

local lsp_ok,lsp = pcall(require,'plugins/vis-lspc')
if lsp_ok then
    lsp.ls_map.c.cmd = "clangd --fallback-style=webkit"
    lsp.ls_map.cpp.cmd = "clangd --fallback-style=webkit"
    lsp.ls_map.ansi_c.cmd = "clangd --fallback-style=webkit"

    lsp.ls_map.greyscript = {
        name = 'greyscript',
        cmd = '/bin/greybel-languageserver --stdio',
        formatting_options = {tabSize = 4, insertSpaces = true},
    }
end

-- https://git.symlinx.net/vis-modal/
local modal_ok,modal = pcall(require,'plugins/vis-modal')
if modal_ok then
    modal.MODES = {
        [vis.modes.NORMAL] = ' NORMAL ',
        [vis.modes.INSERT] = ' INSERT ',
        [vis.modes.VISUAL] = ' VISUAL ',
        [vis.modes.REPLACE] = ' REPLACE ',
        [vis.modes.VISUAL_LINE] = ' VISUAL_LINE ',
        [vis.modes.OPERATOR_PENDING] = ' OPERATOR_PENDING '
    }

    modal.STYLES = {
        [vis.modes.NORMAL] = {
            REGULAR = 'fore:default,back:yellow',
            INVERTED = 'fore:yellow,back:black',
        },
        [vis.modes.INSERT] = {
            REGULAR = 'fore:default,back:green',
            INVERTED = 'fore:green,back:black',
        },
        [vis.modes.VISUAL] = {
            REGULAR = 'fore:default,back:magenta',
            INVERTED = 'fore:magenta,back:black',
        },
        [vis.modes.REPLACE] = {
            REGULAR = 'fore:default,back:blue',
            INVERTED = 'fore:blue,back:black',
        },
        [vis.modes.VISUAL_LINE] = {
            REGULAR = 'fore:default,back:magenta',
            INVERTED = 'fore:magenta,back:black',
        },
        [vis.modes.OPERATOR_PENDING] = {
            REGULAR = 'fore:default,back:blue',
            INVERTED = 'fore:blue,back:black',
        },
    }
end