- Introduced `HighlighterRegistry` with support for multiple language highlighters (e.g., JSON, Markdown, Python). - Added `JsonHighlighter` implementation for basic JSON syntax highlighting.
19 lines
445 B
C++
19 lines
445 B
C++
// RustHighlighter.h - simple Rust highlighter
|
|
#pragma once
|
|
|
|
#include "LanguageHighlighter.h"
|
|
#include <unordered_set>
|
|
|
|
namespace kte {
|
|
|
|
class RustHighlighter final : public LanguageHighlighter {
|
|
public:
|
|
RustHighlighter();
|
|
void HighlightLine(const Buffer &buf, int row, std::vector<HighlightSpan> &out) const override;
|
|
private:
|
|
std::unordered_set<std::string> kws_;
|
|
std::unordered_set<std::string> types_;
|
|
};
|
|
|
|
} // namespace kte
|