-
Notifications
You must be signed in to change notification settings - Fork 711
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix dialog close logic && auto code fragments
- Loading branch information
Hiram
committed
May 4, 2024
1 parent
d619828
commit 6485cec
Showing
2 changed files
with
95 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
src/renderer/src/utils/drpy/drpy_suggestions/drpy_suggestions.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
const createDependencyProposals = (range: object, monaco: any) => { | ||
let snippets = [ | ||
{ | ||
label: 'ifelse', | ||
kind: monaco.languages.CompletionItemKind.Snippet, | ||
insertText: [ | ||
'if ${1:condition} {', | ||
'\t$0', | ||
'} else {', | ||
'\t', | ||
'}' | ||
].join('\n'), | ||
insertTextRules: monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet, | ||
documentation: 'If-Else Statement', | ||
range: range | ||
}, | ||
{ | ||
label: '$js', | ||
kind: monaco.languages.CompletionItemKind.Snippet, | ||
insertText: [ | ||
'\\$js.toString(()=>{', | ||
'$1', | ||
'})', | ||
].join('\n'), | ||
insertTextRules: monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet, | ||
documentation: '$js工具', | ||
range: range | ||
}, | ||
]; | ||
return snippets; | ||
} | ||
|
||
export { createDependencyProposals } |