Allow semantic tokens for strings to be disabled

This commit is contained in:
John Renner
2021-05-10 13:09:38 -07:00
parent ba86203987
commit c3ba1f14fa
4 changed files with 58 additions and 9 deletions

View File

@@ -44,6 +44,9 @@ config_data! {
/// Show function name and docs in parameter hints.
callInfo_full: bool = "true",
/// Use semantic tokens for strings. Disable to support injected grammars
semanticStringTokens: bool = "true",
/// Automatically refresh project info via `cargo metadata` on
/// `Cargo.toml` changes.
cargo_autoreload: bool = "true",
@@ -381,6 +384,9 @@ impl Config {
pub fn line_folding_only(&self) -> bool {
try_or!(self.caps.text_document.as_ref()?.folding_range.as_ref()?.line_folding_only?, false)
}
pub fn semantic_strings(&self) -> bool {
self.data.semanticStringTokens
}
pub fn hierarchical_symbols(&self) -> bool {
try_or!(
self.caps