-
Notifications
You must be signed in to change notification settings - Fork 25
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
Add bindings for the command 'findsymbol' #17
base: master
Are you sure you want to change the base?
Conversation
I'll look over this hopefully soon when I get some time. |
To be able to extend the import list also by modules of the current project, 'findsymbol' needs to get the source files, where it should search for the desired symbol. A project might contain a lot of source files, so we can't just take every source file, because the loading of each file with GHC might take some time. Currently a quite simple heuristic is used to find the source files, by using 'grep' and having a regex, which should match if the symbol is explicitely exported from the module. Currently the regex matches only export lists of the form: module Blub ( symbol1 , symbol2 ) where
Hi Bit, the additional changes here are to call the 'findsymbol' command with source Currently there's a quite simple heuristic to find the potenial source So there's certainly room for improvement, but the worst thing that might Greetings, |
Perhaps it makes more sense to remove the "grepping" code from vim-hdevtools So that 'findsymbol' would look like:
Greetings, |
Remove the mostly application specific part of retrieving the source files for the 'findsymbol' command.
I've now changed 'hdevtools#findsymbol' to:
The mostly application specific part of retrieving of Greetings, |
This makes it possible to have multiple haskell projects loaded inside one vim instance and a working hdevtools for each project.
This reverts commit 4d2acd3. Buffer local options don't harmonize very well with other vim plugins like syntastic, which looks only after the global options.
This reverts commit e4b9178. vim plugins like Syntastic don't use the hdevtools vim functions, they just call the hdevtools binary and use the g:hdevtools_options variable, so the separate option g:hdevtools_src_dir isn't considered. So it's better to add the source dir to the g:hdevtools_options, that it's also considered by Syntastic.
Is there still interesting in this pull request? |
Personally I do not need it anymore. ˋvim-hsimportˋ contains pretty much the code of |
Hi Bit,
the hsimport command and the Vim plugin vim-hsimport are now using the 'findsymbol' command.
https://github.com/dan-t/hsimport
https://github.com/dan-t/vim-hsimport
Is there any chance to get my additions of hdevtools and vim-hdevtools merged?
Greetings,
Daniel