Repository navigation
Releases
Language Tool Advanced 1.0.3
Language Tool Advanced 1.0.3 makes sure nothing of the plugin runs on phones and tablets.
Installation
Download main.js, manifest.json and styles.css below and replace the files in VaultFolder/.obsidian/plugins/language-tool/, or update through BRAT.
Mobile
- The plugin is desktop only, and Obsidian leaves it unloaded on a phone or tablet. Where it was loaded there all the same, it underlined text with no suggestions behind the underlines. On mobile it now sets up nothing: no checking, no underlines, no commands, no settings page, no status bar item, and it reads and writes no settings.
- If your phone still shows underlines after this update, it is running an older copy of the plugin (1.0.0 allowed mobile): replace the three files on the phone, or remove the plugin there.
Under the hood
- Obsidian's plugin lint updated to 0.5.1, the newest that this repository's three-day release age rule allows; the code also passes 0.6.0 with no errors or warnings.
Language Tool Advanced 1.0.2
Language Tool Advanced 1.0.2 adds a Support page to its settings.
Installation
Download main.js, manifest.json and styles.css below and replace the files in VaultFolder/.obsidian/plugins/language-tool/, or update through BRAT. The plugin works in Obsidian on macOS, Windows and Linux, not on phones or tablets.
Support page
- Settings → Language Tool Advanced → Support is a new page at the end of the settings. It has a link to support the plugin on Ko-fi, a link to report a bug or suggest an idea in the issues, and the installed version.
- The links open in your browser. The page makes no network requests of its own, and it follows your theme in light and dark mode.
Under the hood
- The check for the element under the mouse, which opens a suggestion when you rest the pointer on an underline, now uses Obsidian's own cross-window test, as Obsidian's newest plugin rules ask. In the main window it gives the same answer as before.
- Caught errors are typed as unknown, so every error message is read with a check first.
How this release was checked
- In Obsidian 1.15.1, in a test vault: the Support page opened from the settings with real clicks, its two links read from the page (not opened), and the version taken from the installed manifest; on desktop in light and dark mode, and in an emulated iPhone layout.
- Resting the mouse on an underline opened the same suggestion with this build and with 1.0.1, and closed again when the mouse left.
- All 336 tests pass, and Obsidian's plugin lint finds nothing, both with the version this repository installs and with the newest one (0.5.1).
Language Tool Advanced 1.0.1
Language Tool Advanced 1.0.1 finds Spanish synonyms on your computer, in the form of the word you select, and becomes a desktop-only plugin.
Installation
Download main.js, manifest.json and styles.css below and replace the files in VaultFolder/.obsidian/plugins/language-tool/, or update through BRAT. The plugin works in Obsidian on macOS, Windows and Linux, not on phones or tablets.
Spanish synonyms
- Found on your computer. The plugin brings its own synonym engine, a small Java program, and starts it in the background the first time you ask for Spanish synonyms. Nothing else needs installing if you have Java 17 or later and a LanguageTool installation, such as the one your own server runs from: the engine reads LanguageTool's Spanish dictionaries. Both are found automatically, or can be set in the settings.
- In the form of the word. Each synonym is put in the form of the word you selected, reading the sentence around it: «casas» gives «viviendas, domicilios», «corrió» gives «anduvo, se apresuró», «Yo tenía» gives «me comprometía», and in «las casas del pueblo son grandes», «grandes» gives «desmedidas».
- What is left out: antonyms, words missing from the RAE's dictionary, misspellings in the thesaurus, and synonyms for names.
- The thesaurus is OpenThesaurus Español (LGPL 2.1). The plugin downloads it once from the RLA-ES project (1.5 MB), checks it and keeps it in its own folder.
- Speed and memory. A lookup takes a millisecond or two once the engine runs; the first one in a session waits about a second while it starts. The engine uses about 350 MB of memory while it runs, and stops after 15 minutes without a request, when you turn the plugin off, or when Obsidian closes.
Synonyms in every language
- Automatic. "Find synonyms" can now follow the language of the paragraph, so Spanish, English and German synonyms work in the same note.
- One row per meaning. Synonyms open under the word as soon as they arrive, grouped by meaning. Click one to put it in place of the word; Cmd+Z (Ctrl+Z) undoes it.
- Notes on hover. Notes from the thesaurus, such as figurado, poco usado or vulgar, show when you rest the mouse on a synonym.
- No leftover underlines. Closing the synonyms without choosing one removes their underline.
- English and German synonyms still come from LanguageTool's servers, which receive the sentence around the word.
Desktop only
The plugin is now marked desktop-only, so Obsidian no longer offers it on phones and tablets.
Language Tool Advanced 1.0.0
Language Tool Advanced 1.0.0 is the first release of this fork of obsidian-languagetool by Lars Wrenger, itself a fork of obsidian-languagetool-plugin by Clemens Ertle. It checks spelling and grammar in Obsidian with LanguageTool, on your own LanguageTool server or on LanguageTool's public and Premium servers.
Installation
Language Tool Advanced is not in the community plugin list yet. Download main.js, manifest.json and styles.css below, put them in VaultFolder/.obsidian/plugins/language-tool/, and turn on Language Tool Advanced under Settings → Community plugins. With BRAT, add DuckTapeKiller/language-tool-advanced as a beta plugin instead. The README explains everything in detail.
Languages
- Preferred languages. Auto detection can be told which languages you write in, so a short paragraph with a typo is no longer checked as German, Slovenian or Esperanto.
- A language for each paragraph. With your own server, every paragraph can be checked in its own language, so a note can mix English and Spanish.
- Text in other languages can be checked in its own language, left unchecked, or checked as one of your languages, so a quotation in French need not get French suggestions.
- Language varieties. Spanish can be checked as generic Spanish (the default), Spanish from Spain, or Spanish with voseo («vos tenés»). A note language given without a variety (
lt-language: es) is checked in the variety chosen in the settings; before, it silently turned off spell checking. - British spelling. "-ise" and "-ize" are both accepted in British English, unless "Oxford spelling in British English" is on.
Suggestions
- Click an underline to see its suggestions. Hovering opens them too, without the misses after scrolling that CodeMirror's hover tooltips had. Escape closes them, and clicking the underline again reopens them.
- The language of each suggestion. The corner of the suggestions box shows the language the paragraph was checked in, under LanguageTool's mark: ES, EN. Rest the mouse on it to see the language in full.
- Notes are checked when you open them, not only the paragraphs you edit, while automatic checking is on. A note opened in reading view is checked when you switch it to editing view, and text you type while a long note is being checked keeps its suggestions.
- Suggestions keep the formatting. A suggestion changes only the characters that differ, so emphasis markers, links, footnotes and comments next to a mistake stay intact, and a space forgotten next to a marker goes on its outer side: «y**aseguró**» becomes «y **aseguró**». A word split across two runs of bold or italics is joined in one («**desarroll** **aron**» → «**desarrollaron**»). A suggestion that would still change the formatting, or turn a backslash into an escape, is shown but cannot be applied.
- Fix all and Change all. The mechanical fixes of the Spanish rules can be applied to the whole note at once, for example every “cita” to «cita», and the same misspelling can be corrected wherever it occurs. A single undo reverts either.
Spanish (RAE)
Text detected as Spanish is also checked against the RAE's Libro de estilo de la lengua española and Diccionario panhispánico de dudas where LanguageTool has no rule:
- Typography: the full stop after closing quotation marks and brackets, and none after «?» or «!»; thousands with a space («20 000», but «1250»); a space before «%»; dates in Spanish order; months, days and positions in lower case; headings in sentence case, keeping proper names; «angular» quotation marks first; quotation marks or italics, never both.
- Dialogue: rayas joined to the words, and no full stop or comma before a verb of saying, which goes in lower case: «—Hola —dijo Juan». Asides go between rayas rather than hyphens or en dashes, and are closed at the end of a sentence too.
- Punctuation: the opening «¿» and «¡», outside vocatives, connectors and «si» clauses («Juan, ¿vienes?»); no doubled «¿¿ ??»; no full stop after a heading.
- Abbreviations with a space after each full stop: «EE. UU.», «384 a. C.», «10 a. m.», «S. A.», «J. L. González».
- Latin phrases and foreign expressions in italics, the Latin ones without accents: in situ, statu quo, motu proprio, sui generis, déjà vu.
- Phrases and grammar: «a bordo», «en aras de», «volví en mí», «el undécimo aniversario», «Si tuviera dinero», «Le dije que viniera», «Nadie vino», «Se busca a los culpables», «Es importante que», «Me olvidé de que», «No cabe duda de que», «¡Sentaos!», «Váyanse», «para ti».
What the norm admits, proper names, abbreviations, lists, quotations in other languages and titles are left alone, and so are the wrong forms that notes on grammar cite as such («no ®váyasen», «no X el onceavo piso», «(no Se buscan…)»). Headings in sentence case keep the capitals of names, also of those LanguageTool does not know («Ayiti», «Saint-Domingue»), and of a second sentence. Web addresses, identifiers («NIT 890.902.922-6»), volume numbers, uncertain dates («1875?»), affixes («-r», «r-») and quotations in English are left alone too. Any rule can be turned off with "Disable rule", and all of them under Settings → Language Tool Advanced → Spanish typography (RAE).
Fixes
- Obsidian syntax is not checked: comments, tags, callout markers, block IDs, embeds and highlight markers. Inline code and maths, and a tag in the middle of a sentence, read as a neutral word, so they no longer cause spacing or repeated-word warnings.
- The letter of a lettered list («b.») is not taken for a misspelling, and brackets that restore letters inside a word read as the whole word: «her[i]do» is checked as «herido».
- Each table cell is read as a paragraph of its own, so no sentence runs from one cell into the next, and each item of a list is still read as a list item when every paragraph is checked in its own language.
- A space added at the start of a line no longer turns it into a list or a heading («7.Por» → «7. Por»): such a suggestion is shown but cannot be applied.
- A quotation mark or bracket that is never closed is closed at the end of its line, before a final full stop in Spanish, or removed; LanguageTool's own fix only doubled it («""»).
- Quotation marks are flagged and fixed with their spacing, also when mixed («“cita"»), spaced («" cita "») or split into runs of bold: «**"** **El libro** **"**» becomes «**«El libro»**».
- A misspelling glued to markup («la**ciudadd**») first gets its missing space, then its correction.
- Character references (
,&),<br>and soft hyphens read as what they stand for; a reference on the second line of a paragraph no longer hides the first characters of that line. - The quotation marks of a long quotation can be changed without touching the bold or italics inside it.
- Long notes are checked much faster: a note that is one long table is no longer read again whole for every suggestion in it, nor every note for every paragraph.
- Opening another note in the same tab while a note is being checked no longer puts the first note's suggestions in the second.
- Long notes are checked in parts, so they no longer fail on the public server's limit of 20,000 characters per request.
- A malformed link containing an email address no longer stops the whole note from being checked.
- Auto-check keeps a separate state for every open note, and text edited while a check is running is checked again once it has finished.
- Choosing a suggestion from the right-click menu replaces the right word.
- "Accept all suggestions" skips suggestions that overlap another one, instead of garbling the text.
- "Add to dictionary" works for every kind of spelling match and always syncs with LanguageTool Premium, and a note's
lt-dictionaryadds to your ignored words instead of replacing them. - Changing the server loads the language list from the new server once you have stopped typing, and loading the language list and syncing the dictionary no longer delay starting Obsidian.
Credits and licence
Language Tool Advanced is based on the work of Lars Wrenger, Clemens Ertle, Matthew Meyers and the other contributors to those projects, whose commits are kept in the repository's history. Like the original, it is free software under the GNU Affero General Public License version 3, or any later version.
Language Tool Advanced is not affiliated with or endorsed by LanguageTool.