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

Replace purescript-decl-scan-mode from purescript-mode #116

Open
bjarkevad opened this issue Sep 28, 2017 · 1 comment
Open

Replace purescript-decl-scan-mode from purescript-mode #116

bjarkevad opened this issue Sep 28, 2017 · 1 comment

Comments

@bjarkevad
Copy link

While enabling purescript-decl-scan-mode makes imenu queries possible, the solution isn't very robust as it depends on a bunch of regexps. A better solution would be querying psc-ide for a list of declarations in the current buffer.

cc: @kritzcreek

Related discussion:
syl20bnr/spacemacs#9648

@kritzcreek
Copy link
Collaborator

kritzcreek commented Sep 28, 2017

I'm not entirely sure which functions we need to override/implement to hook into imenu, but looking at the description of the feature in the spacemacs issue we should be able to get all the information we need from these two endpoints:

Edit: Actually... at least for the import declarations we don't get sourcespans from the endpoint. I'm not sure how important these are, and in case they are it shouldn't be too hard to find them with a simple regex.

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