Skip to content

Commit

Permalink
fix: extension not loading in Theia IDE
Browse files Browse the repository at this point in the history
  • Loading branch information
madmini committed Jun 19, 2024
1 parent 895dfe3 commit 305fdf4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/completion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,12 @@ class MdCompletionItemProvider implements CompletionItemProvider {
const excludePatterns = new Set(Always_Exclude);

if (configManager.get("completion.respectVscodeSearchExclude", folder)) {
const vscodeSearchExclude = configManager.getByAbsolute<object>("search.exclude", folder)!;
// `search.exclude` is currently not implemented in Theia IDE (which is mostly compatible with VSCode extensions)
// fallback to `files.exclude` (in VSCode, `search.exclude` inherits from `files.exclude`) or an empty list
// see https://github.com/eclipse-theia/theia/issues/13823
const vscodeSearchExclude = configManager.getByAbsolute<object>("search.exclude", folder)
?? configManager.getByAbsolute<object>("search.exclude", folder)
?? {};
for (const [pattern, enabled] of Object.entries(vscodeSearchExclude)) {
if (enabled) {
excludePatterns.add(pattern);
Expand Down

0 comments on commit 305fdf4

Please sign in to comment.