英文:
Decoration below line
问题
I want to make an extension that shows error in a similar way to the lsp_lines:
I looked the DecorationInstanceRenderOptions and only found before and after options, but I think that is no option to render below. Maybe there is a way the render using the after option, but breaking the line and display the content below the original line?
英文:
I want to make an extension that shows error in a similar way to the lsp_lines:
I looked the DecorationInstanceRenderOptions and only found before and after options, but I think that is no option to render below. Maybe there is a way the render using the after option, but breaking the line and display the content below the original line?
答案1
得分: 0
对于该UI,目前没有可用的API。装饰器不会创建您所需的“虚拟行”,而是会出现在接下来的行之上。
VS Code本身有https://code.visualstudio.com/Docs/editor/editingevolved#_reference-information,这提供了一种“有点像”的虚拟行,但位于该行的上方。有了这样的功能,我想这是一个不错的开始。
还有https://code.visualstudio.com/Docs/editor/editingevolved#_errors-warnings,但它只会显示一个当前打开的,而不像装饰器那样显示多个。
此外,还有这个功能请求https://github.com/microsoft/vscode/issues/3220,它要求自定义的查看。
如果这些方法都不适用于您,建议您在VS Code存储库中提出功能请求。
希望这有所帮助。
英文:
There is no API available for that UI. The decorators won’t create the virtual lines you have but instead, will be presented over the next lines.
VS Code itself has https://code.visualstudio.com/Docs/editor/editingevolved#_reference-information, which presents kind of the same virtual line, but above the line. Having such feature available, I suppose, is a good start.
There is also https://code.visualstudio.com/Docs/editor/editingevolved#_errors-warnings, but it is something that only displays one open at a given time, not many like decorators.
And, there is this feature request https://github.com/microsoft/vscode/issues/3220, which asks for custom peeks.
If none of this works for you, I suggest you to open a feature request in VS Code repo.
Hope this helps
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论