Listener.py 文件源码

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

项目:sublimeTextConfig 作者: luoye-fe 项目源码 文件源码
def on_query_completions(self, view, prefix, locations):
        project = get_or_create_project_and_add_view(view)
        if project and project.is_initialized():
            pos = view.sel()[0].begin()
            (line, col) = view.rowcol(pos)
            Debug('autocomplete', "on_query_completions(), sublime wants to see the results, cursor currently at %i , %i (enabled: %s, items: %i)" % (line+1, col+1, project.completion.enabled_for['viewid'], len(project.completion.get_list()) ) )

            if project.completion.enabled_for['viewid'] == view.id():
                project.completion.enabled_for['viewid'] = -1 # receive only once
                return (project.completion.get_list(), sublime.INHIBIT_WORD_COMPLETIONS | sublime.INHIBIT_EXPLICIT_COMPLETIONS)


    # ON QUERY CONTEXT (execute commandy only on opened .ts files)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号