paths: Replace lazy_static! with OnceLock (#13213)
This PR replaces the `lazy_static!` usages in the `paths` crate with `OnceLock` from the standard library. This allows us to drop the `lazy_static` dependency from this crate. The paths are now exposed as accessor functions that reference a private static value. Release Notes: - N/A
This commit is contained in:
@@ -98,19 +98,19 @@ impl JsonLspAdapter {
|
||||
},
|
||||
{
|
||||
"fileMatch": [
|
||||
schema_file_match(&paths::SETTINGS),
|
||||
&*paths::LOCAL_SETTINGS_RELATIVE_PATH,
|
||||
schema_file_match(paths::settings_file()),
|
||||
paths::local_settings_file_relative_path()
|
||||
],
|
||||
"schema": settings_schema,
|
||||
},
|
||||
{
|
||||
"fileMatch": [schema_file_match(&paths::KEYMAP)],
|
||||
"fileMatch": [schema_file_match(paths::keymap_file())],
|
||||
"schema": KeymapFile::generate_json_schema(&action_names),
|
||||
},
|
||||
{
|
||||
"fileMatch": [
|
||||
schema_file_match(&paths::TASKS),
|
||||
&*paths::LOCAL_TASKS_RELATIVE_PATH,
|
||||
schema_file_match(paths::tasks_file()),
|
||||
paths::local_tasks_file_relative_path()
|
||||
],
|
||||
"schema": tasks_schema,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user