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:
14
Command.cc
14
Command.cc
@@ -7,15 +7,15 @@
|
||||
#include <cctype>
|
||||
|
||||
#include "Command.h"
|
||||
#include "HighlighterRegistry.h"
|
||||
#include "NullHighlighter.h"
|
||||
#include "syntax/HighlighterRegistry.h"
|
||||
#include "syntax/NullHighlighter.h"
|
||||
#include "Editor.h"
|
||||
#include "Buffer.h"
|
||||
#include "UndoSystem.h"
|
||||
#include "HelpText.h"
|
||||
#include "LanguageHighlighter.h"
|
||||
#include "HighlighterEngine.h"
|
||||
#include "CppHighlighter.h"
|
||||
#include "syntax/LanguageHighlighter.h"
|
||||
#include "syntax/HighlighterEngine.h"
|
||||
#include "syntax/CppHighlighter.h"
|
||||
#ifdef KTE_BUILD_GUI
|
||||
#include "GUITheme.h"
|
||||
#endif
|
||||
@@ -554,6 +554,8 @@ cmd_save(CommandContext &ctx)
|
||||
ctx.editor.SetStatus("Saved " + buf->Filename());
|
||||
if (auto *u = buf->Undo())
|
||||
u->mark_saved();
|
||||
// Notify LSP of save
|
||||
ctx.editor.NotifyBufferSaved(buf);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -608,6 +610,8 @@ cmd_save_as(CommandContext &ctx)
|
||||
ctx.editor.SetStatus("Saved as " + ctx.arg);
|
||||
if (auto *u = buf->Undo())
|
||||
u->mark_saved();
|
||||
// Notify LSP of save
|
||||
ctx.editor.NotifyBufferSaved(buf);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user