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

bug: coc.nvim local settings are not loaded correctly #49

Open
3 tasks done
statiolake opened this issue Nov 10, 2023 · 0 comments
Open
3 tasks done

bug: coc.nvim local settings are not loaded correctly #49

statiolake opened this issue Nov 10, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@statiolake
Copy link

Did you check docs and existing issues?

  • I have read all the neoconf.nvim docs
  • I have searched the existing issues of neoconf.nvim
  • I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)

0.10.0-dev-1456+g4c32927084

Operating system/version

EndeavourOS x86_64 (6.5.9-arch2-1)

Describe the bug

coc.nvim's local config file is not loaded.

I think this part should be .vim/coc-settings.json instead of coc-settings.json, since coc.nvim creates local settings there:

pattern = "coc-settings.json",

(This path is documented in coc.nvim: https://github.com/neoclide/coc.nvim/blob/e3f91b5ed551ae95d1f5c3b75f557f188ad17b52/doc/coc.txt#L241.)

Steps To Reproduce

  1. Install coc.nvim in your Neovim and create local settings file with :CocLocalConfig.
  2. Write some test configuration in the opened buffer and save it, {"test.config.foo": "test"} for example.
  3. Restart Neovim and open some file (:e test.txt).
  4. Check :Neoconf. The config is not loaded in neoconf side.
  5. Check that config is loaded in coc.nvim side by echo coc#util#get_config('test.config'). It should return {"foo": "test"}.

Expected Behavior

Neoconf loads the local coc.nvim settings.

Repro

-- DO NOT change the paths and don't remove the colorscheme
local root = vim.fn.fnamemodify("./.repro", ":p")

-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
  vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end

-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
  vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath, })
end
vim.opt.runtimepath:prepend(lazypath)

-- install plugins
local plugins = {
  "folke/tokyonight.nvim",
  "folke/neoconf.nvim",
  "neovim/nvim-lspconfig",
  {"neoclide/coc.nvim", branch = "release"},
}
require("lazy").setup(plugins, {
  root = root .. "/plugins",
})

vim.cmd.colorscheme("tokyonight")
-- add anything else here
@statiolake statiolake added the bug Something isn't working label Nov 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant