You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the existing issues of plugins related to this issue
Neovim version (nvim -v)
NVIM v0.9.4
Operating system/version
macOS 14.0
Describe the bug
When enabling both noice and oil.nvim, the global conceallevel is modified after using the search function in an oil buffer. I suspect this behavior would occur in other situations where window-local options are set, but the included example uses oil.nvim because that's where I encountered it.
I'm not particularly well versed in how set/setlocal/setglobal options vs. window/buffer options are meant to work, but my guess is that the issue is here:
And seems to fix the issue I'm experiencing locally, but figured I'd report the behavior and explain my reasoning rather than submit the fix as a guess when I don't fully understand what the other implications of that change my might be.
Steps To Reproduce
nvim -u repro.lua .
You may need to exit and run this again, oil doesn't seem to hijack the file explorer in the same session that it's installed
:= vim.go.conceallevel
Prints 0
/<esc>
When you type /, the conceallevel will change and numbers will be visible to the left of files in the directory
When you press <esc>, the conceallevel will revert to its previous value
No need to search for any text or confirm
:= vim.go.conceallevel
Prints 3
Expected Behavior
The global conceallevel should be restored to its original value (0) after the search command finishes.
Repro
-- DO NOT change the paths and don't remove the colorschemelocalroot=vim.fn.fnamemodify("./.repro", ":p")
-- set stdpaths to use .reprofor_, nameinipairs({ "config", "data", "state", "cache" }) dovim.env[("XDG_%s_HOME"):format(name:upper())] =root.."/" ..nameend-- bootstrap lazylocallazypath=root.."/plugins/lazy.nvim"ifnotvim.loop.fs_stat(lazypath) thenvim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath, })
endvim.opt.runtimepath:prepend(lazypath)
-- install pluginslocalplugins= {
"folke/tokyonight.nvim",
{
"folke/noice.nvim",
dependencies= {
"MunifTanjim/nui.nvim",
},
opts= {},
},
-- add any other plugins here
{ "stevearc/oil.nvim", opts= {} },
}
require("lazy").setup(plugins, {
root=root.."/plugins",
})
vim.cmd.colorscheme("tokyonight")
-- add anything else here
The text was updated successfully, but these errors were encountered:
Did you check docs and existing issues?
Neovim version (nvim -v)
NVIM v0.9.4
Operating system/version
macOS 14.0
Describe the bug
When enabling both noice and oil.nvim, the global conceallevel is modified after using the search function in an oil buffer. I suspect this behavior would occur in other situations where window-local options are set, but the included example uses oil.nvim because that's where I encountered it.
I'm not particularly well versed in how set/setlocal/setglobal options vs. window/buffer options are meant to work, but my guess is that the issue is here:
noice.nvim/lua/noice/util/hacks.lua
Lines 55 to 79 in 8f1b53a
Where setting
vim.wo.conceallevel
also modifiesvim.go.conceallevel
.From reading the help docs I think this might be more appropriate:
And seems to fix the issue I'm experiencing locally, but figured I'd report the behavior and explain my reasoning rather than submit the fix as a guess when I don't fully understand what the other implications of that change my might be.
Steps To Reproduce
nvim -u repro.lua .
:= vim.go.conceallevel
/
<esc>
/
, the conceallevel will change and numbers will be visible to the left of files in the directory<esc>
, the conceallevel will revert to its previous value:= vim.go.conceallevel
Expected Behavior
The global conceallevel should be restored to its original value (0) after the search command finishes.
Repro
The text was updated successfully, but these errors were encountered: