Skip to content

Commit 8c316e3

Browse files
fix: Use CWD as project_root instead of hard-coding it. (#27)
1 parent afb43b7 commit 8c316e3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

scip_indexer/SCIPIndexer.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1072,7 +1072,9 @@ class SCIPSemanticExtension : public SemanticExtension {
10721072
scip::Metadata metadata;
10731073
metadata.set_version(scip::UnspecifiedProtocolVersion);
10741074
*metadata.mutable_tool_info() = toolInfo;
1075-
metadata.set_project_root("file://Users/varun/Code/scip-ruby"); // FIXME(varun): Remove hard-coded string
1075+
// NOTE: We are not respecting the path prefix option here. Should we do that?
1076+
// FIXME: filesystem::current_path() returns the path in 'native' format, so this won't work on Windows.
1077+
metadata.set_project_root("file:/" + filesystem::current_path().string());
10761078
metadata.set_text_document_encoding(scip::TextEncoding::UTF8);
10771079

10781080
vector<SCIPState> allStates;

0 commit comments

Comments
 (0)