Files
kte/lsp/LspProcessClient.cc

72 lines
1.3 KiB
C++
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/*
* LspProcessClient.cc - initial stub implementation
*/
#include "LspProcessClient.h"
namespace kte::lsp {
LspProcessClient::LspProcessClient(std::string serverCommand, std::vector<std::string> serverArgs)
: command_(std::move(serverCommand)), args_(std::move(serverArgs)), transport_(new JsonRpcTransport()) {}
LspProcessClient::~LspProcessClient() = default;
bool
LspProcessClient::initialize(const std::string &/*rootPath*/)
{
// Phase 12: no real process spawn yet
running_ = true;
return true;
}
void
LspProcessClient::shutdown()
{
running_ = false;
}
void
LspProcessClient::didOpen(const std::string &/*uri*/, const std::string &/*languageId*/,
int /*version*/, const std::string &/*text*/)
{
// Stub: would send textDocument/didOpen
}
void
LspProcessClient::didChange(const std::string &/*uri*/, int /*version*/,
const std::vector<TextDocumentContentChangeEvent> &/*changes*/)
{
// Stub: would send textDocument/didChange
}
void
LspProcessClient::didClose(const std::string &/*uri*/)
{
// Stub
}
void
LspProcessClient::didSave(const std::string &/*uri*/)
{
// Stub
}
bool
LspProcessClient::isRunning() const
{
return running_;
}
std::string
LspProcessClient::getServerName() const
{
return command_;
}
} // namespace kte::lsp