Any example of such editors, I’d like to use them, I don’t have any type hints in vscode with elixir_ls … Or maybe I’m misunderstanding what pk1 and pk2 are in your examples, aren’t they primary keys, that is, basic types like strings or ints? In that case there can’t be any type hint since to the type system pk1 and pk2 would be the same. That coupled with non deterministic order during macro generation the possibility of a typo only increases.
With good editor integration you have auto completion which works for already defined variables, module names and function names. If I remember correctly every compiled module in specific project is added to editor hints in SublimeText 3 with Elixir plugin.
SublimeText 3 should be in your package manager. After you install it you only need to install and configure few plugins. For Elixir I use 2 plugins: Elixir and ElixirSublime + some extra plugins like:
Please take a look at gif - especially at start when you got a hint for Enum.map/2 which is later changed in example to raw data (list and func). Before that change what you got from hint is: Enum.map(collection, fun) (those variable names comes from function definition), so you would not change it for example to: Enum.map(&IO.puts(&1), [1, 2, 3]) by accident (at least not so easy - you need to be really drunk ).
Now let’s assume our macro generated: MyApp.Queries.get_post_comment(comment_id, post_id). However you have cid (short for comment_id) and pid (short for post_id). As same as in example gif variable: collection is changed to [1, 2] and variable fun is changed to &IO.puts(&1) as same you are changing comment_id to cid and post_id to pid without any typo, because again variables are also in auto completion list.
So as long as you use hints you would write MyApp.Queries.get_post_comment(cid, pid) rather than MyApp.Queries.get_post_comment(pid, cid). Hmm … SublimeText 3 is not my dreamed editor, but with such hints I never made similar typo. Well … in my case it’s also not about editor, but also coding habits … I personally really like to write long_descriptive_names rather than ldn (whatever it means).
Hope I described it well. Please let me know if I misunderstand your question. Also sorry for this off-topic.