-
Notifications
You must be signed in to change notification settings - Fork 27
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
Hide colorcolumn when not needed #89
Comments
good idea, I will take a look |
unnecessary if using Bekaboo/deadcolumn.nvim |
@daUnknownCoder Have you used it in practice? Wonder if it doesn't conflict with |
and because this feat will add a new mod, please give me some time to consider how to implement it. Maybe a few weeks... I'm now try my best to improve the performance of existing mods |
i use both and it is very good: My hlchunk+deadcolumn config !click me
{
"shellRaining/hlchunk.nvim",
event = { "LazyFile" },
lazy = true,
dependencies = {
{
"https://gitlab.com/HiPhish/rainbow-delimiters.nvim",
name = "rainbow-delimiters.nvim",
url = "https://gitlab.com/HiPhish/rainbow-delimiters.nvim",
event = "VeryLazy",
lazy = true,
},
},
config = function()
local hlchunk_status_ok, hlchunk = pcall(require, "hlchunk")
if not hlchunk_status_ok then
print("hlchunk not found!")
end
hlchunk.setup({
chunk = {
enable = true,
priority = 15,
notify = true,
style = {
"#5ef33e",
"#c21f30",
},
chars = {
horizontal_line = "─",
vertical_line = "│",
left_top = "╭",
left_bottom = "╰",
right_arrow = ">",
},
textobject = "ic",
duration = 250,
error_sign = true,
exclude_filetypes = {
aerial = true,
dashboard = true,
fidget = true,
NvimTree = true,
TelescopePrompt = true,
cmp = true,
cmp_docs = true,
},
},
indent = {
enable = true,
chars = {
"▎",
},
style = {
"#E06C75",
"#E5C07B",
"#61AFEF",
"#D19A66",
"#98C379",
"#C678DD",
"#56B6C2",
},
exclude_filetypes = {
aerial = true,
dashboard = true,
fidget = true,
NvimTree = true,
TelescopePrompt = true,
cmp = true,
cmp_docs = true,
},
},
line_num = {
enable = true,
style = "#C678DD",
exclude_filetypes = {
aerial = true,
dashboard = true,
fidget = true,
NvimTree = true,
TelescopePrompt = true,
cmp = true,
cmp_docs = true,
},
},
blank = { enable = false },
})
local rainbow_delimiters_status_ok, rainbow_delimiters = pcall(require, "rainbow-delimiters")
if not rainbow_delimiters_status_ok then
print("rainbow-delimiters not found!")
end
vim.g.rainbow_delimiters = {
strategy = {
[""] = rainbow_delimiters.strategy["global"],
vim = rainbow_delimiters.strategy["local"],
commonlisp = rainbow_delimiters.strategy["local"],
html = rainbow_delimiters.strategy["local"],
latex = function(bufnr)
local line_count = vim.api.nvim_buf_line_count(bufnr)
if line_count > 10000 then
return nil
elseif line_count > 1000 then
return rainbow_delimiters.strategy["global"]
end
return rainbow_delimiters.strategy["local"]
end,
},
query = {
[""] = "rainbow-delimiters",
lua = "rainbow-blocks",
latex = "rainbow-blocks",
query = function(bufnr)
local is_nofile = vim.bo[bufnr].buftype == "nofile"
return is_nofile and "rainbow-blocks" or "rainbow-delimiters"
end,
},
priority = {
[""] = 110,
lua = 210,
},
highlight = {
"RainbowDelimiterRed",
"RainbowDelimiterYellow",
"RainbowDelimiterBlue",
"RainbowDelimiterOrange",
"RainbowDelimiterGreen",
"RainbowDelimiterViolet",
"RainbowDelimiterCyan",
},
}
end,
},
{
"Bekaboo/deadcolumn.nvim",
lazy = true,
event = { "LazyFile" },
config = function()
require("deadcolumn").setup({
scope = "line",
blending = {
threshold = 0.75,
colorcode = "#000000",
hlgroup = { "Normal", "bg" },
},
warning = {
alpha = 0.4,
offset = 0,
colorcode = "#FF0000",
hlgroup = { "Error", "bg" },
},
})
end,
}, |
@shellRaining It's not mandatory to have this feature. Hlchunk is perfect enough and my proposal is just an idea to consider. Best. 😉 |
😄 glad that you like this plugin, I feel that this feature is very good, and I will try to implement a version when I have the need! close temporarily |
I think it would be nice to make hiding colorcolumn configurable. See demo below:
Taken from smartcolumn.nvim
The text was updated successfully, but these errors were encountered: