Commit ce3664c 1 parent 4c8e630 commit ce3664c Copy full SHA for ce3664c
File tree 2 files changed +9
-6
lines changed
2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -86,11 +86,13 @@ def parse(self,
86
86
if node [- 2 :] == "[]" :
87
87
node = node [:- 2 ]
88
88
89
- if node not in self .symbols : # Not a native type
90
- if node not in code_intel .type_defs : # Path doesn't match denormalized
89
+ if node not in self .symbols : # Not a native type
90
+ self ._hover_value = code_intel .type_defs .get (node )
91
+ if self ._hover_value is None : # Path doesn't match denormalized
91
92
_norm_path = normalized_path (doc_uri , node )
92
- for _type in code_intel .type_defs .keys ():
93
+ for _type , _type_def in code_intel .type_defs .items ():
93
94
if _norm_path == normalized_path (doc_uri , _type ):
95
+ self ._hover_value = _type_def
94
96
break
95
97
else :
96
98
problems += [
@@ -100,9 +102,6 @@ def parse(self,
100
102
severity = DiagnosticSeverity .Error )
101
103
]
102
104
103
- else :
104
- self ._hover_value = code_intel .type_defs [node ]
105
-
106
105
ln = LookupNode (loc = value_range )
107
106
ln .intelligence_node = self
108
107
code_intel .add_lookup_node (ln )
Original file line number Diff line number Diff line change @@ -141,6 +141,10 @@ def test_schemadef_import():
141
141
assert "./paired_end_record.yml#paired_end_options" in [c .label for c in cmpl ]
142
142
# The completer should offer user defined types as completions too
143
143
144
+ hov = doc .hover (Position (4 , 12 ))
145
+ assert "type: record" in hov .contents .value
146
+ # Hover should show contents of included file
147
+
144
148
145
149
def test_schemadef_include ():
146
150
this_path = current_path / "cwl" / "misc" / "cl-schemadef-include.cwl"
You can’t perform that action at this time.
0 commit comments