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:
@@ -11,6 +11,7 @@
|
||||
#include <vector>
|
||||
|
||||
#include "LspTypes.h"
|
||||
#include "Diagnostic.h"
|
||||
|
||||
namespace kte::lsp {
|
||||
// Callback types (stubs for future phases)
|
||||
@@ -55,6 +56,18 @@ public:
|
||||
virtual bool isRunning() const = 0;
|
||||
|
||||
virtual std::string getServerName() const = 0;
|
||||
|
||||
// Handlers (optional; set by manager)
|
||||
using DiagnosticsHandler = std::function<void(const std::string & uri,
|
||||
const std::vector<Diagnostic> &diagnostics
|
||||
)
|
||||
>;
|
||||
|
||||
|
||||
virtual void setDiagnosticsHandler(DiagnosticsHandler h)
|
||||
{
|
||||
(void) h;
|
||||
}
|
||||
};
|
||||
} // namespace kte::lsp
|
||||
|
||||
|
||||
Reference in New Issue
Block a user