diff --git a/CHANGELOG.md b/CHANGELOG.md
index 60e27e2e..7ba9a341 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -15,6 +15,7 @@
- Add support for many LATEX accents, enhance coverage of existing accents: double acute (e.g., `\H{O}`, Ő), line below (e.g., `\b{h}`, ẖ), cedilla (e.g., `\c{E}`, Ȩ), dot below (e.g., `\d{A}`, Ạ), ogonek (e.g., `\k{A}`, Ą), breve (e.g., `\u{A}`, Ă), and caron (e.g., `\v{C}`, Č) ([PR #57](https://github.com/valentjn/ltex-ls/pull/57) by [@ed359](https://github.com/ed359), fixes [#56](https://github.com/valentjn/ltex-ls/issues/56))
- Add support for special LATEX characters: `\L` (Ł), `\SS` (ẞ), `\i` (ı), `\j` (ȷ), `\l` (ł) ([PR #57](https://github.com/valentjn/ltex-ls/pull/57) by [@ed359](https://github.com/ed359), fixes [#56](https://github.com/valentjn/ltex-ls/issues/56))
- Add `FR_SPELLING_RULE` as a rule for unknown words ([PR #47](https://github.com/valentjn/ltex-ls/pull/47) by [Nicolas Sicard (@biozic)](https://github.com/biozic))
+- Add support for documents with code language ID `tex` ([PR #54](https://github.com/valentjn/ltex-ls/pull/54) by [Lucas Alber (@LDAP)](https://github.com/LDAP), fixes [#53](https://github.com/valentjn/ltex-ls/issues/53))
- Ignore non-object values for `InitializeParams.initializationOptions` (fixes [#65](https://github.com/valentjn/ltex-ls/issues/65))
## 10.0.0 (February 12, 2021)
diff --git a/ltexls-core/src/main/java/org/bsplines/ltexls/parsing/CodeAnnotatedTextBuilder.java b/ltexls-core/src/main/java/org/bsplines/ltexls/parsing/CodeAnnotatedTextBuilder.java
index dedb9852..0b1733f3 100644
--- a/ltexls-core/src/main/java/org/bsplines/ltexls/parsing/CodeAnnotatedTextBuilder.java
+++ b/ltexls-core/src/main/java/org/bsplines/ltexls/parsing/CodeAnnotatedTextBuilder.java
@@ -33,6 +33,8 @@ public abstract class CodeAnnotatedTextBuilder extends AnnotatedTextBuilder {
new PlaintextAnnotatedTextBuilder());
constructorMap.put("rsweave", (String codeLanguageId) ->
new LatexAnnotatedTextBuilder(codeLanguageId));
+ constructorMap.put("tex", (String codeLanguageId) ->
+ new LatexAnnotatedTextBuilder(codeLanguageId));
}
public static CodeAnnotatedTextBuilder create(String codeLanguageId) {
diff --git a/ltexls-core/src/main/java/org/bsplines/ltexls/parsing/CodeFragmentizer.java b/ltexls-core/src/main/java/org/bsplines/ltexls/parsing/CodeFragmentizer.java
index 3a2d4891..d3d2ce5c 100644
--- a/ltexls-core/src/main/java/org/bsplines/ltexls/parsing/CodeFragmentizer.java
+++ b/ltexls-core/src/main/java/org/bsplines/ltexls/parsing/CodeFragmentizer.java
@@ -37,6 +37,8 @@ public abstract class CodeFragmentizer {
new PlaintextFragmentizer(codeLanguageId));
constructorMap.put("rsweave", (String codeLanguageId) ->
new LatexFragmentizer(codeLanguageId));
+ constructorMap.put("tex", (String codeLanguageId) ->
+ new LatexFragmentizer(codeLanguageId));
}
public CodeFragmentizer(String codeLanguageId) {
diff --git a/ltexls-core/src/test/java/org/bsplines/ltexls/parsing/latex/LatexFragmentizerTest.java b/ltexls-core/src/test/java/org/bsplines/ltexls/parsing/latex/LatexFragmentizerTest.java
index 72728d22..d18068d8 100644
--- a/ltexls-core/src/test/java/org/bsplines/ltexls/parsing/latex/LatexFragmentizerTest.java
+++ b/ltexls-core/src/test/java/org/bsplines/ltexls/parsing/latex/LatexFragmentizerTest.java
@@ -141,6 +141,11 @@ public void testRsweave() {
testCodeLanguage("rsweave");
}
+ @Test
+ public void testTex() {
+ testCodeLanguage("tex");
+ }
+
@Test
public void testBabel() {
CodeFragmentizer fragmentizer = CodeFragmentizer.create("latex");