-
Notifications
You must be signed in to change notification settings - Fork 0
/
default-conf.lua
100 lines (96 loc) · 2.62 KB
/
default-conf.lua
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
local M = {}
M.map = {
n = "tt", -- keymap for Normal mode
v = "tt", -- keymap for Visual mode
}
M.patterns = { -- mapping file extensions to patterns
hash = {
txt = "# ",
check = "^%s*#",
get = "#%s?",
},
double_dash = {
txt = "-- ",
check = "^%s*%-%-",
get = "%-%-%s?",
},
double_slash = {
txt = "// ",
check = "^%s*//",
get = "//%s?",
},
semi_colon = {
txt = ";; ",
check = "^%s*;;",
get = ";;%s?",
},
double_quote = {
txt = "\" ",
check = "^%s*\"",
get = "\"%s?",
},
paren_aster = {
txt = "(* ",
endl = " *)",
check = "^%s*%(%*",
get = "%(%*%s?",
gendl = "%s?%*%)",
},
slash_aster = {
txt = "/* ",
endl = " */",
check = "^%s*/%*",
get = "%/%*%s?",
gendl = "%s?%*/",
},
arrow = {
txt = "<!-- ",
endl = " -->",
check = "^%s*<!%-%-",
get = "<!%-%-%s?",
gendl = "%s?%-%->",
},
-- if "link" != nil then the table will be replaced by the one named in the value
-- ie, sh == hash, etc
-- #
sh = { link = "hash" }, -- Sh
bash = { link = "hash" }, -- Bash
py = { link = "hash" }, -- Python
jl = { link = "hash" }, -- Julia
nix = { link = "hash" }, -- Nix
s = { link = "hash" }, -- GAS
yml = { link = "hash" }, -- Yaml
yaml = { link = "hash" }, -- Yaml
toml = { link = "hash" }, -- Toml
-- --
lua = { link = "double_dash" }, -- Lua
hs = { link = "double_dash" }, -- Haskell
-- //
c = { link = "double_slash" }, -- C
h = { link = "double_slash" }, -- C/C++ header
cpp = { link = "double_slash" }, -- C++
cu = { link = "double_slash" }, -- C++
rs = { link = "double_slash" }, -- Uust
js = { link = "double_slash" }, -- Javascript
ts = { link = "double_slash" }, -- Typescript
java = { link = "double_slash" }, -- Java
go = { link = "double_slash" }, -- Go
proto = { link = "double_slash" }, -- Proto
-- ;
asm = { link = "semi_colon" }, -- Assembly
clj = { link = "semi_colon" }, -- Clojure
lisp = { link = "semi_colon" }, -- Common lisp
el = { link = "semi_colon" }, -- Emacs lisp
emacs = { link = "semi_colon" }, -- Emacs conf
scm = { link = "semi_colon" }, -- Scheme
-- "
vim = { link = "double_quote" }, -- Viml
-- (* ... *)
ml = { link = "paren_aster" }, -- Ocaml
-- /* ... */
css = { link = "slash_aster" }, -- Css
--
html = { link = "arrow" }, -- HTML
md = { link = "arrow" }, -- Markdown
}
return M