Using brackets and chinese to trigger code hint
I have some custom keywords , when it made up by english ,it can works
Now the situation is I have some custom keywords made up by "[" 、"]" and chinese like [结果.属性] , but when I input "[" or “结果”, it can not showing suggestions ;
I tried use "editor.current.trigger("text", "editor.action.triggerSuggest", {});” in onDidChangeModelContent event, but when the words are not match,it always showing "no suggestions";
and I tried set "[" in triggerCharacters, but there will be two "["
those are not my expectation
so is there a correct way to trigger code hint when input brackets and chinese?
OK I find a way by handle it in onDidChangeModelContent
OK I find a way by handle it in
onDidChangeModelContent
我遇到了同样的问题,大佬求教怎么让中文字符触发生效呀~
OK I find a way by handle it in
onDidChangeModelContent我遇到了同样的问题,大佬求教怎么让中文字符触发生效呀~
纯中文字符的话应该在createDependencyProposals里用自定义的关键字列表返回suggestions数组就行了吧,高亮的话参考文档playground的自定义主题和令牌
我之前的需求是中括号触发,这个内部完全不识别为关键字,只能在onDidChangeModelContent的回调里手动读取当前输入文本,然后字符串匹配处理了,匹配到了调editorRef.current.trigger("","editor.action.triggerSuggest", {});手动让联想面板出来
学习了,多谢大佬赐教