MCPcopy
hub / github.com/ternjs/tern_for_vim / tern_lookupDocumentation

Function tern_lookupDocumentation

script/tern.py:255–267  ·  view source on GitHub ↗
(browse=False)

Source from the content-addressed store, hash-verified

253 return result
254
255def tern_lookupDocumentation(browse=False):
256 data = tern_runCommand("documentation")
257 if data is None: return
258
259 doc = data.get("doc")
260 url = data.get("url")
261 if url:
262 if browse: return webbrowser.open(url)
263 doc = ((doc and doc + "\n\n") or "") + "See " + url
264 if doc:
265 vim.command("call tern#PreviewInfo(" + json.dumps(doc) + ")")
266 else:
267 vim.command("echo 'no documentation found'")
268
269def tern_echoWrap(data, name=""):
270 text = data

Callers

nothing calls this directly

Calls 1

tern_runCommandFunction · 0.85

Tested by

no test coverage detected