Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
71a2e30
Adicionando o dicionario e as anotacoes para portuges
Nov 6, 2025
415cad4
Added helper functions
Nov 7, 2025
ca9d0dc
Added the structure for the plain portuguese parser
Nov 7, 2025
66db7f6
correcting warning
Nov 7, 2025
abdca18
Added the language to every FstDictionary::curated call
Nov 7, 2025
695ef9c
broke english too
Nov 11, 2025
9c3292f
Forgot to add dictionary to merged_dict
Nov 11, 2025
be08d39
Added genders
Nov 11, 2025
cbf997a
In the process of adding the metadata_conditional function
Nov 12, 2025
90e9d39
Untested implementation of the condition
Nov 12, 2025
47f65d1
Dialect converted to a trait
Nov 13, 2025
f7a46d5
Renaming some stuff
Nov 13, 2025
ea8999f
Merge branch 'master' into portugues
Nov 17, 2025
8f12b7c
Tiny fixes
Nov 17, 2025
60b355d
Merge branch 'master' into portugues (updated master)
Nov 17, 2025
e30449b
Dialect -> EnglishDialect
Nov 17, 2025
3df7618
Fixed annotations.json
Nov 17, 2025
10ee129
Fixed documentation and some tests
Nov 17, 2025
1bde6ae
added new masculine, feminine and animate property
Nov 18, 2025
a235b51
Remove file added by mistake
Nov 18, 2025
9c43094
just fmt
Nov 18, 2025
7621cdb
thinking about possibilities
Nov 20, 2025
55769d3
Compromise to implement the dialect enum
Nov 20, 2025
703dda4
Fixes because of last commit
Nov 20, 2025
7a7d25e
cargo check passes
Nov 20, 2025
70dd0bd
Corrected annotations and default for english dialect
Nov 21, 2025
87d537e
Temporary fix for the harper-ls. Must be updated to support more lang…
Nov 21, 2025
0af195a
backup for the wknd
Nov 21, 2025
dcb9dcf
Fixing tests to use Language instead of dialog
Nov 24, 2025
782f5e1
Introducing portuguese spellcheck
Nov 24, 2025
d06ba19
I heart ssr
Nov 24, 2025
80572c0
curated() to curated(LanguageFamily::English)
Nov 25, 2025
54df3cd
changed assert_sugestion_result language to languagefamily
Nov 25, 2025
91e7ae5
First test in the portuguese language passing!
Nov 25, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
members = ["harper-cli", "harper-core", "harper-ls", "harper-comments", "harper-wasm", "harper-tree-sitter", "harper-html", "harper-literate-haskell", "harper-typst", "harper-stats", "harper-pos-utils", "harper-brill", "harper-ink", "harper-python", "harper-jjdescription"]
resolver = "2"

[profile.test]
opt-level = 3
# Comment out the below lines if you plan to use a debugger.
# [profile.test]
# opt-level = 3

[profile.release]
opt-level = 3
Expand Down
11 changes: 9 additions & 2 deletions harper-cli/src/input.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
use std::{borrow::Cow, io::Read, path::PathBuf};

use harper_core::languages::LanguageFamily;
use harper_core::parsers::{Parser, PlainPortuguese};
use harper_core::spell::Dictionary;
use harper_core::{
Document,
Expand All @@ -22,10 +24,15 @@ impl Input {
&self,
markdown_options: MarkdownOptions,
dictionary: &impl Dictionary,
language: LanguageFamily,
) -> anyhow::Result<(Document, String)> {
let parser: Box<dyn Parser> = match language {
LanguageFamily::English => Box::new(PlainEnglish),
LanguageFamily::Portuguese => Box::new(PlainPortuguese),
};
match self {
Input::File(file) => super::load_file(file, markdown_options, dictionary),
Input::Text(s) => Ok((Document::new(s, &PlainEnglish, dictionary), s.clone())),
Input::File(file) => super::load_file(file, markdown_options, dictionary, language),
Input::Text(s) => Ok((Document::new(s, &parser, dictionary), s.clone())),
}
}

Expand Down
Loading