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

How to append vim.api.nvim_get_runtime_file('', true) to Lua.workspace.library? #100

Open
FalcoGer opened this issue Nov 17, 2023 · 1 comment

Comments

@FalcoGer
Copy link

I don't want to manually adjust my workspace library whenever I install or remove a plugin. Luckily vim.api.nvim_get_runtime_file('', true) produces all the paths that nvim's lua interpreter looks for libraries for.
Unfortunately the settings in the coc-configurations are done with a json file and there is no syntax to do a function call there to populate any options, as far as I could gather.
Is there some way to put all those paths into Lua.workspace.library in a different way? Maybe some special string?

@jakubfijalkowski
Copy link

From what I found, you can leverage coc#config to change the configuration at runtime (or use g:coc_user_config). This works for me:

vim.cmd([[
  autocmd FileType lua call coc#config('Lua.workspace.library', nvim_get_runtime_file('', 1))
]])

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

No branches or pull requests

2 participants