-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy path.luacheckrc
More file actions
41 lines (35 loc) · 955 Bytes
/
.luacheckrc
File metadata and controls
41 lines (35 loc) · 955 Bytes
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
-- Luacheck configuration for Neovim
std = "luajit"
-- Global vim namespace
globals = {
"vim",
"describe", -- For tests
"it", -- For tests
"before_each", -- For tests
"after_each", -- For tests
"P", -- Global print function
"RELOAD", -- Global reload function
"R", -- Global require reload function
}
-- Ignore some common patterns
ignore = {
"211", -- Unused variable (common in snippet utility files)
"212", -- Unused argument
"213", -- Unused loop variable
"512", -- Loop is executed at most once (intentional early returns)
"631", -- Line is too long (we'll use stylua for formatting)
}
-- Exclude files/directories
exclude_files = {
"lua/snippets/**", -- Generated snippets
".luarocks/",
".lazy/",
}
-- Per-file type overrides
files["lua/plugins/*.lua"] = {
globals = { "vim" }
}
files["lua/config/**/*.lua"] = {
globals = { "vim" }
}
-- Allow unused variables starting with underscore