Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quarto bib location #11

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

jmbuhr
Copy link

@jmbuhr jmbuhr commented Jan 14, 2023

Allows this plugin to also work with bibliography files defined in a _quarto.yml file as used by quarto projects.

refs #5

@ghost
Copy link

ghost commented Dec 20, 2023

I can't seem to get this working (using @jmbuhr's fork). If I do quarto create project book test, cd test, nvim index.qmd and try to type a reference I get no completions. If I add bibliography: reference.bib to frontmatter completion works, and if I rather crudely replace the root detection like this:

- local fname = vim.api.nvim_buf_get_name(0)
- local root = require 'lspconfig.util'.root_pattern('_quarto.yml')(fname)
+ local root = vim.loop.cwd()
if root then
  local file = root .. '/_quarto.yml'
  for line in io.lines(file) do

Then completion works without the bibliography in front matter.

I can't figure out exactly what the lspconfig.util.root_pattern function is doing, but it doesn't seem to return root path as needed (also maybe it's not a good idea to sneak in lspconfig as a dependency?)

For reference this is on Windows 10 with Neovim nightly build from Scoop

@jmbuhr
Copy link
Author

jmbuhr commented Dec 20, 2023

I can not reproduce this using your steps:
image
(Full config: https://github.com/jmbuhr/quarto-nvim-kickstarter/)

But do let me know if you find a minimal reproducible example and open an issue at my fork :)

@ghost
Copy link

ghost commented Dec 21, 2023

I can not reproduce this using your steps:

Well I just tested on my Linux laptop with the same config and it does work out of the box there. I'll have to do more digging to see if I can figure out why it's not working for me on Windows.

But do let me know if you find a minimal reproducible example and open an issue at my fork :)

I think issues are disabled on your fork or something? Would have gone there first, but I don't see the issues tab.

image

@jmbuhr
Copy link
Author

jmbuhr commented Dec 21, 2023

Thank you! I had not realized that. Maybe this is the default for forks. Issues are now enabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant