mirror of
https://github.com/NotAShelf/neovim-flake.git
synced 2024-12-19 23:39:47 +01:00
27 lines
764 B
Nix
27 lines
764 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"];
|
|
|
|
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",
|
|
})
|
|
'';
|
|
};
|
|
};
|
|
}
|