Add custom syntax highlighter and optimize

This commit is contained in:
2026-01-16 21:47:05 +00:00
parent 04cce25bf2
commit 1fda5bf246
77 changed files with 1487 additions and 1673 deletions

View File

@@ -2,7 +2,6 @@
#include "editor/editor.h"
#include "io/sysio.h"
#include "lsp/lsp.h"
#include "ts/ts.h"
#include "ui/bar.h"
#include "utils/utils.h"
@@ -15,7 +14,7 @@ std::atomic<uint8_t> mode = NORMAL;
void background_worker() {
while (running)
throttle(8ms, editor_worker, editors[current_editor]);
throttle(16ms, editor_worker, editors[current_editor]);
}
void background_lsp() {
@@ -119,14 +118,15 @@ int main(int argc, char *argv[]) {
for (auto editor : editors)
free_editor(editor);
std::unique_lock lk(active_lsps_mtx);
lk.unlock();
while (true) {
std::unique_lock lk(active_lsps_mtx);
lk.lock();
if (active_lsps.empty())
break;
lk.unlock();
throttle(16ms, lsp_worker);
}
clear_regex_cache();
return 0;
}