vim

James Amberger 2023-11-24T02:51:38.318639Z

anyone know how I can get omnicompletion/online doc for web APIs? [originally: I use vim-fireplace and vim-ale; anyone know how I can get omnicompletion/online doc for web APIs?]

Nundrum 2024-04-30T12:37:44.802139Z

I wish I knew. That would be handy.

James Amberger 2023-11-28T12:58:40.183459Z

like for completing methods on js/window, event classes, stuff like that. I hate having to task out to an MDN window

Nundrum 2023-11-28T14:00:30.442129Z

I'm using Conjure and had similar questions that I haven't yet found the answer to. Completion works, but docstring lookups don't. I found that adding [cljs.js :as js] to my require allowed for jumping to the function definition. Maybe something similar would help you with completion?

James Amberger 2023-11-28T17:09:50.489919Z

will try!

James Amberger 2024-04-27T22:09:32.823369Z

bump!

James Amberger 2024-12-30T19:21:51.859669Z

I have made some progress with this.

James Amberger 2024-12-30T19:34:28.998659Z

I was able to get omnicomplete for things like (js/document.querySelec by adding org.rksm/suitable {:mvn/version "0.6.2"} to my shadow-cljs deps and

{:cider false
 :middleware [cider.nrepl/wrap-classpath
              cider.nrepl/wrap-clojuredocs
              cider.nrepl/wrap-complete
              cider.nrepl/wrap-debug
              cider.nrepl/wrap-format
              cider.nrepl/wrap-info
              cider.nrepl/wrap-macroexpand
              cider.nrepl/wrap-ns
              cider.nrepl/wrap-out
              cider.nrepl/wrap-refresh
              cider.nrepl/wrap-stacktrace
              cider.nrepl/wrap-spec
              cider.nrepl/wrap-test
              cider.nrepl/wrap-trace
              cider.nrepl/wrap-undef
              cider.nrepl/wrap-xref
              suitable.middleware/wrap-complete
              refactor-nrepl.middleware/wrap-refactor]}
to my .nrepl/nrepl.edn, which shadow-cljs respects automatically. I am not sure I need refactor-nrepl in there but if you leave it in you’ll need to add it as a dep, too: refactor-nrepl/refactor-nrepl {:mvn/version "3.10.0"}

Nundrum 2024-12-30T21:07:39.063769Z

Oh, that's fantastic.

Nundrum 2024-12-30T21:08:24.976889Z

I'm suddenly imaging a babashka based tool that looks at local clj, local vim, and project-specific config to make recommendations

James Amberger 2024-12-30T22:48:13.811779Z

imagining—you mean having a nightmare?

James Amberger 2024-12-30T22:49:10.697789Z

anyway reading code and docs for cider.nrepl/wrap-complete it makes it seem you don’t need to put this in the config but this is how I got it to work.

Nundrum 2023-11-24T15:57:22.738629Z

Like what, a Swagger-based API? I haven't heard of anything like that, but I can how useful that would be.

James Amberger 2024-03-22T12:24:02.648189Z

Basically I would like to complete things like js/document.|

James Amberger 2024-03-22T12:26:05.799179Z

hmm realizing in general how does anyone do completion of method names given clojure’s (.method obj) syntax