definition.py 文件源码

python
阅读 28 收藏 0 点赞 0 评论 0

项目:LSP 作者: tomv564 项目源码 文件源码
def handle_response(self, response, position):
        window = sublime.active_window()
        if response:
            location = response if isinstance(response, dict) else response[0]
            file_path = uri_to_filename(location.get("uri"))
            start = Point.from_lsp(location['range']['start'])
            file_location = "{}:{}:{}".format(file_path, start.row + 1, start.col + 1)
            debug("opening location", location)
            window.open_file(file_location, sublime.ENCODED_POSITION)
            # TODO: can add region here.
        else:
            window.run_command("goto_definition")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号