summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-01-12 23:11:32 -0500
committerpommicket <pommicket@gmail.com>2023-01-12 23:11:32 -0500
commit93f79984dbcbe471bad7ff27c588a03716be6023 (patch)
treef87bbf92e11ff8d34edfbd7bb1eb873a962ccbb4
parent40b3fc989b11616c044a0947f78b400945a300a4 (diff)
[2.0] highlight matching < > in XML too
-rw-r--r--main.c1
-rw-r--r--syntax.c4
2 files changed, 3 insertions, 2 deletions
diff --git a/main.c b/main.c
index 1caee6c..c7d67fe 100644
--- a/main.c
+++ b/main.c
@@ -6,6 +6,7 @@
- texlab bug report:
- textDocument/definition gives LocationLink regardless of client capabilities
FUTURE FEATURES:
+- better interaction between language-specific and path-specific settings
- manual.md
- better handling of backspace with space indentation
- CSS highlighting
diff --git a/syntax.c b/syntax.c
index 0ff8ac9..ac2585f 100644
--- a/syntax.c
+++ b/syntax.c
@@ -185,7 +185,7 @@ static bool syntax_keyword_matches(const char32_t *text, size_t len, const char
}
char32_t syntax_matching_bracket(Language lang, char32_t c) {
- if (lang == LANG_HTML) {
+ if (lang == LANG_HTML || lang == LANG_XML) {
// for most languages, this would look weird since
// v cursor
// if (x < 5 && y >| 6)
@@ -208,7 +208,7 @@ char32_t syntax_matching_bracket(Language lang, char32_t c) {
}
bool syntax_is_opening_bracket(Language lang, char32_t c) {
- if (lang == LANG_HTML) {
+ if (lang == LANG_HTML || lang == LANG_XML) {
if (c == '<')
return true;
}