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

Plugin doesn't work out of the box #13

Closed
simonmandlik opened this issue Aug 5, 2023 · 9 comments
Closed

Plugin doesn't work out of the box #13

simonmandlik opened this issue Aug 5, 2023 · 9 comments

Comments

@simonmandlik
Copy link

Hi, thanks for working on this cool plugin. I decided to give it a try, because it seemed to have the most features, but can't make it work, even in vanilla vim.

repro.lua:

local root = vim.fn.fnamemodify("./.repro", ":p")
for _, name in ipairs({ "config", "data", "state", "cache" }) do
    vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end
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)

local plugins = {
    -- "Bekaboo/deadcolumn.nvim"
}

require("lazy").setup(plugins, {
    root = root .. "/plugins",
})

vim.cmd[[hi ColorColumn guibg=red]]
vim.cmd[[set textwidth=20]]
vim.cmd[[set colorcolumn=-10,25,+2]]

When I run nvim -u repro.lua test.txt, it works as expected

image

but when I uncomment the line with the plugin, install it and start typing, nothing happens

image
@Normanras
Copy link

@simonmandlik Did you ever revisit this? I remember this plugin working in the past, but it seems inconsistent. I've saved a bunch of debug logs of opening various filetypes and I see deadcolumn setting the ColorColumn, but it's like it doesn't "stick". I tried the same as you with a vanilla neovim instance, but same situation - the column doesn't show with a global cc being set. It's like it has to be set at the buffer or window level with each new buffer.

@Bekaboo
Copy link
Owner

Bekaboo commented Aug 31, 2023

@simonmandlik @Normanras I'am planning rewrite this plugin utilizing the winhl feature instead of changing the user option &cc (which is the current implementation) and that should make it much more stable. Right now this pligin is filled with hacky and unnessarily complecated code because winhl feature has bugs (see neovim/neovim#23016 and neovim/neovim#23227) back when this plugin was written.

@Normanras
Copy link

Awesome! I won't submit any issues then. I realized there was some weird stuff happening as it interacted with other plugins (notably, Folke's Styler), so good to know something more stable is coming. Let me know if you need any help!

@Bekaboo
Copy link
Owner

Bekaboo commented Jan 12, 2024

@Normanras @simonmandlik

This plugin has been refactored to use winhl instead of messing around with cc and should be much stabler and act as expected now, see commit ce15b17, commit 0b27192

@Bekaboo Bekaboo closed this as completed Jan 12, 2024
@simonmandlik
Copy link
Author

I've just tried the MWE from this issue and I am still getting no color column :(

@Bekaboo
Copy link
Owner

Bekaboo commented Jan 13, 2024

@simonmandlik Hi, can you confirm the problem persists using the minimal config and nvim --clean -u minimal.lua? What version of neovim you are using?

@Bekaboo Bekaboo reopened this Jan 13, 2024
@simonmandlik
Copy link
Author

Yes, I'm on v0.10.0-dev-1506+g610f50dda-Homebrew

deadcolumn.mov

@Bekaboo
Copy link
Owner

Bekaboo commented Jan 13, 2024

That's strange, I will see if I can reproduce it using the same version of neovim as yours. Currently I cannot reproduce using dev-2075, the plugin should work on both versions though.

@Bekaboo
Copy link
Owner

Bekaboo commented Jan 14, 2024

@simonmandlik You didn't set &termgicolors. Color blending won't work using only term 16 colors. Try setting it using :set termguicolors.

@Bekaboo Bekaboo closed this as completed Jan 14, 2024
Bekaboo pushed a commit that referenced this issue Jan 14, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants