mirror of
https://github.com/neovim/neovim.git
synced 2024-12-23 12:45:17 -07:00
e5d7003b02
This will ensure that we can pass flags and make adjustments from the top level cmake file instead of digging through the cmake directory. More importantly, this will only format files that have been changed. This has a slightly higher initial cost compared to previous solution as all files must be initially formatted, but the gained speed up should more than make up for it quickly. `make formatlua` is always run due to a quirk of stylua of always changing modification time of the file regardless if there were any changes. This is not a major blocker as stylua is very fast.
53 lines
1.2 KiB
Lua
53 lines
1.2 KiB
Lua
-- vim: ft=lua tw=80
|
|
|
|
stds.nvim = {
|
|
read_globals = { "jit" }
|
|
}
|
|
std = "lua51+nvim"
|
|
|
|
-- Ignore W211 (unused variable) with preload files.
|
|
files["**/preload.lua"] = {ignore = { "211" }}
|
|
-- Allow vim module to modify itself, but only here.
|
|
files["src/nvim/lua/vim.lua"] = {ignore = { "122/vim" }}
|
|
|
|
-- Don't report unused self arguments of methods.
|
|
self = false
|
|
|
|
-- Rerun tests only if their modification time changed.
|
|
cache = true
|
|
|
|
ignore = {
|
|
"631", -- max_line_length
|
|
"212/_.*", -- unused argument, for vars with "_" prefix
|
|
"214", -- used variable with unused hint ("_" prefix)
|
|
"121", -- setting read-only global variable 'vim'
|
|
"122", -- setting read-only field of global variable 'vim'
|
|
"581", -- negation of a relational operator- operator can be flipped (not for tables)
|
|
}
|
|
|
|
-- Global objects defined by the C code
|
|
read_globals = {
|
|
"vim",
|
|
}
|
|
|
|
globals = {
|
|
"vim.g",
|
|
"vim.b",
|
|
"vim.w",
|
|
"vim.o",
|
|
"vim.bo",
|
|
"vim.wo",
|
|
"vim.go",
|
|
"vim.env"
|
|
}
|
|
|
|
exclude_files = {
|
|
'test/functional/fixtures/lua/syntax_error.lua',
|
|
'runtime/lua/vim/treesitter/_meta.lua',
|
|
'runtime/lua/vim/_meta/vimfn.lua',
|
|
'runtime/lua/vim/_meta/api.lua',
|
|
'runtime/lua/vim/re.lua',
|
|
'runtime/lua/coxpcall.lua',
|
|
'src/nvim/eval.lua',
|
|
}
|