folke / neoconf.nvim

💼 Neovim plugin to manage global and project-local settings
Apache License 2.0
715 stars 29 forks source link

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

Closed statiolake closed 2 months ago

statiolake commented 11 months ago

Did you check docs and existing issues?

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:

https://github.com/folke/neoconf.nvim/blob/64437787dba70fce50dad7bfbb97d184c5bc340f/lua/neoconf/import.lua#L16

(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
github-actions[bot] commented 3 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] commented 2 months ago

This issue was closed because it has been stalled for 7 days with no activity.