folke / which-key.nvim

💥 Create key bindings that stick. WhichKey helps you remember your Neovim keymaps, by showing available keybindings in a popup as you type.
Apache License 2.0
5.12k stars 163 forks source link

bug: concellevel being set where it shouldn't #641

Closed pejrich closed 1 month ago

pejrich commented 1 month ago

Did you check docs and existing issues?

Neovim version (nvim -v)

latest

Operating system/version

latest

Describe the bug

https://github.com/folke/which-key.nvim/blame/a86e9d3c0023f985344014bf2b7cb15e0be8fa2b/lua/which-key/util.lua#L105

This is setting the conceal level for regular files. I noticed when I opened a json file and the quotation marks where all missing. verbose set conceallevel led me to this line in which-key.

Steps To Reproduce

-

Expected Behavior

-

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/which-key.nvim", opts = {} },
  -- add any other plugins here
}
require("lazy").setup(plugins, {
  root = root .. "/plugins",
})

vim.cmd.colorscheme("tokyonight")
-- add anything else here