nvf/modules/ui/smartcolumn/config.nix

27 lines
660 B
Nix
Raw Normal View History

2023-04-05 13:58:56 +00:00
{
pkgs,
config,
lib,
...
}: let
inherit (lib) mkIf nvim concatStringsSep;
2023-04-05 13:58:56 +00:00
cfg = config.vim.ui.smartcolumn;
in {
config = mkIf cfg.enable {
vim.startPlugins = [
"smartcolumn"
];
vim.luaConfigRC.smartcolumn = nvim.dag.entryAnywhere ''
require("smartcolumn").setup({
2023-06-04 14:36:01 +00:00
colorcolumn = "${toString cfg.showColumnAt}",
-- { "help", "text", "markdown", "NvimTree", "alpha"},
disabled_filetypes = { ${concatStringsSep ", " (map (x: "\"" + x + "\"") cfg.disabledFiletypes)} },
custom_colorcolumn = ${nvim.lua.attrsetToLuaTable cfg.columnAt.languages},
scope = "file",
2023-04-05 13:58:56 +00:00
})
'';
};
}