typeahead - 在引号内禁用 completionItemProvider
问题描述
我已经成功地用来monaco.languages.registerCompletionItemProvider
填充完成列表。摩纳哥有什么办法可以检测光标何时在单引号或双引号之间并暂时停用完成提供程序?
解决方案
Yes, you can embed any kind of logic into your CompletionItemProvider
. You can use the provdied Position
and parse the file to figure out if you are inside single or double quotes and then return a []
accordingly.
推荐阅读
- amazon-ec2 - 如何在 AWS 上自动扩展 Kubernetes 工作节点
- performance - Neo4j 3.5 - 在我的 12B 关系图上仅搜索关系非常慢 - 如何提高性能?
- wordpress - 使用选项树插件的 create_function() 已折旧
- react-native - 如何在 Visual Studio Code 中调试 react-native
- java - 在 Windows 10 上执行可运行 jar 文件的问题
- c# - 使用现有列表中特定索引处的元素创建一个新列表
- c# - 协助在 C# 中设置类和对象
- jquery - ESRI Javascript API 中的 jQuery 自动完成:数组显示重复值
- jquery - Jquery 没有加载 laravel 5.7
- python - Keras - 在 ImageDataGenerator 中正确使用 preprocess_input