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 17, 2025
1 parent f57eb52 commit a3c1dd2
Show file tree
Hide file tree
Showing 5 changed files with 615 additions and 253 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 a3c1dd2

Please sign in to comment.