style: format Cargo manifests (#3092)

This commit is contained in:
Jakub Panek
2024-03-24 18:56:31 +01:00
committed by GitHub
parent 18e63a6345
commit 51a56ac085
6 changed files with 253 additions and 250 deletions
+13
View File
@@ -0,0 +1,13 @@
include = ["**/*.toml"]
exclude = ["lapce-proxy/src/**"]
[[rule]]
include = ["**/Cargo.toml", ".taplo.toml", "Cargo.toml"]
[rule.formatting]
align_entries = true
align_comments = true
array_trailing_comma = true
trailing_newline = true
column_width = 100
inline_table_expand = false
+56 -61
View File
@@ -1,14 +1,14 @@
[package]
name = "lapce"
version.workspace = true
authors.workspace = true
edition.workspace = true
license.workspace = true
rust-version.workspace = true
default-run = "lapce"
name = "lapce"
version = { workspace = true }
authors = { workspace = true }
edition = { workspace = true }
license = { workspace = true }
rust-version = { workspace = true }
default-run = "lapce"
[dependencies]
lapce-app = { path = "./lapce-app" }
lapce-app = { path = "./lapce-app" }
lapce-proxy = { path = "./lapce-proxy" }
[[bin]]
@@ -20,60 +20,55 @@ name = "lapce-proxy"
path = "lapce-proxy/src/bin/lapce-proxy.rs"
[workspace]
members = [
"lapce-app",
"lapce-proxy",
"lapce-rpc",
"lapce-core",
]
members = ["lapce-app", "lapce-proxy", "lapce-rpc", "lapce-core"]
[workspace.package]
version = "0.3.1"
edition = "2021"
version = "0.3.1"
edition = "2021"
rust-version = "1.75"
license = "Apache-2.0"
homepage = "https://lapce.dev"
authors = ["Dongdong Zhou <dzhou121@gmail.com>"]
license = "Apache-2.0"
homepage = "https://lapce.dev"
authors = ["Dongdong Zhou <dzhou121@gmail.com>"]
[workspace.dependencies]
anyhow = "1.0"
backtrace = "0.3"
chrono = "0.4"
clap = { version = "4.5.0", default-features = false, features = ["std", "help", "usage", "derive"] }
crossbeam-channel = "0.5.11"
directories = "4.0.1"
flate2 = "1.0"
globset = "0.4.14"
hashbrown = { version = "0.14.0", features = ["serde"] }
im = { version = "15.0.0", features = ["serde"] }
include_dir = "0.6.2"
indexmap = { version = "2.0", features = ["serde"] }
interprocess = "1.2.1"
itertools = "0.10.1"
notify = { version = "5.2.0", features = ["serde"] }
once_cell = "1.19"
parking_lot = { version = "0.11.0", features = ["deadlock_detection"] }
rayon = "1.8.0"
regex = "1.10.2"
reqwest = { version = "0.11", features = ["blocking", "json", "socks"] }
serde = "1.0"
serde_json = "1.0"
smallvec = "1.13.1"
strum = "0.21.0" # follow same version as system-deps in lockfile
strum_macros = "0.21.1" # ditto
tar = "0.4"
thiserror = "1.0"
toml = { version = "*" }
toml_edit = { version = "0.20.2", features = ["serde"] }
url = { version = "2.5.0" }
anyhow = { version = "1.0" }
backtrace = { version = "0.3" }
chrono = { version = "0.4" }
clap = { version = "4.5.0", default-features = false, features = ["std", "help", "usage", "derive"] }
crossbeam-channel = { version = "0.5.11" }
directories = { version = "4.0.1" }
flate2 = { version = "1.0" }
globset = { version = "0.4.14" }
hashbrown = { version = "0.14.0", features = ["serde"] }
im = { version = "15.0.0", features = ["serde"] }
include_dir = { version = "0.6.2" }
indexmap = { version = "2.0", features = ["serde"] }
interprocess = { version = "1.2.1" }
itertools = { version = "0.10.1" }
notify = { version = "5.2.0", features = ["serde"] }
once_cell = { version = "1.19" }
parking_lot = { version = "0.11.0", features = ["deadlock_detection"] }
rayon = { version = "1.8.0" }
regex = { version = "1.10.2" }
reqwest = { version = "0.11", features = ["blocking", "json", "socks"] }
serde = { version = "1.0" }
serde_json = { verison = "1.0" }
smallvec = { version = "1.13.1" }
strum = { version = "0.21.0" }
strum_macros = { version = "0.21.1" }
tar = { version = "0.4" }
thiserror = { version = "1.0" }
toml = { version = "*" }
toml_edit = { version = "0.20.2", features = ["serde"] }
url = { version = "2.5.0" }
lsp-types = { version = "0.94.1", features = ["proposed"] } # not following semver, so should be locked to patch version updates only
lsp-types = { version = "0.94.1", features = ["proposed"] } # not following semver, so should be locked to patch version updates only
psp-types = { git = "https://github.com/lapce/psp-types", rev = "f7fea28f59e7b2d6faa1034a21679ad49b3524ad" }
lapce-xi-rope = { version = "0.3.2", features = ["serde"] }
lapce-core = { path = "./lapce-core" }
lapce-rpc = { path = "./lapce-rpc" }
lapce-core = { path = "./lapce-core" }
lapce-rpc = { path = "./lapce-rpc" }
lapce-proxy = { path = "./lapce-proxy" }
floem-editor-core = { git = "https://github.com/lapce/floem", rev = "40ab0df2ba86651a811607d6ffc9d5ccce9befe1", features = ["serde"] }
@@ -84,18 +79,18 @@ floem-editor-core = { git = "https://github.com/lapce/floem", rev = "40ab0df2ba8
lsp-types = { git = "https://github.com/lapce/lsp-types", rev = "3031a76c4452f46ed265eb0154d6bb1d10ddb9f6" }
[workspace.dependencies.tracing]
git = "https://github.com/tokio-rs/tracing"
rev = "c14525e1610db88986f849d46bd3e9795878b012"
git = "https://github.com/tokio-rs/tracing"
rev = "c14525e1610db88986f849d46bd3e9795878b012"
package = "tracing"
[workspace.dependencies.tracing-subscriber]
git = "https://github.com/tokio-rs/tracing"
rev = "c14525e1610db88986f849d46bd3e9795878b012"
git = "https://github.com/tokio-rs/tracing"
rev = "c14525e1610db88986f849d46bd3e9795878b012"
package = "tracing-subscriber"
[workspace.dependencies.tracing-appender]
git = "https://github.com/tokio-rs/tracing"
rev = "c14525e1610db88986f849d46bd3e9795878b012"
git = "https://github.com/tokio-rs/tracing"
rev = "c14525e1610db88986f849d46bd3e9795878b012"
package = "tracing-appender"
[workspace.dependencies.alacritty_terminal]
@@ -103,12 +98,12 @@ git = "https://github.com/alacritty/alacritty"
rev = "6071a7bf35cfd99be8ba70f479f188b7370cda6f"
[workspace.dependencies.windows-sys]
version = "0"
version = "0"
features = ["Win32_Foundation"]
[profile.release-lto]
inherits = "release"
lto = true
inherits = "release"
lto = true
codegen-units = 1
# A profile which compiles all (non-workspace) dependencies in release mode
+79 -78
View File
@@ -1,84 +1,85 @@
[package]
name = "lapce-app"
license.workspace = true
version.workspace = true
authors.workspace = true
edition.workspace = true
rust-version.workspace = true
name = "lapce-app"
license = { workspace = true }
version = { workspace = true }
authors = { workspace = true }
edition = { workspace = true }
rust-version = { workspace = true }
[dependencies]
alacritty_terminal.workspace = true
anyhow.workspace = true
backtrace.workspace = true
chrono.workspace = true
clap.workspace = true
crossbeam-channel.workspace = true
directories.workspace = true
flate2.workspace = true
globset.workspace = true
im.workspace = true
include_dir.workspace = true
indexmap.workspace = true
interprocess.workspace = true
itertools.workspace = true
lapce-core.workspace = true
lapce-proxy.workspace = true
lapce-rpc.workspace = true
lapce-xi-rope.workspace = true
lsp-types.workspace = true
notify.workspace = true
once_cell.workspace = true
parking_lot.workspace = true
rayon.workspace = true
reqwest.workspace = true
smallvec.workspace = true
strum.workspace = true
strum_macros.workspace = true
serde.workspace = true
serde_json.workspace = true
regex.workspace = true
tar.workspace = true
thiserror.workspace = true
toml.workspace = true
toml_edit.workspace = true
tracing.workspace = true
tracing-subscriber.workspace = true
tracing-appender.workspace = true
url.workspace = true
alacritty_terminal = { workspace = true }
anyhow = { workspace = true }
backtrace = { workspace = true }
chrono = { workspace = true }
clap = { workspace = true }
crossbeam-channel = { workspace = true }
directories = { workspace = true }
flate2 = { workspace = true }
globset = { workspace = true }
im = { workspace = true }
include_dir = { workspace = true }
indexmap = { workspace = true }
interprocess = { workspace = true }
itertools = { workspace = true }
lapce-core = { workspace = true }
lapce-proxy = { workspace = true }
lapce-rpc = { workspace = true }
lapce-xi-rope = { workspace = true }
lsp-types = { workspace = true }
notify = { workspace = true }
once_cell = { workspace = true }
parking_lot = { workspace = true }
rayon = { workspace = true }
reqwest = { workspace = true }
smallvec = { workspace = true }
strum = { workspace = true }
strum_macros = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
regex = { workspace = true }
tar = { workspace = true }
thiserror = { workspace = true }
toml = { workspace = true }
toml_edit = { workspace = true }
tracing = { workspace = true }
tracing-subscriber = { workspace = true }
tracing-appender = { workspace = true }
url = { workspace = true }
pulldown-cmark = "0.9.1"
Inflector = "0.11.4"
open = "5.0.1"
unicode-width = "0.1.11"
nucleo = "0.2.0"
sled = "0.34.7"
bytemuck = "1.14.3"
tokio = { version = "1.36", features = ["full"] }
futures = "0.3.26"
floem = { git = "https://github.com/lapce/floem", rev = "40ab0df2ba86651a811607d6ffc9d5ccce9befe1", default-features = true, features = ["editor", "serde"]}
# floem = { path = "../../workspaces/floem", features = ["serde"] }
config = { version = "0.13.2", default-features = false, features = ["toml"] }
structdesc = { git = "https://github.com/lapce/structdesc" }
base64 = "0.21.7"
sha2 = "0.10.8"
zip = { version = "0.6.6", default-features = false, features = ["deflate"] }
Inflector = "0.11.4"
open = "5.0.1"
unicode-width = "0.1.11"
nucleo = "0.2.0"
sled = "0.34.7"
bytemuck = "1.14.3"
tokio = { version = "1.36", features = ["full"] }
futures = "0.3.26"
config = { version = "0.13.2", default-features = false, features = ["toml"] }
structdesc = { git = "https://github.com/lapce/structdesc" }
base64 = "0.21.7"
sha2 = "0.10.8"
zip = { version = "0.6.6", default-features = false, features = ["deflate"] }
[dependencies.floem]
# path = "../../workspaces/floem"
git = "https://github.com/lapce/floem"
rev = "40ab0df2ba86651a811607d6ffc9d5ccce9befe1"
default-features = true
features = ["editor", "serde"]
[target.'cfg(target_os="macos")'.dependencies]
fs_extra = "1.2.0"
dmg = "0.1.1"
dmg = "0.1.1"
[target.'cfg(windows)'.dependencies.windows-sys]
workspace = true
features = [
"Win32_Foundation",
"Win32_System_Threading",
"Win32_UI_WindowsAndMessaging",
]
features = ["Win32_Foundation", "Win32_System_Threading", "Win32_UI_WindowsAndMessaging"]
[features]
default = ["all-languages", "updater"]
default = ["all-languages", "updater"]
portable = ["lapce-core/portable"]
updater = []
updater = []
# To build lapce with only some of the supported languages, for example:
#
@@ -86,21 +87,21 @@ updater = []
# --features lang-rust,lang-toml,lang-markdown,lang-json
#
all-languages = [
"lapce-core/lang-bash",
"lapce-core/lang-c",
"lapce-core/lang-cpp",
"lapce-core/lang-javascript",
"lapce-core/lang-json",
"lapce-core/lang-markdown",
"lapce-core/lang-python",
"lapce-core/lang-rust",
"lapce-core/lang-toml",
"lapce-core/lang-yaml",
"lapce-core/lang-bash",
"lapce-core/lang-c",
"lapce-core/lang-cpp",
"lapce-core/lang-javascript",
"lapce-core/lang-json",
"lapce-core/lang-markdown",
"lapce-core/lang-python",
"lapce-core/lang-rust",
"lapce-core/lang-toml",
"lapce-core/lang-yaml",
]
[dev-dependencies]
criterion = "0.5"
[[bench]]
name = "visual_line"
name = "visual_line"
harness = false
+40 -43
View File
@@ -1,66 +1,63 @@
[package]
name = "lapce-core"
license.workspace = true
version.workspace = true
authors.workspace = true
edition.workspace = true
rust-version.workspace = true
name = "lapce-core"
license = { workspace = true }
version = { workspace = true }
authors = { workspace = true }
edition = { workspace = true }
rust-version = { workspace = true }
[dependencies]
anyhow.workspace = true
directories.workspace = true
itertools.workspace = true
once_cell.workspace = true
strum.workspace = true
strum_macros.workspace = true
thiserror.workspace = true
tracing.workspace = true
include_dir.workspace = true
anyhow = { workspace = true }
directories = { workspace = true }
itertools = { workspace = true }
once_cell = { workspace = true }
strum = { workspace = true }
strum_macros = { workspace = true }
thiserror = { workspace = true }
tracing = { workspace = true }
include_dir = { workspace = true }
lsp-types.workspace = true
lsp-types = { workspace = true }
lapce-xi-rope = { workspace = true }
lapce-rpc = { workspace = true }
floem-editor-core = { workspace = true }
lapce-xi-rope.workspace = true
lapce-rpc.workspace = true
floem-editor-core.workspace = true
libloading = "0.7.3"
slotmap = "1.0"
arc-swap = "1.6.0"
libloading = "0.7.3"
slotmap = "1.0"
arc-swap = "1.6.0"
tree-sitter = "0.20.10"
# please keep below dependencies and features sorted just like LANGUAGES in language.rs
tree-sitter-bash = { git = "https://github.com/tree-sitter/tree-sitter-bash", rev = "4488aa41406547e478636a4fcfd24f5bbc3f2f74", optional = true }
tree-sitter-c = { version = "0.20.8", optional = true }
tree-sitter-cpp = { version = "0.20.5", optional = true }
tree-sitter-bash = { git = "https://github.com/tree-sitter/tree-sitter-bash", rev = "4488aa41406547e478636a4fcfd24f5bbc3f2f74", optional = true }
tree-sitter-c = { version = "0.20.8", optional = true }
tree-sitter-cpp = { version = "0.20.5", optional = true }
tree-sitter-javascript = { version = "0.20.3", optional = true }
# new version cannot be published on crates.io - https://github.com/tree-sitter/tree-sitter-json/issues/21
# tree-sitter-json = { version = "0.19.0", optional = true }
tree-sitter-json = { git = "https://github.com/tree-sitter/tree-sitter-json.git", rev = "11e2cc12d9b267766fb11a06e52952792fd8e3f0", optional = true }
tree-sitter-md = { git = "https://github.com/MDeiml/tree-sitter-markdown.git", rev = "272e080bca0efd19a06a7f4252d746417224959e", optional = true }
tree-sitter-json = { git = "https://github.com/tree-sitter/tree-sitter-json.git", rev = "11e2cc12d9b267766fb11a06e52952792fd8e3f0", optional = true }
tree-sitter-md = { git = "https://github.com/MDeiml/tree-sitter-markdown.git", rev = "272e080bca0efd19a06a7f4252d746417224959e", optional = true }
tree-sitter-python = { version = "0.20.4", optional = true }
tree-sitter-rust = { version = "0.20.4", optional = true }
tree-sitter-toml = { version = "0.20.0", optional = true }
tree-sitter-yaml = { git = "https://github.com/panekj/tree-sitter-yaml", rev = "80c8d76847f03e772c5c524cf29bafb56858a8d1", optional = true }
tree-sitter-rust = { version = "0.20.4", optional = true }
tree-sitter-toml = { version = "0.20.0", optional = true }
tree-sitter-yaml = { git = "https://github.com/panekj/tree-sitter-yaml", rev = "80c8d76847f03e772c5c524cf29bafb56858a8d1", optional = true }
[features]
default = []
default = []
portable = []
# See lapce-ui/Cargo.toml for how to choose the languages. See also
# src/language.rs for how to add new languages. The feature names should follow
# the tree-sitter crate names.
lang-bash = ["dep:tree-sitter-bash"]
lang-c = ["dep:tree-sitter-c"]
lang-cpp = ["dep:tree-sitter-cpp"]
lang-bash = ["dep:tree-sitter-bash"]
lang-c = ["dep:tree-sitter-c"]
lang-cpp = ["dep:tree-sitter-cpp"]
lang-javascript = ["dep:tree-sitter-javascript"]
lang-json = ["dep:tree-sitter-json"]
lang-markdown = ["dep:tree-sitter-md"]
lang-python = ["dep:tree-sitter-python"]
lang-rust = ["dep:tree-sitter-rust"]
lang-toml = ["dep:tree-sitter-toml"]
lang-yaml = ["dep:tree-sitter-yaml"]
lang-json = ["dep:tree-sitter-json"]
lang-markdown = ["dep:tree-sitter-md"]
lang-python = ["dep:tree-sitter-python"]
lang-rust = ["dep:tree-sitter-rust"]
lang-toml = ["dep:tree-sitter-toml"]
lang-yaml = ["dep:tree-sitter-yaml"]
[build-dependencies]
anyhow.workspace = true
+48 -50
View File
@@ -1,55 +1,53 @@
[package]
name = "lapce-proxy"
license.workspace = true
version.workspace = true
authors.workspace = true
edition.workspace = true
rust-version.workspace = true
name = "lapce-proxy"
license = { workspace = true }
version = { workspace = true }
authors = { workspace = true }
edition = { workspace = true }
rust-version = { workspace = true }
[dependencies]
alacritty_terminal.workspace = true
anyhow.workspace = true
clap.workspace = true
crossbeam-channel.workspace = true
directories.workspace = true
flate2.workspace = true
globset.workspace = true
indexmap.workspace = true
interprocess.workspace = true
notify.workspace = true
once_cell.workspace = true
parking_lot.workspace = true
regex.workspace = true
reqwest.workspace = true
serde.workspace = true
serde_json.workspace = true
strum.workspace = true
strum_macros.workspace = true
tar.workspace = true
toml.workspace = true
toml_edit.workspace = true
tracing.workspace = true
url.workspace = true
alacritty_terminal = { workspace = true }
anyhow = { workspace = true }
clap = { workspace = true }
crossbeam-channel = { workspace = true }
directories = { workspace = true }
flate2 = { workspace = true }
globset = { workspace = true }
indexmap = { workspace = true }
interprocess = { workspace = true }
notify = { workspace = true }
once_cell = { workspace = true }
parking_lot = { workspace = true }
regex = { workspace = true }
reqwest = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
strum = { workspace = true }
strum_macros = { workspace = true }
tar = { workspace = true }
toml = { workspace = true }
toml_edit = { workspace = true }
tracing = { workspace = true }
url = { workspace = true }
lsp-types.workspace = true
psp-types.workspace = true
lsp-types = { workspace = true }
psp-types = { workspace = true }
lapce-xi-rope.workspace = true
lapce-core.workspace = true
lapce-rpc.workspace = true
floem-editor-core.workspace = true
lapce-xi-rope = { workspace = true }
lapce-core = { workspace = true }
lapce-rpc = { workspace = true }
floem-editor-core = { workspace = true }
# proxy specific dependencies
zstd = "0.11.2" # follow same version wasmtime-cache in lockfile
dyn-clone = "1.0.16"
walkdir = "2.4.0"
zstd = "0.11.2" # follow same version wasmtime-cache in lockfile
dyn-clone = "1.0.16"
walkdir = "2.4.0"
locale_config = "0.3.0"
jsonrpc-lite = "0.6.0"
polling = "3.0.0"
libc = "0.2"
jsonrpc-lite = "0.6.0"
polling = "3.0.0"
libc = "0.2"
# git
git2 = { version = "0.18.2", features = ["vendored-openssl"] }
@@ -58,15 +56,15 @@ git2 = { version = "0.18.2", features = ["vendored-openssl"] }
trash = "3.0.6"
# search
ignore = "0.4.18"
ignore = "0.4.18"
grep-searcher = "0.1.11"
grep-matcher = "0.1.6"
grep-regex = "0.1.11"
grep-matcher = "0.1.6"
grep-regex = "0.1.11"
# wasm
wasmtime = "14.0.0"
wasmtime = "14.0.0"
wasmtime-wasi = "14.0.0"
wasi-common = "14.0.0"
wasi-common = "14.0.0"
[dependencies.wasi-experimental-http-wasmtime]
git = "https://github.com/lapce/wasi-experimental-http"
@@ -74,5 +72,5 @@ git = "https://github.com/lapce/wasi-experimental-http"
[target.'cfg(target_os = "macos")'.dependencies]
cocoa = "0.25"
objc = "0.2"
libc = "0.2"
objc = "0.2"
libc = "0.2"
+17 -18
View File
@@ -1,25 +1,24 @@
[package]
name = "lapce-rpc"
description = "Data formats between lapce components"
license.workspace = true
version.workspace = true
authors.workspace = true
edition.workspace = true
rust-version.workspace = true
name = "lapce-rpc"
description = "Data formats between lapce components"
license = { workspace = true }
version = { workspace = true }
authors = { workspace = true }
edition = { workspace = true }
rust-version = { workspace = true }
[dependencies]
anyhow.workspace = true
crossbeam-channel.workspace = true
indexmap.workspace = true
parking_lot.workspace = true
serde.workspace = true
serde_json.workspace = true
tracing.workspace = true
url.workspace = true
anyhow = { workspace = true }
crossbeam-channel = { workspace = true }
indexmap = { workspace = true }
parking_lot = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
tracing = { workspace = true }
url = { workspace = true }
lsp-types.workspace = true
lapce-xi-rope.workspace = true
lsp-types = { workspace = true }
lapce-xi-rope = { workspace = true }
[dependencies.human-sort]
git = "https://github.com/dragazo/human-sort"