tree-sitter and lsp-methods
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
#include <spdlog/spdlog.h>
|
||||
#include "./initialized.hpp"
|
||||
|
||||
namespace lsp::providers
|
||||
{
|
||||
|
||||
std::string Initialized::GetMethod() const
|
||||
{
|
||||
return "initialized";
|
||||
}
|
||||
|
||||
std::string Initialized::GetProviderName() const
|
||||
{
|
||||
return "Initialized";
|
||||
}
|
||||
|
||||
void Initialized::HandleNotification(const protocol::NotificationMessage& notification, ExecutionContext& context)
|
||||
{
|
||||
static_cast<void>(context); // 如果不需要上下文,可以忽略
|
||||
spdlog::debug("InitializeProvider: Providing response for method {}", notification.method);
|
||||
}
|
||||
|
||||
}
|
||||
+15
-14
@@ -1,14 +1,15 @@
|
||||
#pragma once
|
||||
#include "../base/provider_interface.hpp"
|
||||
|
||||
namespace lsp::providers::initialized
|
||||
{
|
||||
class InitializedProvider : public INotificationProvider
|
||||
{
|
||||
public:
|
||||
InitializedProvider() = default;
|
||||
std::string GetMethod() const override;
|
||||
std::string GetProviderName() const override;
|
||||
void HandleNotification(const protocol::NotificationMessage& notification, ExecutionContext& context) override;
|
||||
};
|
||||
}
|
||||
#pragma once
|
||||
#include "../base/provider_interface.hpp"
|
||||
|
||||
namespace lsp::providers
|
||||
{
|
||||
class Initialized : public INotificationProvider
|
||||
{
|
||||
public:
|
||||
Initialized() = default;
|
||||
|
||||
std::string GetMethod() const override;
|
||||
std::string GetProviderName() const override;
|
||||
void HandleNotification(const protocol::NotificationMessage& notification, ExecutionContext& context) override;
|
||||
};
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
#include <spdlog/spdlog.h>
|
||||
#include "./initialized_provider.hpp"
|
||||
|
||||
namespace lsp::providers::initialized
|
||||
{
|
||||
|
||||
std::string InitializedProvider::GetMethod() const
|
||||
{
|
||||
return "initialized";
|
||||
}
|
||||
|
||||
std::string InitializedProvider::GetProviderName() const
|
||||
{
|
||||
return "InitializedProvider";
|
||||
}
|
||||
|
||||
void InitializedProvider::HandleNotification(const protocol::NotificationMessage& notification, ExecutionContext& context)
|
||||
{
|
||||
static_cast<void>(context); // 如果不需要上下文,可以忽略
|
||||
spdlog::debug("InitializeProvider: Providing response for method {}", notification.method);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user