diff --git a/clang/.clang-tidy b/clang/.clang-tidy index ee1d88a..6f9e73a 100644 --- a/clang/.clang-tidy +++ b/clang/.clang-tidy @@ -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 diff --git a/nvim/lua/teaching.lua b/nvim/lua/teaching.lua index e012057..d0a54b0 100644 --- a/nvim/lua/teaching.lua +++ b/nvim/lua/teaching.lua @@ -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 - return false - elseif ends_with(path, ".h") or ends_with(path, ".cpp") or ends_with(path, ".cpp") or ends_with(path, ".cpp") 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 + 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