feat(languages: move markdown and tidal to languages module)

This commit is contained in:
NotAShelf 2023-04-18 00:38:57 +03:00
commit fdca3b1e7e
No known key found for this signature in database
GPG key ID: F0D14CCB5ED5AA22
17 changed files with 56 additions and 111 deletions

View file

@ -0,0 +1,23 @@
{
pkgs,
config,
lib,
...
}:
with lib;
with builtins; let
cfg = config.vim.tidal;
in {
config = mkIf (cfg.enable) {
vim.startPlugins = [
# From tidalcycles flake
pkgs.vimPlugins.vim-tidal
];
vim.globals = {
"tidal_target" = "terminal";
"tidal_flash_duration" = 150;
"tidal_sc_enable" = cfg.openSC;
};
};
}

View file

@ -0,0 +1,6 @@
{...}: {
imports = [
./tidal.nix
./config.nix
];
}

View file

@ -0,0 +1,23 @@
{
config,
lib,
...
}:
with lib;
with builtins; {
options.vim.tidal = {
enable = mkEnableOption "Enable tidalcycles tools and plugins";
flash = mkOption {
description = ''When sending a paragraph or a single line, vim-tidal will "flash" the selection for some milliseconds'';
type = types.int;
default = 150;
};
openSC = mkOption {
description = "Automatically run the supercollider CLI, sclang, alongside the Tidal GHCI terminal.";
type = types.bool;
default = true;
};
};
}