Add SQL, Erlang, and Forth highlighter implementations and tests for LSP process and transport handling.
- Added highlighters for new languages (SQL, Erlang, Forth) with filetype recognition. - Updated and reorganized syntax files to maintain consistency and modularity. - Introduced LSP transport framing unit tests and JSON decoding/dispatch tests. - Refactored `LspManager`, integrating UTF-16/UTF-8 position conversions and robust diagnostics handling. - Enhanced server start/restart logic with workspace root detection and logging to improve LSP usability.
This commit is contained in:
22
Editor.h
22
Editor.h
@@ -11,6 +11,13 @@
|
||||
|
||||
#include "Buffer.h"
|
||||
|
||||
// fwd decl for LSP wiring
|
||||
namespace kte {
|
||||
namespace lsp {
|
||||
class LspManager;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class Editor {
|
||||
public:
|
||||
@@ -436,6 +443,16 @@ public:
|
||||
|
||||
bool OpenFile(const std::string &path, std::string &err);
|
||||
|
||||
// LSP: attach/detach manager
|
||||
void SetLspManager(kte::lsp::LspManager *mgr)
|
||||
{
|
||||
lsp_manager_ = mgr;
|
||||
}
|
||||
|
||||
|
||||
// LSP: notify buffer saved (used by commands)
|
||||
void NotifyBufferSaved(Buffer *buf);
|
||||
|
||||
// Buffer switching/closing
|
||||
bool SwitchTo(std::size_t index);
|
||||
|
||||
@@ -551,6 +568,9 @@ public:
|
||||
private:
|
||||
std::string replace_find_tmp_;
|
||||
std::string replace_with_tmp_;
|
||||
|
||||
// Non-owning pointer to LSP manager (if provided)
|
||||
kte::lsp::LspManager *lsp_manager_ = nullptr;
|
||||
};
|
||||
|
||||
#endif // KTE_EDITOR_H
|
||||
#endif // KTE_EDITOR_H
|
||||
Reference in New Issue
Block a user