Fix clang-tidy and add :AP cmd

This commit is contained in:
Thomas Avé 2023-08-28 19:14:35 +02:00
parent 5f74a6a5bf
commit 3344c478ee
2 changed files with 16 additions and 5 deletions

View File

@ -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

View File

@ -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