Skip to content

Commit

Permalink
[WIP] Add option documentation to :set-option, :get-option.
Browse files Browse the repository at this point in the history
  • Loading branch information
askreet committed Mar 19, 2023
1 parent 7704965 commit 2893dde
Show file tree
Hide file tree
Showing 12 changed files with 614 additions and 88 deletions.
46 changes: 46 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions helix-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ chrono = { version = "0.4", default-features = false, features = ["alloc", "std"

etcetera = "0.4"
textwrap = "0.16.0"
schemars = { version = "0.8.12", features = ["derive_json_schema"] }

[dev-dependencies]
quickcheck = { version = "1", default-features = false }
5 changes: 3 additions & 2 deletions helix-core/src/syntax.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ use std::{
};

use once_cell::sync::{Lazy, OnceCell};
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};

use helix_loader::grammar::{get_language, load_runtime_file};
Expand Down Expand Up @@ -286,7 +287,7 @@ pub struct IndentationConfiguration {
}

/// Configuration for auto pairs
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, JsonSchema)]
#[serde(rename_all = "kebab-case", deny_unknown_fields, untagged)]
pub enum AutoPairConfig {
/// Enables or disables auto pairing. False means disabled. True means to use the default pairs.
Expand Down Expand Up @@ -547,7 +548,7 @@ impl LanguageConfiguration {
.ok()
}
}
#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize, JsonSchema)]
#[serde(default, rename_all = "kebab-case", deny_unknown_fields)]
pub struct SoftWrap {
/// Soft wrap lines that exceed viewport width. Default to off
Expand Down
1 change: 1 addition & 0 deletions helix-term/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ serde = { version = "1.0", features = ["derive"] }
# ripgrep for global search
grep-regex = "0.1.11"
grep-searcher = "0.1.11"
schemars = { version = "0.8.12", features = ["derive_json_schema"] }

[target.'cfg(not(windows))'.dependencies] # https://github.com/vorner/signal-hook/issues/100
signal-hook-tokio = { version = "0.3", features = ["futures-v0_3"] }
Expand Down
1 change: 1 addition & 0 deletions helix-term/src/commands.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
pub(crate) mod dap;
pub(crate) mod lsp;
pub(crate) mod runtime_options;
pub(crate) mod typed;

pub use dap::*;
Expand Down
Loading

0 comments on commit 2893dde

Please # to comment.