bitc / vim-hdevtools

Vim plugin for Haskell development
132 stars 25 forks source link

Add bindings for the command 'findsymbol' #17

Open dan-t opened 10 years ago

dan-t commented 10 years ago

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

bitc commented 10 years ago

I'll look over this hopefully soon when I get some time.

dan-t commented 10 years ago

Hi Bit,

the additional changes here are to call the 'findsymbol' command with source files that might contain the desired symbol, to be able to extend the import list by modules of the current project.

Currently there's a quite simple heuristic to find the potenial source files by just grepping through the export list of the module.

So there's certainly room for improvement, but the worst thing that might happen is, that you just can't select some modules of your current project for the import.

Greetings, Daniel

dan-t commented 10 years ago

Perhaps it makes more sense to remove the "grepping" code from vim-hdevtools and let the caller of 'findsymbol' determine the source files.

So that 'findsymbol' would look like:

function! hdevtools#findsymbol(identifier, srcFiles)
   ...

Greetings, Daniel

dan-t commented 10 years ago

I've now changed 'hdevtools#findsymbol' to:

function! hdevtools#findsymbol(identifier, srcFiles)
...

The mostly application specific part of retrieving of the source files is now removed.

Greetings, Daniel

bitc commented 5 years ago

Is there still interesting in this pull request?

dan-t commented 5 years ago

Personally I do not need it anymore. ˋvim-hsimportˋ contains pretty much the code of this pull request.