Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for "Go to Symbol in Workspace" (Ctrl+T) possible? #23

Open
4 tasks
istathar opened this issue Mar 12, 2019 · 1 comment
Open
4 tasks

Support for "Go to Symbol in Workspace" (Ctrl+T) possible? #23

istathar opened this issue Mar 12, 2019 · 1 comment

Comments

@istathar
Copy link

Status

  • A workaround is available
  • A fix is written
  • A fix is released
  • The fixed verison is on the marketplace.

  • Version of vscode-ghc-simple: 0.0.10
  • Version of VSCode: 1.31.1
  • Version of Haskell-related tools: GHC 8.6.4, stack 1.9.3

Steps to reproduce

Once you've got an active Haskell workspace, you should be able to type Ctrl+T and then begin entering the name of a function. A list of possible locations for that string should appear. You can select one, and jump there. It'd be awesome.

Ideally, the plugin would populate whatever index provider is in Code so that this (and lookup within current file, Ctrl+Shift+O) would work.

Since vscode-ghc-simple is about being a wrapper over ghci, the first question would seem to be "can we extract/build a symbol list from ghci?". In so far as you were able to build a list for Ctrl+Space completions it seems likely! Then we need to figure out how to inject that to $wherever that Code wants it so that the "Go to Symbol in Workspace..." functionality works.

AfC

@dramforever
Copy link
Owner

Sorry for the lack of response. I honestly don't know how I managed to leave this issue without a reply for so long.

In so far as you were able to build a list for Ctrl+Space completions it seems likely!

I just used the :complete command and fed it the (with some processing to try to improve the quality a bit) which is literally what you get pressing Tab at the prompt.

The closest thing to a symbol list is :ctags or :etags, which generates a tags or TAGS file for all the modules. I'll probably need to figure it out a way to generate these, since I apparently need to load every module in the workspace interpreted. Then I'll direct the output to some temporary directory and read from there.

I'll see what I can do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants