1
Fork 0

Update schema for new attribute: enable_auto_import

This commit is contained in:
DanielGavin 2025-06-22 23:54:20 +02:00
parent b33d44b82c
commit 83db909715
2 changed files with 9 additions and 0 deletions

View file

@ -60,6 +60,11 @@
"description": "Use snippets when completing procedures—adds parenthesis after the name.",
"default": true
},
"enable_auto_import": {
"type": "boolean",
"description": "Automatically import packages that aren't in your import on completion",
"default": true
},
"enable_references": { "type": "boolean" },
"enable_fake_methods": {
"type": "boolean",

View file

@ -1700,6 +1700,10 @@ append_non_imported_packages :: proc(
position_context: ^DocumentPositionContext,
items: ^[dynamic]CompletionItem,
) {
if !common.config.enable_auto_import {
return
}
for collection, pkgs in build_cache.pkg_aliases {
//Right now only do it for core
if collection != "core" {