-
-
Notifications
You must be signed in to change notification settings - Fork 331
Expand file tree
/
Copy pathbuiltin.lua
More file actions
75 lines (73 loc) · 1.74 KB
/
builtin.lua
File metadata and controls
75 lines (73 loc) · 1.74 KB
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
local shebang_prefixes = { '/usr/bin/', '/bin/', '/usr/bin/env ', '/bin/env ' }
local shebang_fts = {
['fish'] = 'fish',
['perl'] = 'perl',
['python'] = 'python',
['python2'] = 'python',
['python3'] = 'python',
['bash'] = 'sh',
['sh'] = 'sh',
['zsh'] = 'zsh',
}
---@type table<string, string>
local shebang = {}
for _, prefix in ipairs(shebang_prefixes) do
for k, v in pairs(shebang_fts) do
shebang[prefix .. k] = v
end
end
---@type PlenaryFiletypeTable
return {
extension = {
['_coffee'] = 'coffee',
['astro'] = 'astro',
['cairo'] = 'cairo',
['cts'] = 'typescript',
['cljd'] = 'clojure',
['coffee'] = 'coffee',
['dart'] = 'dart',
['erb'] = 'eruby',
['ex'] = 'elixir',
['exs'] = 'elixir',
['fish'] = 'fish',
['fnl'] = 'fennel',
['gd'] = 'gdscript',
['gql'] = 'graphql',
['gradle'] = 'groovy',
['graphql'] = 'graphql',
['hbs'] = 'handlebars',
['hdbs'] = 'handlebars',
['hlsl'] = 'hlsl',
['jai'] = 'jai',
['janet'] = 'janet',
['jl'] = 'julia',
['jsx'] = 'javascriptreact',
['kt'] = 'kotlin',
['mts'] = 'typescript',
['nix'] = 'nix',
['plist'] = 'xml',
['purs'] = 'purescript',
['r'] = 'r',
['res'] = 'rescript',
['resi'] = 'rescript',
['rkt'] = 'racket',
['svelte'] = 'svelte',
['swift'] = 'swift',
['tres'] = 'gdresource',
['tscn'] = 'gdresource',
['tsx'] = 'typescriptreact',
['smithy'] = [[smithy]],
['sol'] = 'solidity',
['dtsi'] = 'dts',
},
file_name = {
['cakefile'] = 'coffee',
['.babelrc'] = 'json',
['.clangd'] = 'yaml',
['.eslintrc'] = 'json',
['.firebaserc'] = 'json',
['.prettierrc'] = 'json',
['.stylelintrc'] = 'json',
},
shebang = shebang
}