Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Make sure your queries are in your runtimepath. Debug like so: :lua= vim.api.nvim_get_runtime_file(string.format("queries/%s/%s.scm", 'groovy', 'folds'), true). And append to your runtime path like so: :lua vim.opt.rtp:append(vim.fn.stdpath 'config' .. 'my_dir')
It seems like the vim.lsp.log module has to be required. Oooooooooooooooooh. This will pay dividends in every other case. I was confused by :lua= vim and :lua= vim.lsp BOTH not returning nil, but I guess I never checked that :lua= vim.lsp.log returned nil as well. Once you got it to NOT return nil for me via the require, everything just works as expected.
Oh interesting. So I should be using functions that require the plugin code instead of opt to delay loading a plugin. My use case is that I'm using copilot.nvim and I don't wanna load it until I manually load it. I'm sure I can trivially figure out what specific config delays loading of the plugin and also write a small command that lets me load it later. It's just stupid that I can't use the perfectly fine packadd command to do this. Maybe I'll just make a command that runs setup and THEN calls packadd. Exactly as u said