mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-09-08 03:11:36 +00:00
modules/ui: switch to explicit lib calls
This commit is contained in:
parent
db0df5c211
commit
5955d53077
9 changed files with 37 additions and 32 deletions
|
@ -7,21 +7,21 @@
|
|||
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",
|
||||
})
|
||||
'';
|
||||
};
|
||||
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",
|
||||
})
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{lib, ...}: let
|
||||
inherit (lib.options) mkOption mkEnableOption literalExpression;
|
||||
inherit (lib.types) attrsOf either nullOr listOf int str submodule;
|
||||
inherit (lib.types) nullOr int str submodule attrsOf either listOf;
|
||||
in {
|
||||
options.vim.ui.smartcolumn = {
|
||||
enable = mkEnableOption "line length indicator";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue