Fix clang-tidy and add :AP cmd
This commit is contained in:
parent
5f74a6a5bf
commit
3344c478ee
|
@ -17,8 +17,7 @@ Checks: "*,
|
|||
-cppcoreguidelines-narrowing-conversions
|
||||
-cppcoreguidelines-avoid-magic-numbers
|
||||
--Wsign-compare
|
||||
-readability-uppercase-literal-suffix
|
||||
"
|
||||
-readability-uppercase-literal-suffix"
|
||||
WarningsAsErrors: ''
|
||||
HeaderFilterRegex: ''
|
||||
FormatStyle: none
|
||||
|
|
|
@ -5,9 +5,19 @@ local function ends_with(path, extension)
|
|||
end
|
||||
|
||||
local function should_load(path)
|
||||
if string.find(path, "build") or string.find(path, "sfml") then
|
||||
local ignore = {
|
||||
[1] = "rapidjson",
|
||||
[2] = "json.hpp",
|
||||
[3] = "build",
|
||||
[4] = "third-party",
|
||||
[5] = "sfml",
|
||||
}
|
||||
for _, pattern in ipairs(ignore) do
|
||||
if string.find(path, pattern, 0, true) then
|
||||
return false
|
||||
elseif ends_with(path, ".h") or ends_with(path, ".cpp") or ends_with(path, ".cpp") or ends_with(path, ".cpp") then
|
||||
end
|
||||
end
|
||||
if ends_with(path, ".h") or ends_with(path, ".cpp") or ends_with(path, ".cpp") or ends_with(path, ".cpp") then
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
@ -29,4 +39,6 @@ function teaching.load()
|
|||
vim.api.nvim_set_current_dir(cwd)
|
||||
end
|
||||
|
||||
vim.api.nvim_create_user_command("AP", teaching.load, {})
|
||||
|
||||
return teaching
|
||||
|
|
Loading…
Reference in New Issue