-
Notifications
You must be signed in to change notification settings - Fork 176
/
Copy pathconfig.lua
45 lines (41 loc) · 1.13 KB
/
config.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
return {
-- stylua: ignore
blocked_filetypes = {
'sql', 'ruby', 'perl', 'lisp', 'scheme', 'clojure',
'prolog', 'vb', 'elixir', 'smalltalk', 'applescript'
},
per_filetype = {
-- languages with a space
haskell = { ' ', '' },
fsharp = { ' ', '' },
ocaml = { ' ', '' },
erlang = { ' ', '' },
tcl = { ' ', '' },
nix = { ' ', '' },
helm = { ' ', '' },
shell = { ' ', '' },
sh = { ' ', '' },
bash = { ' ', '' },
fish = { ' ', '' },
zsh = { ' ', '' },
powershell = { ' ', '' },
make = { ' ', '' },
-- languages with square brackets
wl = { '[', ']' },
wolfram = { '[', ']' },
mma = { '[', ']' },
mathematica = { '[', ']' },
context = { '[', ']' },
-- languages with curly brackets
tex = { '{', '}' },
plaintex = { '{', '}' },
},
exceptions = {
by_filetype = {
-- ignore `use` imports
rust = function(ctx) return ctx.line:find('^%s*use%s') == nil end,
-- ignore `from` and `import` statements
python = function(ctx) return ctx.line:find('^%s*import%s') == nil and ctx.line:find('^%s*from%s') == nil end,
},
},
}