Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into typst-support
Browse files Browse the repository at this point in the history
  • Loading branch information
grantlemons committed Jan 7, 2025
2 parents cfb468c + 3b43861 commit 0f55ab1
Show file tree
Hide file tree
Showing 34 changed files with 841 additions and 375 deletions.
182 changes: 93 additions & 89 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions demo.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ Harper is an language checker for developers. it can detect
improper capitalization and misspellled words,
as well as a number of other issues.
Like if you break up words you shoul dn't.
Harper can be a lifesaver when writing technical documents,
emails or other formal forms of communication.

Harper works everywhere, even offline. Since you r data
never leaves your device, you don't ned to worry aout us
Expand Down
3 changes: 2 additions & 1 deletion harper-comments/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ tree-sitter-javascript = "0.20.1"
tree-sitter-go = "0.20.0"
tree-sitter-c = "0.20.7"
tree-sitter-cpp = "0.20.5"
tree-sitter-cmake = "=0.4.1"
tree-sitter-ruby = "0.20.1"
tree-sitter-swift = "=0.4.0"
tree-sitter-c-sharp = "0.20.0"
Expand All @@ -27,7 +28,7 @@ tree-sitter-lua = "0.0.19"
tree-sitter-bash = "0.20.0"
tree-sitter-java = "0.20.0"
tree-sitter-nix = "0.0.1"
itertools = "0.13.0"
itertools = "0.14.0"
tree-sitter-haskell = "0.15.0"

[dev-dependencies]
Expand Down
2 changes: 2 additions & 0 deletions harper-comments/src/comment_parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ impl CommentParser {
"go" => tree_sitter_go::language(),
"c" => tree_sitter_c::language(),
"cpp" => tree_sitter_cpp::language(),
"cmake" => tree_sitter_cmake::language(),
"ruby" => tree_sitter_ruby::language(),
"swift" => tree_sitter_swift::language(),
"csharp" => tree_sitter_c_sharp::language(),
Expand Down Expand Up @@ -77,6 +78,7 @@ impl CommentParser {
"go" => "go",
"c" => "c",
"cpp" => "cpp",
"cmake" => "cmake",
"h" => "cpp",
"rb" => "ruby",
"swift" => "swift",
Expand Down
2 changes: 1 addition & 1 deletion harper-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ blanket = "0.4.0"
fst = "0.4.7"
hashbrown = { version = "0.15.2", features = ["serde"] }
is-macro = "0.3.6"
itertools = "0.13.0"
itertools = "0.14.0"
lazy_static = "1.5.0"
ordered-float = { version = "4.6.0", features = ["serde"] }
paste = "1.0.14"
Expand Down
16 changes: 8 additions & 8 deletions harper-core/dictionary.dict
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
50000
A/125SM
AA/1254M
AAA/12
AB/215M
Expand Down Expand Up @@ -10758,7 +10757,7 @@ Zworykin/M
Zyrtec/M
Zyuganov/M
Zzz
a/1-+4857S~
a/-+457S~
aah/14
aardvark/1SM
ab/14+SDY
Expand Down Expand Up @@ -11894,7 +11893,7 @@ amusing/45Y
amygdala/1
amylase/1M
amyloid/15
an/-71+CS~
an/-7+CS~
anabolism/1M
anachronism/1SM
anachronistic/5
Expand Down Expand Up @@ -11955,7 +11954,7 @@ anchovy/1SM
ancient/51SPMRYT
ancientness/1M
ancillary/51SM
and/714~
and/74~
andante/15SM
andiron/1SM
androgen/1M
Expand Down Expand Up @@ -13329,7 +13328,7 @@ bamboozle/41DSG
ban/41SM
banal/5Y
banality/1SM
banana/15SM
banana/1SM
band's
band/14ESGD
bandage/14DSMG
Expand Down Expand Up @@ -15269,7 +15268,7 @@ bureaucratization/1M
bureaucratize/4GDS
burg/1MRZS
burgeon/14DSG
burger/1M
burger/1MS
burgh/1MRZ
burgher/1M
burghs/1
Expand Down Expand Up @@ -31305,7 +31304,7 @@ marital/5Y
maritime/5
marjoram/1M
mark/14AMDSG
markdown/12SM
Markdown/12SM
marked/54U
markedly/
marker/14MS
Expand Down Expand Up @@ -49003,7 +49002,7 @@ wit/14+SM
witch/14MDSG
witchcraft/1M
witchery/1M
with/+1~
with/+~
withal/+
withdraw/41SG
withdrawal/1MS
Expand Down Expand Up @@ -49768,3 +49767,4 @@ uncheck/SM
upsample/SMG
organoid/SM
centric/SM
Harper/SM
1 change: 1 addition & 0 deletions harper-core/src/document.rs
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,7 @@ macro_rules! create_fns_on_doc {

impl TokenStringExt for Document {
create_fns_on_doc!(word);
create_fns_on_doc!(conjunction);
create_fns_on_doc!(space);
create_fns_on_doc!(apostrophe);
create_fns_on_doc!(pipe);
Expand Down
4 changes: 2 additions & 2 deletions harper-core/src/fat_token.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ use serde::{Deserialize, Serialize};

use crate::TokenKind;

/// A [`Token`] that holds its content as a fat [`Vec<char>`] rather than as a
/// [`Span`].
/// A [`Token`](crate::Token) that holds its content as a fat [`Vec<char>`] rather than as a
/// [`Span`](crate::Span).
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, PartialOrd)]
pub struct FatToken {
pub content: Vec<char>,
Expand Down
1 change: 1 addition & 0 deletions harper-core/src/linting/an_a.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ fn starts_with_vowel(word: &[char]) -> bool {
[] | ['u', 'k', ..]
| ['e', 'u', 'p', 'h', ..]
| ['e', 'u', 'g' | 'l' | 'c', ..]
| ['o', 'n', 'e']
| ['o', 'n', 'c', 'e']
) {
return false;
Expand Down
162 changes: 0 additions & 162 deletions harper-core/src/linting/compound_words.rs

This file was deleted.

Loading

0 comments on commit 0f55ab1

Please sign in to comment.