def create_phantom(view: sublime.View, diagnostic: Diagnostic) -> sublime.Phantom:
region = diagnostic.range.to_region(view)
# TODO: hook up hide phantom (if keeping them)
content = create_phantom_html(diagnostic.message)
return sublime.Phantom(
region,
'<p>' + content + '</p>',
sublime.LAYOUT_BELOW,
lambda href: on_phantom_navigate(view, href, region.begin())
)
评论列表
文章目录