diff --git a/Cargo.lock b/Cargo.lock index 9e892aee65..0e277e06ca 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1927,6 +1927,7 @@ dependencies = [ "nu-parser", "nu-protocol", "nu-source", + "nu_plugin_textview", "num-bigint", "num-traits 0.2.10", "onig_sys", @@ -2084,7 +2085,6 @@ version = "0.1.0" dependencies = [ "ansi_term 0.12.1", "crossterm", - "nu", "nu-build", "nu-errors", "nu-protocol", diff --git a/Cargo.toml b/Cargo.toml index 90b7166ab0..5228b41a5c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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] diff --git a/crates/nu_plugin_textview/Cargo.toml b/crates/nu_plugin_textview/Cargo.toml index b6ea36489d..82e0abae2a 100644 --- a/crates/nu_plugin_textview/Cargo.toml +++ b/crates/nu_plugin_textview/Cargo.toml @@ -10,7 +10,6 @@ edition = "2018" 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" } diff --git a/crates/nu_plugin_textview/src/main.rs b/crates/nu_plugin_textview/src/main.rs index 8163c91dbe..6a35fed906 100644 --- a/crates/nu_plugin_textview/src/main.rs +++ b/crates/nu_plugin_textview/src/main.rs @@ -1,8 +1,9 @@ use crossterm::{cursor, terminal, RawScreen}; use crossterm::{InputEvent, KeyEvent}; -use nu::Plugin; use nu_errors::ShellError; -use nu_protocol::{outln, serve_plugin, CallInfo, Primitive, Signature, UntaggedValue, Value}; +use nu_protocol::{ + outln, serve_plugin, CallInfo, Plugin, Primitive, Signature, UntaggedValue, Value, +}; use nu_source::AnchorLocation; use syntect::easy::HighlightLines;