jakewvincent / mkdnflow.nvim

Fluent navigation and management of markdown notebooks
GNU General Public License v3.0
683 stars 41 forks source link

Bib-file not found (not on default path, not in root directory) #193

Closed lukeflo closed 7 months ago

lukeflo commented 7 months ago

Hey, just encounteres this package and trying to set it up. But unfortunately the Bib-feature is not working.

My setup of mkdnflow looks like this:

modules = {
   bib = true,
   ...
   links = true,
   ...
   cmp = true
},
....
bib = {
  default_path = "/path/to/bibfile.bib",
  find_in_root = true
},

and I also added mkdnflow to nvim-cmp and enabled completion in the setup, as seen above (its only working partially, but thats not the topic here).

My test file looks like that:

# Headliner

A paragraph

[a text](./number-two.md#filer) 

[second one](./number-two.md#secundo) 

@reference_to_bib_entry 

Some text.

But the citation starting with @ gets neither autocompleted, nor is it working at all. If I paste the key in manually and hit Enter with the cursor on the key, I get the error message: ⬇️ Could not find a bib file. The default bib path is currently nil. Fix the path or add a default bib path by specifying a value for the "bib.default_path" key.

But as shown the path is set. I also tried it with a bibfile in the same directory as the md files with the same result. Also toggled some of the options shown above, also same result.

Am I missing something obvious, or what might cause that error?

I'm on Manjaro Linux, up-to-date neovim installation, no treesitter for markdown installed (due to TS issues), also no LSP server installed.

jakewvincent commented 7 months ago

Hi @lukeflo, I believe this should be fixed now. Please pull the latest updates and let me know if the issue persists. (Also, thanks for your contribution @matrig!)