Skip to content

Commit

Permalink
refactor(tools/spxls): improve completion support
Browse files Browse the repository at this point in the history
Signed-off-by: Aofei Sheng <[email protected]>
  • Loading branch information
aofei committed Jan 20, 2025
1 parent b9070f5 commit 3b8159d
Show file tree
Hide file tree
Showing 5 changed files with 1,021 additions and 257 deletions.
12 changes: 12 additions & 0 deletions spx-gui/src/components/editor/code-editor/document-base/gop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,18 @@ export const varDeclaration: DefinitionDocumentationItem = {
})
}

export const importStatement: DefinitionDocumentationItem = {
categories: [categories.control.declaration],
kind: DefinitionKind.Statement,
definition: { name: 'import_declaration' }, // TODO
insertText: 'import "${1:package}"',
overview: 'import "package"',
detail: makeBasicMarkdownString({
en: 'Import package declaration, e.g., `import "fmt"`',
zh: '导入包声明,如 `import "fmt"`'
})
}

export const functionDeclaration: DefinitionDocumentationItem = {
categories: [categories.control.declaration],
kind: DefinitionKind.Statement,
Expand Down
Loading

0 comments on commit 3b8159d

Please sign in to comment.