'VS Code Extension Development Duplicate Results For intellisense/code completion

I am working on an extension for dfdl (https://daffodil.apache.org/docs/dfdl/). The intellisense in the extension is returning duplicate values. I have been unable to trouble shoot the cause. The code for my extension is here: https://github.com/rt320/daffodil-extension

VS Code extension in debug window

Some additional background. There are multiple developers working on this project. I worked on the intellisense portion of the project. The originally separate code is here: https://github.com/rt320/vscode-dfdl. In the original intellisense code, the duplication doesn't happen. After the intellisense code was merged into the larger project, the duplication was introduced. The original extension.ts file that contains the intellisense code was moved to src/languages/dfdl.ts, but the code was not changed. It seems like the problem may have something to do with the configuration in the package.json. I was wondering if It might have something to do with "command" definitions for the "*EditorContents"? Is it possible that CompletionProvider function is called twice? Once for each "*EditorContents" command?

"commands": [
  {
    "command": "extension.dfdl-debug.debugEditorContents",
    "title": "Debug File",
    "category": "Daffodil Debug",
    "enablement": "!inDebugMode",
    "icon": "$(debug-alt)"
  },
  {
    "command": "extension.dfdl-debug.runEditorContents",
    "title": "Run File",
    "category": "Daffodil Debug",
    "enablement": "!inDebugMode",
    "icon": "$(play)"
  },

Also, I'm not sure how to create the minimal Reproducible Example, since the problem doesn't seem to come from the intellisense code itself.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source