mirror of
https://github.com/NotAShelf/neovim-flake.git
synced 2024-12-22 17:39:49 +01:00
33 lines
823 B
Nix
33 lines
823 B
Nix
|
{
|
||
|
pkgs,
|
||
|
config,
|
||
|
lib,
|
||
|
...
|
||
|
}:
|
||
|
with lib;
|
||
|
with builtins; let
|
||
|
cfg = config.vim.ui.smartcolumn;
|
||
|
in {
|
||
|
config = mkIf cfg.enable {
|
||
|
vim.startPlugins = [
|
||
|
"smartcolumn"
|
||
|
];
|
||
|
|
||
|
vim.luaConfigRC.smartcolumn = nvim.dag.entryAnywhere ''
|
||
|
require("smartcolumn").setup({
|
||
|
colorcolumn = "${toString cfg.showColumnAt}",
|
||
|
disabled_filetypes = { ${concatStringsSep ", " (map (x: "\"" + x + "\"") cfg.disabledFiletypes)} },
|
||
|
-- { "help", "text", "markdown", "NvimTree", "alpha"},
|
||
|
custom_colorcolumn = {
|
||
|
-- TODO: use cfg.languages.<language>.columnAt when it's fixed to dynamically define per-language length
|
||
|
ruby = "120",
|
||
|
java = "120",
|
||
|
nix = "120",
|
||
|
markdown = "80",
|
||
|
},
|
||
|
scope = "file",
|
||
|
})
|
||
|
'';
|
||
|
};
|
||
|
}
|