5#ifndef HOSHI_LANG_LSP_PROJECT_INDEX_H
6#define HOSHI_LANG_LSP_PROJECT_INDEX_H
31 const std::string &relativeToFile);
57 std::map<std::string, IndexedModule>
modules;
59 std::string
tryResolve(
const std::string &searchDir,
const std::string &importPath);
61 void parseAndIndex(
const std::string &absolutePath,
const std::wstring &text,
const yoi::vec< Symbol > & indexAndGet(const std::string &absolutePath)
Parse and index a module, then return its symbols.
std::map< std::string, IndexedModule > modules
void invalidateModule(const std::string &absolutePath)
Clear a module from the cache (e.g., when it changes on disk).
const std::vector< std::string > & getSearchPaths() const
const yoi::vec< Symbol > * getModuleSymbols(const std::string &absolutePath)
Get symbols for a specific module.
void indexModule(const std::string &absolutePath)
std::string resolveModule(const std::string &importPath, const std::string &relativeToFile)
void setSearchPaths(const std::vector< std::string > &paths)
void addSearchPath(const std::string &path)
void getAllSymbols(yoi::vec< Symbol > &out)
Collect all symbols from all indexed modules into flat list.
void parseAndIndex(const std::string &absolutePath, const std::wstring &text, IndexedModule &mod)
std::vector< std::string > searchPaths
std::string tryResolve(const std::string &searchDir, const std::string &importPath)
yoi::vec< Symbol > symbols