julia-vscode / SymbolServer.jl

Other
23 stars 31 forks source link

show method locations #166

Closed aviatesk closed 4 years ago

aviatesk commented 4 years ago

make it more consistent with Base's print:

Base.bitshow is a Function.

  # 2 methods for generic function "bitshow":
  [1] bitshow(io::IO, B::BitArray) in Base at show.jl:2256
  [2] bitshow(B::BitArray) in Base at show.jl:2265
pfitzseb commented 4 years ago

We should be able to convert those paths into clickable links, no? This is interpreted as markdown by VSCode after all.

aviatesk commented 4 years ago

no, I tried that at first, but LSP doesn't support MarkdownString, which can make links to invoke vscode commands:

It actually only supports MarkedString (deprecated in vscode side) and MarkupContent currently: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_hover

pfitzseb commented 4 years ago

Argh...

So a normal markdown link like [show.jl:2256](~/blah/show.jl:2256) doesn't work?

aviatesk commented 4 years ago

ops, vscode seems to automatically handles those links (i.e. open editors in vscode). Will try to improve.

aviatesk commented 4 years ago

But making those links should be done in LangaugeServer.jl side, so I think this PR can be merged as is.