Skip to content

Commit

Permalink
nixd/declaration: do not respond on decl when option provider disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
inclyc committed Jun 8, 2023
1 parent 5335fa1 commit 4bf6631
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/nixd/src/ServerController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,11 @@ void Server::onDocumentDidClose(

void Server::onDecalration(const lspserver::TextDocumentPositionParams &Params,
lspserver::Callback<llvm::json::Value> Reply) {
if (Config.options && Config.options->enable.value_or(false)) {
Reply(nullptr);
return;
}

auto Thread = std::thread([=, Reply = std::move(Reply), this]() mutable {
ReplyRAII<llvm::json::Value> RR(std::move(Reply));

Expand Down

0 comments on commit 4bf6631

Please sign in to comment.