tonini / alchemist.el

Elixir Tooling Integration Into Emacs
http://www.alchemist-elixir.org
906 stars 103 forks source link

Feature Request: Create function if goto-definition-at-point returns nothing #328

Open randre03 opened 6 years ago

randre03 commented 6 years ago

Often I will write a function name into a sequence of pipes. It would be great if when calling alchemist-goto-definition-at-point would create that function if it cannot find it, instead of returning "Don't know how to find:"

gausby commented 6 years ago

My gut feeling says that this would be hard and error prone: What if the definition at point is executed while looking at a module/fun with a spelling mistake? That would insert boilerplate code in the module that needs to get removed…and what if the module is misspelled? Would it create a new module?

…and speaking of boilerplate code: what should it insert as the function definition? And where in the file?

I think it is much better to get the «don't know how to find: …»-message so you can correct the spelling mistake, or insert the fun where you want it in the module.