def notify_did_open(view: sublime.View):
config = config_for_scope(view)
client = client_for_view(view)
if client and config:
view.settings().set("show_definitions", False)
window = view.window()
view_file = view.file_name()
if window and view_file:
if not has_document_state(window, view_file):
ds = get_document_state(window, view_file)
if settings.show_view_status:
view.set_status("lsp_clients", config.name)
params = {
"textDocument": {
"uri": filename_to_uri(view_file),
"languageId": config.languageId,
"text": view.substr(sublime.Region(0, view.size())),
"version": ds.version
}
}
client.send_notification(Notification.didOpen(params))
评论列表
文章目录