Skip to content

Commit

Permalink
feat: add build script enable
Browse files Browse the repository at this point in the history
  • Loading branch information
HTGAzureX1212 committed Jan 20, 2024
1 parent c884422 commit 2f7ce8a
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rs4lapce"
version = "0.1.1"
version = "0.2.0"
authors = ["HTGAzureX1212."]
edition = "2021"
license = "Apache-2.0"
Expand Down
19 changes: 17 additions & 2 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,24 @@ pub(crate) struct PluginConfiguration {
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct RustAnalyzerBuildsConfiguration {
#[serde(default)]
#[serde(rename = "nightly")]
pub nightly: bool,
}

#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct RustAnalyzerConfiguration;
pub struct RustAnalyzerConfiguration {
#[serde(default)]
pub cargo: Option<RustAnalyzerCargoConfiguration>,
}

#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct RustAnalyzerCargoConfiguration {
#[serde(default)]
#[serde(rename = "buildScripts")]
pub build_scripts: Option<RustAnalyzerCargoBuildScriptsConfiguration>,
}

#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct RustAnalyzerCargoBuildScriptsConfiguration {
#[serde(default)]
pub enable: bool,
}
6 changes: 5 additions & 1 deletion volt.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name = "rs4lapce"
version = "0.1.1"
version = "0.2.0"
display-name = "Rs4Lapce"
author = "HTGAzureX1212"
description = "Rust plugin for Lapce, powered by Rust Analyzer"
Expand All @@ -14,3 +14,7 @@ workspace-contains = ["*/Cargo.toml"]
[config."rustAnalyzerBuilds.nightly"]
default = false
description = "Whether to fetch daily nightly builds of rust-analyzer for usage in the editor."

[config."rustAnalyzer.cargo.buildScripts.enable"]
default = false
description = "Whether to run build scripts for more precise code analysis."

0 comments on commit 2f7ce8a

Please sign in to comment.