haskell-vim-now
                                
                                 haskell-vim-now copied to clipboard
                                
                                    haskell-vim-now copied to clipboard
                            
                            
                            
                        hoogle data consumes a lot of space
Installing haskell-vim-now consumed several GB of space on my VM. Most of it due to hoogle database creation. Should hoogle database creation be left to the user instead?
That's odd, the hoogle database on my system is only 8.8mb.
One thing that takes up space is Stack's sandbox. It contains the packages needed to build the helper binaries for haskell-vim-now. However you'll need to build a Stack sandbox at some point anyway if you want to create haskell programs.
Can you supply more information about exactly which files/folders take up the most space and how much it is?
I had stack installed and in heavy use already so I expected that it wouldn't consume any more space. I have seen the hoogle problem before as well. Here goes some du output:
cueball:~/.stack/snapshots/x86_64-linux/lts-5.2/7.10.3/share/x86_64-linux-ghc-7.10.3/hoogle-4.2.43(master)*$ du -sm databases/
1328    databases/
cueball:~/.stack/snapshots/x86_64-linux/lts-5.2/7.10.3/share/x86_64-linux-ghc-7.10.3/hoogle-4.2.43/databases(master)*$ du -sm downloads/
1293    downloads/
1.3 G in databases dir. Out of that almost all is in downloads. Let's see what's inside:
cueball:~/.stack/snapshots/x86_64-linux/lts-5.2/7.10.3/share/x86_64-linux-ghc-7.10.3/hoogle-4.2.43/databases/downloads(master)*$ du -sm *
1   base.txt
1   base.txt.cache
604 cabal
3   cabal.index
218 cabal.tar
11  cabal.tar.gz
278 hoogle
1   hoogle.index
153 hoogle.tar
27  hoogle.tar.gz
1   keyword.htm
1   keyword.htm.cache
1   platform.cabal
1   platform.cabal.cache
I see what you mean!
$ du -d 1 -h ~/.stack/snapshots/x86_64-osx/lts-5.12/7.10.3/share/x86_64-osx-ghc-7.10.3/hoogle-4.2.43/databases
 20K    ./snapshots/x86_64-osx/lts-5.12/7.10.3/share/x86_64-osx-ghc-7.10.3/hoogle-4.2.43/databases/.shake
936M    ./snapshots/x86_64-osx/lts-5.12/7.10.3/share/x86_64-osx-ghc-7.10.3/hoogle-4.2.43/databases/downloads
971M    ./snapshots/x86_64-osx/lts-5.12/7.10.3/share/x86_64-osx-ghc-7.10.3/hoogle-4.2.43/databases
Oddly the .hoo databases aren't very big, it's that huge downloads directory. Maybe there's a way to find it and clean it up during haskell-vim-now install.
It looks like Stack will soon handle hoogle. When this is merged https://github.com/commercialhaskell/stack/pull/1939 then we can add a key binding to run stack hoogle -- generate --local and remove the hoogle data from our installer.
Will this be able to provide a "jump to definition" functionality? I'm really looking forward to that.
Actually this functionality already exists. If you press ,tg (aka "leader Tag Generate") it uses codex to create a ctags file for your project and all the dependencies. If you then press CTRL-] on a symbol it will jump you to the definition, even in library files.
YES! I was really hoping you were going to say that!
Coincidentally I had tried CTRL-] right before my first reply, but I had missed the ,tg step. This is great :)
Do you think the ,tg step could be better communicated in the readme? If so, care to send a pull request to improve that?
Done ;)
Another thing to note is that ,tg does not work unless your current directory is the one which has .cabal file.
We can look for a .cabal in the parent dirs and generate tags if we find one rather than forcing the user to be in that same directory for generating tags.
Thanks - I didn't run into that problem because other bad things happen when I start my editor in a directory other than the one with the .cabal file, so it's habitual that I always run vim from the project root.