Skip to content

Commit 9c50be9

Browse files
authored
chore: add our own text-size (#235)
1 parent 310b643 commit 9c50be9

File tree

57 files changed

+1123
-332
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+1123
-332
lines changed

Cargo.lock

Lines changed: 39 additions & 30 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ enumflags2 = "0.7.10"
2424
ignore = "0.4.23"
2525
indexmap = { version = "2.6.0", features = ["serde"] }
2626
insta = "1.31.0"
27-
line_index = { path = "./lib/line_index", version = "0.0.0" }
2827
pg_query = "6.0.0"
2928
proc-macro2 = "1.0.66"
3029
quote = "1.0.33"
@@ -39,7 +38,6 @@ smallvec = { version = "1.13.2", features = ["union", "const_new
3938
sqlx = { version = "0.8.2", features = ["runtime-async-std", "tls-rustls", "postgres", "json"] }
4039
syn = "1.0.109"
4140
termcolor = "1.4.1"
42-
text-size = "1.1.1"
4341
tokio = { version = "1.40.0", features = ["full"] }
4442
toml = "0.8.19"
4543
tower-lsp = "0.20.0"
@@ -75,6 +73,7 @@ pglt_query_proto_parser = { path = "./crates/pglt_query_proto_parser", versi
7573
pglt_schema_cache = { path = "./crates/pglt_schema_cache", version = "0.0.0" }
7674
pglt_statement_splitter = { path = "./crates/pglt_statement_splitter", version = "0.0.0" }
7775
pglt_text_edit = { path = "./crates/pglt_text_edit", version = "0.0.0" }
76+
pglt_text_size = { path = "./crates/pglt_text_size", version = "0.0.0" }
7877
pglt_treesitter_queries = { path = "./crates/pglt_treesitter_queries", version = "0.0.0" }
7978
pglt_type_resolver = { path = "./crates/pglt_type_resolver", version = "0.0.0" }
8079
pglt_typecheck = { path = "./crates/pglt_typecheck", version = "0.0.0" }

crates/pglt_analyse/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ rustc-hash = { workspace = true }
2222
biome_deserialize = { workspace = true, optional = true }
2323
biome_deserialize_macros = { workspace = true, optional = true }
2424
enumflags2.workspace = true
25+
pglt_text_size.workspace = true
2526
schemars = { workspace = true, optional = true }
2627
serde = { workspace = true, features = ["derive"], optional = true }
27-
text-size.workspace = true
2828

2929
[features]
3030
serde = ["dep:serde", "dep:schemars", "dep:biome_deserialize", "dep:biome_deserialize_macros"]

crates/pglt_analyse/src/rule.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ use pglt_diagnostics::{
55
Advices, Category, Diagnostic, DiagnosticTags, Location, LogCategory, MessageAndDescription,
66
Visit,
77
};
8+
use pglt_text_size::TextRange;
89
use std::cmp::Ordering;
910
use std::fmt::Debug;
10-
use text_size::TextRange;
1111

1212
use crate::{categories::RuleCategory, context::RuleContext, registry::RegistryVisitor};
1313

crates/pglt_commands/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ version = "0.0.0"
1212

1313

1414
[dependencies]
15-
anyhow = "1.0.62"
16-
async-std = "1.12.0"
17-
sqlx.workspace = true
18-
text-size.workspace = true
15+
anyhow = "1.0.62"
16+
async-std = "1.12.0"
17+
pglt_text_size.workspace = true
18+
sqlx.workspace = true
1919

2020
[lib]
2121
doctest = false

crates/pglt_completions/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ version = "0.0.0"
1414
[dependencies]
1515
async-std = "1.12.0"
1616

17-
text-size.workspace = true
17+
pglt_text_size.workspace = true
1818

1919

2020
pglt_schema_cache.workspace = true

crates/pglt_completions/src/complete.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1+
use pglt_text_size::TextSize;
12
use serde::{Deserialize, Serialize};
2-
use text_size::TextSize;
33

44
use crate::{
55
builder::CompletionBuilder,

crates/pglt_configuration/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ pglt_analyse = { workspace = true }
2020
pglt_analyser = { workspace = true }
2121
pglt_console = { workspace = true }
2222
pglt_diagnostics = { workspace = true }
23+
pglt_text_size = { workspace = true }
2324
rustc-hash = { workspace = true }
2425
schemars = { workspace = true, features = ["indexmap1"], optional = true }
2526
serde = { workspace = true, features = ["derive"] }
2627
serde_json = { workspace = true, features = ["raw_value"] }
27-
text-size = { workspace = true }
2828
toml = { workspace = true }
2929

3030
[lib]

crates/pglt_console/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ version = "0.0.0"
1212

1313

1414
[dependencies]
15-
pglt_markup = { workspace = true }
16-
text-size = { workspace = true }
15+
pglt_markup = { workspace = true }
16+
pglt_text_size = { workspace = true }
1717

1818
schemars = { workspace = true, optional = true }
1919
serde = { workspace = true, optional = true, features = ["derive"] }

crates/pglt_console/src/markup.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ use std::{
44
io,
55
};
66

7+
use pglt_text_size::TextSize;
78
use termcolor::{Color, ColorSpec};
8-
use text_size::TextSize;
99

1010
use crate::fmt::{Display, Formatter, MarkupElements, Write};
1111

0 commit comments

Comments
 (0)