smartcolumn.nvim icon indicating copy to clipboard operation
smartcolumn.nvim copied to clipboard

Only Custom Color Columns

Open KyleKing opened this issue 1 year ago • 1 comments

It would be nice if setting colorcolumn=false or colorcolumn={} would allow me to specify only columns for the those in custom_colorcolumn

Example from my dotfiles: https://github.com/KyleKing/nvim/commit/6eeab6a92827481eaaecd12b24f544c8fe198611#diff-6440fc418c30973e4f616e94d3cd5df3745402b48c2cfbf7ec7df6857f795cc2

I set the value to 999 to hide the color column in most cases

KyleKing avatar Feb 12 '24 05:02 KyleKing

Hey Kyle, I assume you mean to have the colorcolumn only in filetypes you've configured?

I don't know if you're still dealing with this issue, but have you considered setting the colorcolumn (config) value to "" (empty string)? I took a quick look at the code, and I don't see any reason why this shouldn't work. It's Neovim's default value for the CC, so it's not even a hack or anything.

...or, if I'm allowed a bit of shameless self-promotion, I wrote a plugin that I intended to use that way from the very start. It has a use_default_set config option you can set to false to explicitly disable default colorcolumns like that.

That said, the empty string strategy doesn't require switching plugins and should serve you just fine.

fmbarina avatar Jul 10 '24 09:07 fmbarina

Thanks for chiming in, but setting the value to "" raises errors that a number is expected. Setting the value to 999 has been fine, so I'll consider this issue resolved

I'll take a look at your plugin! (https://github.com/KyleKing/nvim/commit/697cf622110a7bc8e616379e7960450f66ece2e9#diff-aa0fcbd769f1dd90eee7e24fb340b2fb0f71adcc1d2a1257346ab8766f44070c)

KyleKing avatar Sep 26 '24 23:09 KyleKing