mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-11-26 15:06:45 +00:00
28 lines
744 B
Nix
28 lines
744 B
Nix
{
|
|
config,
|
|
lib,
|
|
...
|
|
}: let
|
|
inherit (lib.modules) mkIf;
|
|
inherit (lib.strings) concatStringsSep;
|
|
inherit (lib.nvim.lua) attrsetToLuaTable;
|
|
inherit (lib.nvim.dag) entryAnywhere;
|
|
|
|
cfg = config.vim.ui.smartcolumn;
|
|
in {
|
|
config = mkIf cfg.enable {
|
|
vim = {
|
|
startPlugins = ["smartcolumn"];
|
|
|
|
vim.luaConfigRC.smartcolumn = entryAnywhere ''
|
|
require("smartcolumn").setup({
|
|
colorcolumn = "${toString cfg.showColumnAt}",
|
|
-- { "help", "text", "markdown", "NvimTree", "alpha"},
|
|
disabled_filetypes = { ${concatStringsSep ", " (map (x: "\"" + x + "\"") cfg.disabledFiletypes)} },
|
|
custom_colorcolumn = ${attrsetToLuaTable cfg.columnAt.languages},
|
|
scope = "file",
|
|
})
|
|
'';
|
|
};
|
|
}
|