signature_help.py 文件源码

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

项目:LSP 作者: tomv564 项目源码 文件源码
def handle_response(self, response, point):
        if response is not None:
            self._signatures = response.get("signatures", [])
            self._active_signature = response.get("activeSignature", -1)

            if self._signatures:
                if not 0 <= self._active_signature < len(self._signatures):
                    debug("activeSignature {} not a valid index for signatures length {}".format(
                        self._active_signature, len(self._signatures)))
                    self._active_signature = 0
            else:
                if self._active_signature != -1:
                    debug("activeSignature should be -1 or null when no signatures are returned")
                    self._active_signature = -1

            if len(self._signatures) > 0:
                mdpopups.show_popup(self.view,
                                    self._build_popup_content(),
                                    css=popup_css,
                                    md=True,
                                    flags=sublime.HIDE_ON_MOUSE_MOVE_AWAY,
                                    location=point,
                                    wrapper_class=popup_class,
                                    max_width=800,
                                    on_hide=self._on_hide,
                                    on_navigate=lambda href: self._on_hover_navigate(href))
                self._visible = True
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号