tpope / vim-fireplace

fireplace.vim: Clojure REPL support
https://www.vim.org/scripts/script.php?script_id=4978
1.75k stars 139 forks source link

Jump to symbol definition with more nuanced keyword defs #382

Closed marrs closed 4 years ago

marrs commented 4 years ago

In order to make search and navigation more useful, I have edited my ~/.vim/after/ftplugin/clojure.clj to include the following:

"setlocal iskeyword-=.
"setlocal iskeyword-=/

This allows me to do things like quick-find (*/#) all variables belonging to a particular namespace in a document, or use w and b to navigate to a particular part of a namespace to edit it.

Unfortunately, this breaks vim-fireplace's "jump to definition" feature for any function that is referenced via its namespace. For example, (my-fun ...) will be found, but (my-ns/my-fun ...) will not, presumably because my redefinition of keyword now treats namespace and variable as two separate entities.

It would be nice for the jump-to-definition feature to be robust enough to cope with these sorts of modifications.

marrs commented 4 years ago

Many thanks. I'll try this out tomorrow