kotlin-language-server icon indicating copy to clipboard operation
kotlin-language-server copied to clipboard

Missing features

Open pajatopmr opened this issue 3 years ago • 3 comments

There are three interesting LSP spec features that appear to be missing from KLS:

  1. goto definition (KLS says it exists via server capabilities but the VsCode plugin (0.2.20) does not show the feature enabled in the Go menu.
  2. goto declaration (no declarationProvider support indicated via server capabilities)
  3. goto implementations (no implementationsProvider support indicated in server capabilities)

@fwcd can you address #1 and provide an off the cuff pseudo code solution for the other two to expedite PRs to address these issues?

pajatopmr avatar Jan 17 '21 14:01 pajatopmr

Go-to-definition currently only works for symbols defined in the project and 'find implementations' is not implemented yet. Not quite sure about the declarations provider though.

'Find implementations' is conceptually similar to 'find references', which KLS does support, so this might be a starting point for a PR there.

fwcd avatar Jan 17 '21 16:01 fwcd

@fwcd When I setup VSCode with the fwcd plugin (0.2.20) the menu item Go to References is not enabled and does not get enabled as I play with cursor positioning and symbol highlighting. I take it it works for you? Hmm.

pajatopmr avatar Jan 19 '21 11:01 pajatopmr

When I test VSCode with the Java version of HelloWorld, the Go menu vs context menu behavior is consistent with KLS. While that makes my software engineer sensitivities gag, it is clearly not a bug.

That said, the Java behavior for goto definition for "println" does the right thing (as does goto implementations) whereas KLS does not. My only hesitancy in claiming this is a bug is that I do not know if the Java LS is set up with access to the stdlib sources and KLS is not. @fwcd Any insight?

pajatopmr avatar Jan 27 '21 21:01 pajatopmr