Skip to content

Commit 755d89a

Browse files
committed
add colorcolumns
1 parent 98a45cf commit 755d89a

File tree

1 file changed

+29
-0
lines changed
  • modules/wrapper-manager/neovim/viper-init-plugin/lua/viper

1 file changed

+29
-0
lines changed

modules/wrapper-manager/neovim/viper-init-plugin/lua/viper/visual.lua

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,3 +199,32 @@ vim.list_extend(require("viper.lazy.specs"), {
199199
end,
200200
},
201201
})
202+
203+
local colorcolumns = {
204+
"rust",
205+
"scheme",
206+
["python"] = 80,
207+
"lua",
208+
}
209+
210+
for key, value in pairs(colorcolumns) do
211+
local lang
212+
local col
213+
214+
if type(key) == "string" then
215+
lang = key
216+
col = value
217+
else
218+
lang = value
219+
col = 100
220+
end
221+
222+
vim.notify(lang .. col)
223+
224+
vim.api.nvim_create_autocmd("FileType", {
225+
pattern = lang,
226+
callback = function()
227+
vim.opt_local.colorcolumn = "" .. col
228+
end,
229+
})
230+
end

0 commit comments

Comments
 (0)