Fork me on GitHub
#emacs
<
2019-10-20
>
yuhan02:10:08

Does anyone have a good workflow for autocompleting file names relative to the project root folder?

yuhan02:10:05

I use company-files but it only suggests paths relative to the current file, which is not how things work in Clojure

vemv03:10:41

maybe you can research/tweak how company-files determines the "root node"

yuhan02:10:51

Yeah I tried for a bit and gave up, just found it strange that there isn't an existing solution for this 😕

yuhan02:10:49

given that other editors like VS Code have this functionality built in

futuro00:10:24

I use ivy and projectile, and there’s a command to choose a file in the project with ivy. I can copy the path of some file I find this way, and that’s how I’ve accomplished this in the past.

futuro00:10:34

Helm has something similar

futuro00:10:22

I’m not at my laptop atm, but if you look through the ivy docs, you’re looking for one of the minibuffer commands.

yuhan02:10:48

eg. I'm in my-project/src/foo/bar.clj and I want to get to (io/file "resources/images/a489967e.jpg") without opening a file manager or prefixing the file name with some number of ../../ to delete afterwards

ag05:10:50

have you tried find-file-at-point?

tianshu08:10:58

How can I create a minor mode that will enable in every buffer except the minibuffer?