lispdocs.nvim icon indicating copy to clipboard operation
lispdocs.nvim copied to clipboard

fetch.lua:79: attempt to index local 'file' (a nil value)

Open samuelludwig opened this issue 2 years ago • 5 comments

I've gotten the same result on two machines: The above error message is the result any time I try to invoke any of the keybinds/commands. These commands are invoked in a rather typical .clj file in a just-as-typical leiningen project. These were encountered on the latest nightly releases of Neovim.

I was trying to parse through some of the source myself, which draws me to the json-parse function, and I'm guessing for some reason the io.open call isn't happy with getting a URL.

I will admit (and this is slightly unrelated), there's a few things in the source here I don't understand, for ex:

  • fetch.fnl line 43, the call to download-fail should be notify.download-fail AFAICT
  • init.fnl line 24, the call to preview confuses me, as I don't know where or how that func is defined?

I'm relatively small-brain still with Aniseed/Neovim-plugin-dev, so I'm not totally sure how to replicate or try to fix things myself, and can't say with total 100% confidence that I'm not just braindead.

samuelludwig avatar Apr 10 '22 16:04 samuelludwig

Got same issue. I'm looking into it

kkharji avatar Apr 10 '22 19:04 kkharji

I'm guessing for some reason the io.open call isn't happy with getting a URL.

Yes that's correct 😆, damn it quick refactoring broke everything, indeed that should've just been get-docs-tmp-path

kkharji avatar Apr 10 '22 19:04 kkharji

Okay got another bug. finer.lua:83, instead of self.state.preview_win it should've been self.state.winid

kkharji avatar Apr 10 '22 19:04 kkharji

Now building funnel files gives me something like

E5108: Error executing lua [string ":lua"]:1: attempt to call field 'float' (a nil value)
stack traceback:
        [string ":lua"]:1: in main chunk

🤔 that's odd

maybe some aniseed api change

somehow this isn't exported

{: display-docs
 :float  #(display-docs (a.merge {:display :float} $1))
 :vsplit #(display-docs (a.merge {:display :vsplit} $1))
 :split  #(display-docs (a.merge {:display :split} $1))
 :normal #(display-docs (a.merge {:display :normal} $1))
 :find finder.find}

kkharji avatar Apr 10 '22 19:04 kkharji

ah wow yeah thats a very cryptic message

samuelludwig avatar Apr 10 '22 22:04 samuelludwig