@@ -283,14 +283,28 @@ pub mod completers {
286+ /// Recursive function to get all keys from this value and add them to vec
287+ fn get_keys(value: &serde_json::Value, vec: &mut Vec<String>, scope: Option<&str>) {
288+ if let Some(map) = value.as_object() {
289+ for (key, value) in map.iter() {
290+ let key = match scope {
291+ Some(scope) => format!("{}.{}", scope, key),
292+ None => key.clone(),
294+ get_keys(value, vec, Some(&key));
295+ if !value.is_object() {
286 pub fn setting(_editor: &Editor, input: &str) -> Vec<Completion> {
302 pub fn setting(_editor: &Editor, input: &str) -> Vec<Completion> {
287 static KEYS: Lazy<Vec<String>> = Lazy::new(|| {
303 static KEYS: Lazy<Vec<String>> = Lazy::new(|| {
304+ let mut keys = Vec::new();
288− serde_json::json!(Config::default())
305+ let json = serde_json::json!(Config::default());
289− .as_object()
306+ get_keys(&json, &mut keys, None);
296 let matcher = Matcher::default();
310 let matcher = Matcher::default();