mirror of
https://github.com/nushell/nushell.git
synced 2024-11-22 16:33:37 +01:00
Merge pull request #1052 from jonathandturner/fix_textview
Re-enable the textview plugin, now its own crate
This commit is contained in:
commit
e9ee7bda46
@ -42,10 +42,10 @@ steps:
|
||||
echo "##vso[task.prependpath]$HOME/.cargo/bin"
|
||||
rustup component add rustfmt --toolchain "stable"
|
||||
displayName: Install Rust
|
||||
- bash: RUSTFLAGS="-D warnings" cargo test --all-features
|
||||
- bash: RUSTFLAGS="-D warnings" cargo test --all --all-features
|
||||
condition: eq(variables['style'], 'unflagged')
|
||||
displayName: Run tests
|
||||
- bash: NUSHELL_ENABLE_ALL_FLAGS=1 RUSTFLAGS="-D warnings" cargo test --all-features
|
||||
- bash: NUSHELL_ENABLE_ALL_FLAGS=1 RUSTFLAGS="-D warnings" cargo test --all --all-features
|
||||
condition: eq(variables['style'], 'canary')
|
||||
displayName: Run tests
|
||||
- bash: cargo fmt --all -- --check
|
||||
|
5
Cargo.lock
generated
5
Cargo.lock
generated
@ -1927,6 +1927,7 @@ dependencies = [
|
||||
"nu-parser",
|
||||
"nu-protocol",
|
||||
"nu-source",
|
||||
"nu_plugin_textview",
|
||||
"num-bigint",
|
||||
"num-traits 0.2.10",
|
||||
"onig_sys",
|
||||
@ -2079,13 +2080,13 @@ dependencies = [
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nu-textview"
|
||||
name = "nu_plugin_textview"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"ansi_term 0.12.1",
|
||||
"crossterm",
|
||||
"nu",
|
||||
"nu-build",
|
||||
"nu-errors",
|
||||
"nu-protocol",
|
||||
"nu-source",
|
||||
"syntect",
|
||||
|
@ -13,7 +13,7 @@ documentation = "https://book.nushell.sh"
|
||||
|
||||
[workspace]
|
||||
|
||||
members = ["crates/nu-errors", "crates/nu-source", "crates/nu-textview", "crates/nu-protocol", "crates/nu-parser", "crates/nu-build"]
|
||||
members = ["crates/nu-errors", "crates/nu-source", "crates/nu_plugin_textview", "crates/nu-protocol", "crates/nu-parser", "crates/nu-build"]
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
@ -22,6 +22,7 @@ nu-source = { version = "0.1.0", path = "./crates/nu-source" }
|
||||
nu-protocol = { version = "0.1.0", path = "./crates/nu-protocol" }
|
||||
nu-errors = { version = "0.1.0", path = "./crates/nu-errors" }
|
||||
nu-parser = { version = "0.1.0", path = "./crates/nu-parser" }
|
||||
nu_plugin_textview = {version = "0.1.0", path = "./crates/nu_plugin_textview", optional=true}
|
||||
|
||||
query_interface = "0.3.5"
|
||||
typetag = "0.1.4"
|
||||
@ -114,6 +115,7 @@ binaryview = ["image", "crossterm"]
|
||||
sys = ["heim", "battery"]
|
||||
ps = ["heim"]
|
||||
starship-prompt = ["starship"]
|
||||
textview = ["nu_plugin_textview"]
|
||||
#trace = ["nu-parser/trace"]
|
||||
|
||||
[dependencies.rusqlite]
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "nu-build"
|
||||
version = "0.1.0"
|
||||
authors = ["Yehuda Katz <wycats@gmail.com>"]
|
||||
authors = ["Yehuda Katz <wycats@gmail.com>", "Jonathan Turner <jonathan.d.turner@gmail.com>", "Andrés N. Robalino <andres@androbtech.com>"]
|
||||
edition = "2018"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "nu-errors"
|
||||
version = "0.1.0"
|
||||
authors = ["Yehuda Katz <wycats@gmail.com>"]
|
||||
authors = ["Yehuda Katz <wycats@gmail.com>", "Jonathan Turner <jonathan.d.turner@gmail.com>", "Andrés N. Robalino <andres@androbtech.com>"]
|
||||
edition = "2018"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "nu-parser"
|
||||
version = "0.1.0"
|
||||
authors = ["Yehuda Katz <wycats@gmail.com>"]
|
||||
authors = ["Yehuda Katz <wycats@gmail.com>", "Jonathan Turner <jonathan.d.turner@gmail.com>", "Andrés N. Robalino <andres@androbtech.com>"]
|
||||
edition = "2018"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
@ -40,4 +40,4 @@ pretty_assertions = "0.6.1"
|
||||
nu-build = { version = "0.1.0", path = "../nu-build" }
|
||||
|
||||
[features]
|
||||
trace = ["nom-tracable/trace"]
|
||||
#trace = ["nom-tracable/trace"]
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "nu-protocol"
|
||||
version = "0.1.0"
|
||||
authors = ["Yehuda Katz <wycats@gmail.com>"]
|
||||
authors = ["Yehuda Katz <wycats@gmail.com>", "Jonathan Turner <jonathan.d.turner@gmail.com>", "Andrés N. Robalino <andres@androbtech.com>"]
|
||||
edition = "2018"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "nu-source"
|
||||
version = "0.1.0"
|
||||
authors = ["Yehuda Katz <wycats@gmail.com>"]
|
||||
authors = ["Yehuda Katz <wycats@gmail.com>", "Jonathan Turner <jonathan.d.turner@gmail.com>", "Andrés N. Robalino <andres@androbtech.com>"]
|
||||
edition = "2018"
|
||||
description = "A source string characterizer for Nushell"
|
||||
license = "MIT"
|
||||
|
@ -1,24 +1,18 @@
|
||||
[package]
|
||||
name = "nu-textview"
|
||||
name = "nu_plugin_textview"
|
||||
version = "0.1.0"
|
||||
authors = ["Yehuda Katz <wycats@gmail.com>"]
|
||||
authors = ["Yehuda Katz <wycats@gmail.com>", "Jonathan Turner <jonathan.d.turner@gmail.com>", "Andrés N. Robalino <andres@androbtech.com>"]
|
||||
edition = "2018"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[[bin]]
|
||||
name = "nu_plugin_textview"
|
||||
path = "src/main.rs"
|
||||
required-features = ["textview"]
|
||||
|
||||
[dependencies]
|
||||
|
||||
syntect = { version = "3.2.0" }
|
||||
ansi_term = "0.12.1"
|
||||
crossterm = { version = "0.10.2" }
|
||||
nu = { path = "../.." }
|
||||
nu-protocol = { path = "../nu-protocol" }
|
||||
nu-source = { path = "../nu-source" }
|
||||
nu-errors = { path = "../nu-errors" }
|
||||
url = "2.1.0"
|
||||
|
||||
[build-dependencies]
|
@ -1,7 +1,9 @@
|
||||
use crossterm::{cursor, terminal, RawScreen};
|
||||
use crossterm::{InputEvent, KeyEvent};
|
||||
use nu::{CallInfo, Plugin, Primitive, ShellError, Signature, UntaggedValue, Value};
|
||||
use nu_protocol::{outln, serve_plugin};
|
||||
use nu_errors::ShellError;
|
||||
use nu_protocol::{
|
||||
outln, serve_plugin, CallInfo, Plugin, Primitive, Signature, UntaggedValue, Value,
|
||||
};
|
||||
use nu_source::AnchorLocation;
|
||||
|
||||
use syntect::easy::HighlightLines;
|
Loading…
Reference in New Issue
Block a user