From d7be014c548d5910ba2cdbc181c0efcec6409b73 Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Sat, 2 Jan 2021 12:15:20 +0100 Subject: [PATCH] Namespaces cannot be shown properly, fixes #815 This only works with Jedi commit 2ec3d72151d1072fa22861aef07ba6fc170e3781 Once using that commit, namespaces will be used properly. --- pythonx/jedi_vim.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pythonx/jedi_vim.py b/pythonx/jedi_vim.py index 845bb64..70a524c 100644 --- a/pythonx/jedi_vim.py +++ b/pythonx/jedi_vim.py @@ -420,8 +420,11 @@ def _goto_specific_name(n, options=''): if n.is_keyword: echo_highlight("Cannot get the definition of Python keywords.") else: - echo_highlight("Builtin modules cannot be displayed (%s)." - % (n.full_name or n.name)) + name = 'Namespaces' if n.type == 'namespace' else 'Builtin modules' + echo_highlight( + "%s cannot be displayed (%s)." + % (name, n.full_name or n.name) + ) else: using_tagstack = int(vim_eval('g:jedi#use_tag_stack')) == 1 result = set_buffer(n.module_path, options=options,