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:
parent
ba59e66314
commit
81475ac4cd
27 changed files with 322 additions and 172 deletions
|
@ -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,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue