-
Notifications
You must be signed in to change notification settings - Fork 72
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
[Feature Request]: Hybrid winbar/statusline option for offscreen matches #305
Comments
You should be able to set fullwidth on the popup, does that help?
|
Can you zoom the screenshot out a bit to show more context? |
I think this is a bad interaction with the plugin you're using to draw lines, perhaps https://github.com/lukas-reineke/indent-blankline.nvim? This should be fixable, though. |
That being said, I can't actually reproduce it with indent-blankline.nvim, so I might be missing something |
@andymass Okay, after some testing, it seems like the misalignment has to do with the signcolumn being enabled. ![]() Here are steps to reproduce:
Minimal repro.lua-- 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 = {
{ "catppuccin/nvim", name = "catppuccin" },
{
"andymass/vim-matchup",
init = function()
vim.opt.relativenumber = true
vim.opt.signcolumn = "yes"
vim.g.matchup_matchparen_offscreen =
{ method = "popup", fullwidth = 1, highlight = "Normal", syntax_hl = 1 }
end,
},
}
require("lazy").setup(plugins, {
root = root .. "/plugins",
})
vim.cmd.colorscheme("catppuccin")
-- add anything else here I'll have to look more into the weird symbols (I believe it has to do with the foldcolumn being enabled or nvim-ufo). |
Thanks for the clear reproduction steps. I think I fixed it, let me know if there are more issues. |
Thanks, that seems to have fixed the misalignment for the repro I sent, though I do wonder if there's any way to get the correct foldchar to display or just hide it altogether. Also, on my normal config it seems like line numbers are being incorrectly positioned in the signcolumn instead of the number column. Not entirely sure why, I'll have to investigate it some more. |
Okay, I found the root cause of the issue, it has to do with the fact the statuscolumn is enabled. It was added recently to Neovim 0.9.0, and allows for customization of all the side columns, including right-aligned relative line numbers, moving the signcolumn to the right of the number column, etc. As this is unrelated to the original focus of this issue, I'll just open a new one. |
Is your feature request related to a problem? Please describe.$\Delta$ .
I like the idea of having offscren matches be displayed in the status line, especially for those below the visible window. But it is somewhat unituitive for offscreen matches above to be displayed there, even with a directional indicator symbol
Describe the solution you'd like
It would be cool if we could get an option to display offscreen matches below to display in the status line, and matches above in the winbar.
Describe alternatives you've considered
The
popup
option seems to address the aforementioned issue, but seems to have a limited horizontal width, causing much of the matching pair to be cutoff (e.g. for method headers).The text was updated successfully, but these errors were encountered: