snippet_provider: Use proper casing of VsCode
in identifiers (#29038)
This PR renames some identifiers in the `snippet_provider` to use the correct casing of `VsCode`. Release Notes: - N/A
This commit is contained in:
parent
3538acec7c
commit
269f6403dd
4 changed files with 12 additions and 12 deletions
|
@ -8,12 +8,12 @@ use serde::Deserialize;
|
|||
use serde_json_lenient::Value;
|
||||
|
||||
#[derive(Deserialize)]
|
||||
pub struct VSSnippetsFile {
|
||||
pub struct VsSnippetsFile {
|
||||
#[serde(flatten)]
|
||||
pub(crate) snippets: HashMap<String, VSCodeSnippet>,
|
||||
pub(crate) snippets: HashMap<String, VsCodeSnippet>,
|
||||
}
|
||||
|
||||
impl VSSnippetsFile {
|
||||
impl VsSnippetsFile {
|
||||
pub fn generate_json_schema() -> Value {
|
||||
let schema = SchemaSettings::draft07()
|
||||
.with(|settings| settings.option_add_null_type = false)
|
||||
|
@ -24,15 +24,15 @@ impl VSSnippetsFile {
|
|||
}
|
||||
}
|
||||
|
||||
impl JsonSchema for VSSnippetsFile {
|
||||
impl JsonSchema for VsSnippetsFile {
|
||||
fn schema_name() -> String {
|
||||
"VSSnippetsFile".into()
|
||||
"VsSnippetsFile".into()
|
||||
}
|
||||
|
||||
fn json_schema(r#gen: &mut schemars::r#gen::SchemaGenerator) -> Schema {
|
||||
SchemaObject {
|
||||
object: Some(Box::new(ObjectValidation {
|
||||
additional_properties: Some(Box::new(r#gen.subschema_for::<VSCodeSnippet>())),
|
||||
additional_properties: Some(Box::new(r#gen.subschema_for::<VsCodeSnippet>())),
|
||||
..Default::default()
|
||||
})),
|
||||
..Default::default()
|
||||
|
@ -71,7 +71,7 @@ impl std::fmt::Display for ListOrDirect {
|
|||
}
|
||||
|
||||
#[derive(Deserialize, JsonSchema)]
|
||||
pub(crate) struct VSCodeSnippet {
|
||||
pub(crate) struct VsCodeSnippet {
|
||||
/// The snippet prefix used to decide whether a completion menu should be shown.
|
||||
pub(crate) prefix: Option<ListOrDirect>,
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue