ocaml / merlin

Context sensitive completion for OCaml in Vim and Emacs
https://ocaml.github.io/merlin/
MIT License
1.59k stars 233 forks source link

Vim: Project-wide Occurrences #1767

Closed Julow closed 5 months ago

Julow commented 6 months ago

This adds the :MerlinOccurrencesProjectWide command, that is very similar to :MerlinOccurrences command but passes the -scope project flag and uses the quickfix list instead of the location list.

Project-wide renames are not implemented and I don't think can be implemented easily. The substitution is done on Vim's side and opening an unbounded number of buffers could interact badly with plugins or different Vim configurations. Perhaps project-wide renaming could be implemented by Merlin ?

Project-wide incremental search and rename are not implemented but could be in the future.

The same patch based on top of merlin with occurrences can be tested here: https://github.com/voodoos/merlin/pull/11 To test this, I do:

vim --cmd "set rtp^=vim/merlin" src/analysis/occurrences.ml