mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-09-06 18:31:35 +00:00
Merge branch 'main' of https://github.com/NotAShelf/nvf into language-overhaul
This commit is contained in:
commit
1a1569e6dd
15 changed files with 121 additions and 27 deletions
|
@ -7,7 +7,7 @@
|
|||
inherit (builtins) attrNames;
|
||||
inherit (lib.meta) getExe;
|
||||
inherit (lib.modules) mkIf mkMerge;
|
||||
inherit (lib.options) mkOption mkEnableOption;
|
||||
inherit (lib.options) mkOption mkEnableOption literalMD;
|
||||
inherit (lib.strings) optionalString;
|
||||
inherit (lib.trivial) boolToString;
|
||||
inherit (lib.lists) isList;
|
||||
|
@ -68,7 +68,14 @@ in {
|
|||
};
|
||||
|
||||
format = {
|
||||
enable = mkEnableOption "Rust formatting" // {default = config.vim.languages.enableFormat;};
|
||||
enable =
|
||||
mkEnableOption "Rust formatting"
|
||||
// {
|
||||
default = !cfg.lsp.enable && config.vim.languages.enableFormat;
|
||||
defaultText = literalMD ''
|
||||
Disabled if Rust LSP is enabled, otherwise follows {option}`vim.languages.enableFormat`
|
||||
'';
|
||||
};
|
||||
|
||||
type = mkOption {
|
||||
description = "Rust formatter to use";
|
||||
|
|
|
@ -212,4 +212,17 @@ in {
|
|||
'';
|
||||
styles = ["dark" "light" "dark_dimmed" "dark_default" "light_default" "dark_high_contrast" "light_high_contrast" "dark_colorblind" "light_colorblind" "dark_tritanopia" "light_tritanopia"];
|
||||
};
|
||||
solarized-osaka = {
|
||||
setup = {transparent ? false, ...}: ''
|
||||
require("solarized-osaka").setup({
|
||||
transparent = ${boolToString transparent},
|
||||
styles = {
|
||||
comments = { italic = false },
|
||||
keywords = { italic = false },
|
||||
}
|
||||
})
|
||||
|
||||
vim.cmd.colorscheme("solarized-osaka")
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ in {
|
|||
startPlugins = ["hardtime-nvim"];
|
||||
|
||||
pluginRC.hardtime = entryAnywhere ''
|
||||
require("hardtime").setup (${toLuaObject cfg.setupOpts})
|
||||
require("hardtime").setup(${toLuaObject cfg.setupOpts})
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
./image-nvim
|
||||
./img-clip
|
||||
];
|
||||
}
|
||||
|
|
23
modules/plugins/utility/images/img-clip/config.nix
Normal file
23
modules/plugins/utility/images/img-clip/config.nix
Normal file
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.nvim.dag) entryAnywhere;
|
||||
inherit (lib.nvim.lua) toLuaObject;
|
||||
|
||||
cfg = config.vim.utility.images.img-clip;
|
||||
in {
|
||||
config = mkIf cfg.enable {
|
||||
vim = {
|
||||
startPlugins = [
|
||||
"img-clip"
|
||||
];
|
||||
|
||||
pluginRC.image-nvim = entryAnywhere ''
|
||||
require("img-clip").setup(${toLuaObject cfg.setupOpts})
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
6
modules/plugins/utility/images/img-clip/default.nix
Normal file
6
modules/plugins/utility/images/img-clip/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
./config.nix
|
||||
./img-clip.nix
|
||||
];
|
||||
}
|
11
modules/plugins/utility/images/img-clip/img-clip.nix
Normal file
11
modules/plugins/utility/images/img-clip/img-clip.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
{lib, ...}: let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
|
||||
inherit (lib.nvim.types) mkPluginSetupOption;
|
||||
in {
|
||||
options.vim.utility.images.img-clip = {
|
||||
enable = mkEnableOption "img-clip to paste images into any markup language";
|
||||
|
||||
setupOpts = mkPluginSetupOption "img-clip" {};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue