diff --git a/src/main.cc b/src/main.cc index 0f661b1d8..daac24b5a 100644 --- a/src/main.cc +++ b/src/main.cc @@ -101,7 +101,7 @@ void do_go(Context& context) if (contains(filename, c)) return; - std::vector paths = { ""_str, "/usr/include/"_str }; + auto paths = context.options()["path"].get>(); const String& buffer_name = context.buffer().name(); auto it = find(reversed(buffer_name), '/'); if (it != buffer_name.rend()) diff --git a/src/option_manager.cc b/src/option_manager.cc index 76475ab9f..a78bd029d 100644 --- a/src/option_manager.cc +++ b/src/option_manager.cc @@ -239,6 +239,7 @@ GlobalOptions::GlobalOptions() declare_option("ignored_files", R"(^(\..*|.*\.(o|so|a))$)"); declare_option("filetype", ""); declare_option>("completions", {}); + declare_option>("path", { "./", "/usr/include" }); } template