Skip to content

Introduce new swift.exclude setting #1693

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

award999
Copy link
Contributor

@award999 award999 commented Jul 4, 2025

Description

This will make sure the specified folders are not initialized and added to the WorkspaceContext. This means no tasks, tests, project panel, etc for these excluded folders, and they are not added to the sourcekit-lsp instance. SourceKit-LSP will still initialize if the an excluded file is open in the editor, an issue against the LS will be raised separately.

Issue: #636

Tasks

  • Required tests have been written
  • Documentation has been updated
  • Added an entry to CHANGELOG.md if applicable

This will make sure the specified folders are not initialized and
added to the `WorkspaceContext`. SourceKit-LSP will still initialize
if the an excluded file is open in the editor

Issue: swiftlang#636
Copy link
Member

@matthewbastien matthewbastien left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Just one issue with naming.

@@ -740,6 +740,13 @@
"default": false,
"markdownDescription": "Disable the running of SourceKit-LSP.",
"markdownDeprecationMessage": "**Deprecated**: Please use `#swift.sourcekit-lsp.disable#` instead."
},
"swift.exclude": {
Copy link
Member

@matthewbastien matthewbastien Jul 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm leaning towards calling this swift.packages.exclude or swift.excludePackages given that it applies specifically to folders/packages. Gives a better indication of what's being excluded. We may also want to add exclusion for other things in the future and this will help differentiate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants