mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-11-22 21:30:51 +00:00
Compare commits
20 commits
8889f71247
...
9e94434190
Author | SHA1 | Date | |
---|---|---|---|
9e94434190 | |||
9b111d1fe4 | |||
f738ad9d1a | |||
775a867196 | |||
d582228889 | |||
20dd5f8bb9 | |||
5987b911e8 | |||
2016ca1473 | |||
a831d229d4 | |||
49f751ee18 | |||
3e571d0e0c | |||
5c09def08e | |||
318e972a77 | |||
4435754702 | |||
a2b9e645eb | |||
3e0e9331f0 | |||
c1904bc9e5 | |||
94f6f7eceb | |||
2a2d1b6d2c | |||
07f6ac5db0 |
21 changed files with 411 additions and 534 deletions
|
@ -46,8 +46,6 @@ isMaximal: {
|
|||
|
||||
nix.enable = true;
|
||||
|
||||
# Assembly is not common, and the asm LSP is a major hit-or-miss
|
||||
assembly.enable = false;
|
||||
markdown.enable = isMaximal;
|
||||
html.enable = isMaximal;
|
||||
css.enable = isMaximal;
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
{
|
||||
lib,
|
||||
stdenvNoCC,
|
||||
fetchzip,
|
||||
runCommandLocal,
|
||||
# build inputs
|
||||
nixos-render-docs,
|
||||
documentation-highlighter,
|
||||
|
@ -13,25 +11,6 @@
|
|||
optionsJSON,
|
||||
} @ args: let
|
||||
manual-release = args.release or "unstable";
|
||||
|
||||
scss-reset = fetchzip {
|
||||
url = "https://github.com/Frontend-Layers/scss-reset/archive/refs/tags/1.4.2.zip";
|
||||
hash = "sha256-cif5Sx8Ca5vxdw/mNAgpulLH15TwmzyJFNM7JURpoaE=";
|
||||
};
|
||||
|
||||
compileStylesheet = runCommandLocal "compile-nvf-stylesheet" {} ''
|
||||
mkdir -p $out
|
||||
|
||||
tmpfile=$(mktemp -d)
|
||||
trap "rm -r $tmpfile" EXIT
|
||||
|
||||
ln -s "${scss-reset}/build" "$tmpfile/scss-reset"
|
||||
|
||||
${dart-sass}/bin/sass --load-path "$tmpfile" \
|
||||
${./static/style.scss} "$out/style.css"
|
||||
|
||||
echo "Generated styles"
|
||||
'';
|
||||
in
|
||||
stdenvNoCC.mkDerivation {
|
||||
name = "nvf-manual";
|
||||
|
@ -42,6 +21,7 @@ in
|
|||
|
||||
strictDependencies = true;
|
||||
nativeBuildInputs = [nixos-render-docs];
|
||||
buildInputs = [dart-sass];
|
||||
|
||||
postPatch = ''
|
||||
ln -s ${optionsJSON}/share/doc/nixos/options.json ./config-options.json
|
||||
|
@ -60,7 +40,7 @@ in
|
|||
${documentation-highlighter}/loader.js
|
||||
|
||||
# Copy anchor scripts to the script directory in document root.
|
||||
cp -vt "$dest"/script \
|
||||
cp -vt $dest/script \
|
||||
${./static/script}/anchor-min.js \
|
||||
${./static/script}/anchor-use.js
|
||||
|
||||
|
@ -73,9 +53,8 @@ in
|
|||
substituteInPlace ./hacking/additional-plugins.md \
|
||||
--subst-var-by NVF_REPO "https://github.com/notashelf/nvf/blob/${manual-release}"
|
||||
|
||||
# Move compiled stylesheet
|
||||
cp -vt $dest \
|
||||
${compileStylesheet}/style.css
|
||||
# Compile and copy stylesheet to the project root.
|
||||
sass ${./static/style.css} "$dest/style.css"
|
||||
|
||||
# Move release notes
|
||||
cp -vr ${./release-notes} release-notes
|
||||
|
@ -95,9 +74,9 @@ in
|
|||
nixos-render-docs manual html \
|
||||
--manpage-urls ${path + "/doc/manpage-urls.json"} \
|
||||
--revision ${lib.trivial.revisionWithDefault manual-release} \
|
||||
--stylesheet "$dest"/style.css \
|
||||
--script ./highlightjs/highlight.pack.js \
|
||||
--script ./highlightjs/loader.js \
|
||||
--stylesheet style.css \
|
||||
--script highlightjs/highlight.pack.js \
|
||||
--script highlightjs/loader.js \
|
||||
--script script/anchor-use.js \
|
||||
--script script/anchor-min.js \
|
||||
--toc-depth 2 \
|
||||
|
|
|
@ -285,9 +285,6 @@ To migrate to `nixfmt`, simply change `vim.languages.nix.format.type` to
|
|||
- Add [](#opt-vim.spellcheck.extraSpellWords) to allow adding arbitrary
|
||||
spellfiles to Neovim's runtime with ease.
|
||||
|
||||
- Add combined nvf configuration (`config.vim`) into the final package's
|
||||
passthru as `passthru.neovimConfiguration` for easier debugging.
|
||||
|
||||
[ppenguin](https://github.com/ppenguin):
|
||||
|
||||
- Telescope:
|
||||
|
@ -297,7 +294,6 @@ To migrate to `nixfmt`, simply change `vim.languages.nix.format.type` to
|
|||
[Soliprem](https://github.com/Soliprem):
|
||||
|
||||
- Add LSP and Treesitter support for R under `vim.languages.R`.
|
||||
- Add formatter suppoort for R, with styler and formatR as options
|
||||
- Add Otter support under `vim.lsp.otter` and an assert to prevent conflict with
|
||||
ccc
|
||||
- Fixed typo in Otter's setupOpts
|
||||
|
@ -306,9 +302,6 @@ To migrate to `nixfmt`, simply change `vim.languages.nix.format.type` to
|
|||
`vim.languages.kotlin`
|
||||
- changed default keybinds for leap.nvim to avoid altering expected behavior
|
||||
- Add LSP, formatter and Treesitter support for Vala under `vim.languages.vala`
|
||||
- Add [Tinymist](https://github.com/Myriad-Dreamin/tinymist] as a formatter for
|
||||
the Typst language module.
|
||||
- Add LSP and Treesitter support for Assembly under `vim.languages.assembly`
|
||||
|
||||
[Bloxx12](https://github.com/Bloxx12)
|
||||
|
||||
|
@ -333,3 +326,4 @@ To migrate to `nixfmt`, simply change `vim.languages.nix.format.type` to
|
|||
[Nowaaru](https://github.com/Nowaaru):
|
||||
|
||||
- Add `precognition-nvim`.
|
||||
|
||||
|
|
7
docs/static/style.css
vendored
7
docs/static/style.css
vendored
File diff suppressed because one or more lines are too long
4
docs/static/style.scss
vendored
4
docs/static/style.scss
vendored
|
@ -1,5 +1,3 @@
|
|||
@use "scss-reset/reset";
|
||||
|
||||
:root {
|
||||
--nmd-color0: #0a3e68;
|
||||
--nmd-color1: #268598;
|
||||
|
@ -34,6 +32,8 @@ $color-blue-700: #1d4ed8;
|
|||
$color-blue-800: #1e40af;
|
||||
$color-blue-900: #1e3a8a;
|
||||
|
||||
@use "scss-reset/reset";
|
||||
|
||||
@mixin boxed {
|
||||
background: $color-gray-50;
|
||||
margin: 2rem 16px;
|
||||
|
|
97
docs/static/tomorrow-night.min.css
vendored
97
docs/static/tomorrow-night.min.css
vendored
|
@ -4,4 +4,99 @@
|
|||
License: ~ MIT (or more permissive) [via base16-schemes-source]
|
||||
Maintainer: @highlightjs/core-team
|
||||
Version: 2021.09.0
|
||||
*/pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{color:#ccc;background:#2d2d2d}.hljs ::selection,.hljs::selection{background-color:#515151;color:#ccc}.hljs-comment{color:#999}.hljs-tag{color:#b4b7b4}.hljs-operator,.hljs-punctuation,.hljs-subst{color:#ccc}.hljs-operator{opacity:.7}.hljs-bullet,.hljs-deletion,.hljs-name,.hljs-selector-tag,.hljs-template-variable,.hljs-variable{color:#f2777a}.hljs-attr,.hljs-link,.hljs-literal,.hljs-number,.hljs-symbol,.hljs-variable.constant_{color:#f99157}.hljs-class .hljs-title,.hljs-title,.hljs-title.class_{color:#fc6}.hljs-strong{font-weight:700;color:#fc6}.hljs-addition,.hljs-code,.hljs-string,.hljs-title.class_.inherited__{color:#9c9}.hljs-built_in,.hljs-doctag,.hljs-keyword.hljs-atrule,.hljs-quote,.hljs-regexp{color:#6cc}.hljs-attribute,.hljs-function .hljs-title,.hljs-section,.hljs-title.function_,.ruby .hljs-property{color:#69c}.diff .hljs-meta,.hljs-keyword,.hljs-template-tag,.hljs-type{color:#c9c}.hljs-emphasis{color:#c9c;font-style:italic}.hljs-meta,.hljs-meta .hljs-keyword,.hljs-meta .hljs-string{color:#a3685a}.hljs-meta .hljs-keyword,.hljs-meta-keyword{font-weight:700}
|
||||
*/
|
||||
pre code.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
padding: 1em;
|
||||
}
|
||||
code.hljs {
|
||||
padding: 3px 5px;
|
||||
}
|
||||
.hljs {
|
||||
color: #ccc;
|
||||
background: #2d2d2d;
|
||||
}
|
||||
.hljs ::selection,
|
||||
.hljs::selection {
|
||||
background-color: #515151;
|
||||
color: #ccc;
|
||||
}
|
||||
.hljs-comment {
|
||||
color: #999;
|
||||
}
|
||||
.hljs-tag {
|
||||
color: #b4b7b4;
|
||||
}
|
||||
.hljs-operator,
|
||||
.hljs-punctuation,
|
||||
.hljs-subst {
|
||||
color: #ccc;
|
||||
}
|
||||
.hljs-operator {
|
||||
opacity: 0.7;
|
||||
}
|
||||
.hljs-bullet,
|
||||
.hljs-deletion,
|
||||
.hljs-name,
|
||||
.hljs-selector-tag,
|
||||
.hljs-template-variable,
|
||||
.hljs-variable {
|
||||
color: #f2777a;
|
||||
}
|
||||
.hljs-attr,
|
||||
.hljs-link,
|
||||
.hljs-literal,
|
||||
.hljs-number,
|
||||
.hljs-symbol,
|
||||
.hljs-variable.constant_ {
|
||||
color: #f99157;
|
||||
}
|
||||
.hljs-class .hljs-title,
|
||||
.hljs-title,
|
||||
.hljs-title.class_ {
|
||||
color: #fc6;
|
||||
}
|
||||
.hljs-strong {
|
||||
font-weight: 700;
|
||||
color: #fc6;
|
||||
}
|
||||
.hljs-addition,
|
||||
.hljs-code,
|
||||
.hljs-string,
|
||||
.hljs-title.class_.inherited__ {
|
||||
color: #9c9;
|
||||
}
|
||||
.hljs-built_in,
|
||||
.hljs-doctag,
|
||||
.hljs-keyword.hljs-atrule,
|
||||
.hljs-quote,
|
||||
.hljs-regexp {
|
||||
color: #6cc;
|
||||
}
|
||||
.hljs-attribute,
|
||||
.hljs-function .hljs-title,
|
||||
.hljs-section,
|
||||
.hljs-title.function_,
|
||||
.ruby .hljs-property {
|
||||
color: #69c;
|
||||
}
|
||||
.diff .hljs-meta,
|
||||
.hljs-keyword,
|
||||
.hljs-template-tag,
|
||||
.hljs-type {
|
||||
color: #c9c;
|
||||
}
|
||||
.hljs-emphasis {
|
||||
color: #c9c;
|
||||
font-style: italic;
|
||||
}
|
||||
.hljs-meta,
|
||||
.hljs-meta .hljs-keyword,
|
||||
.hljs-meta .hljs-string {
|
||||
color: #a3685a;
|
||||
}
|
||||
.hljs-meta .hljs-keyword,
|
||||
.hljs-meta-keyword {
|
||||
font-weight: 700;
|
||||
}
|
||||
|
|
516
flake.lock
516
flake.lock
File diff suppressed because it is too large
Load diff
|
@ -123,11 +123,6 @@ in {
|
|||
paths = [neovim-wrapped printConfig printConfigPath];
|
||||
postBuild = "echo Helpers added";
|
||||
|
||||
# Allow evaluating vimOptions, i.e., config.vim from the packages' passthru
|
||||
# attribute. For example, packages.x86_64-linux.neovim.passthru.neovimConfig
|
||||
# will return the configuration in full.
|
||||
passthru.neovimConfig = vimOptions;
|
||||
|
||||
meta = {
|
||||
description = "Wrapped version of Neovim with additional helper scripts";
|
||||
mainProgram = "nvim";
|
||||
|
|
|
@ -42,20 +42,6 @@ in {
|
|||
after = ''
|
||||
${optionalString luasnipEnable "local luasnip = require('luasnip')"}
|
||||
local cmp = require("cmp")
|
||||
|
||||
local kinds = require("cmp.types").lsp.CompletionItemKind
|
||||
local deprio = function(kind)
|
||||
return function(e1, e2)
|
||||
if e1:get_kind() == kind then
|
||||
return false
|
||||
end
|
||||
if e2:get_kind() == kind then
|
||||
return true
|
||||
end
|
||||
return nil
|
||||
end
|
||||
end
|
||||
|
||||
cmp.setup(${toLuaObject cfg.setupOpts})
|
||||
|
||||
${optionalString config.vim.lazy.enable
|
||||
|
|
|
@ -29,8 +29,6 @@ in {
|
|||
sorting.comparators = mkOption {
|
||||
type = mergelessListOf (either str luaInline);
|
||||
default = [
|
||||
(mkLuaInline "deprio(kinds.Text)")
|
||||
(mkLuaInline "deprio(kinds.Snippet)")
|
||||
"offset"
|
||||
"exact"
|
||||
"score"
|
||||
|
@ -45,12 +43,6 @@ in {
|
|||
(see `:help cmp-config.sorting.comparators`),
|
||||
or a string, in which case the builtin comparator with that name will
|
||||
be used.
|
||||
|
||||
A `deprio` function and a `kinds`
|
||||
(`require("cmp.types").lsp.CompletionItemKind`) variable is provided
|
||||
above `setupOpts`. By passing a type to the funcion, the returned
|
||||
function will be a comparator that always ranks the specified kind the
|
||||
lowest.
|
||||
'';
|
||||
apply = map (
|
||||
c:
|
||||
|
|
|
@ -24,7 +24,7 @@ in {
|
|||
cmd = ["Neotree"];
|
||||
};
|
||||
|
||||
visuals.nvim-web-devicons.enable = true;
|
||||
visuals.nvimWebDevicons.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,49 +0,0 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.options) mkEnableOption mkOption;
|
||||
inherit (lib.modules) mkIf mkMerge;
|
||||
inherit (lib.types) package;
|
||||
inherit (lib.nvim.types) mkGrammarOption;
|
||||
|
||||
cfg = config.vim.languages.assembly;
|
||||
in {
|
||||
options.vim.languages.assembly = {
|
||||
enable = mkEnableOption "Assembly support";
|
||||
|
||||
treesitter = {
|
||||
enable = mkEnableOption "Assembly treesitter" // {default = config.vim.languages.enableTreesitter;};
|
||||
package = mkGrammarOption pkgs "asm";
|
||||
};
|
||||
|
||||
lsp = {
|
||||
enable = mkEnableOption "Assembly LSP support (asm-lsp)" // {default = config.vim.languages.enableLSP;};
|
||||
|
||||
package = mkOption {
|
||||
type = package;
|
||||
default = pkgs.asm-lsp;
|
||||
description = "asm-lsp package";
|
||||
};
|
||||
};
|
||||
};
|
||||
config = mkIf cfg.enable (mkMerge [
|
||||
(mkIf cfg.treesitter.enable {
|
||||
vim.treesitter.enable = true;
|
||||
vim.treesitter.grammars = [cfg.treesitter.package];
|
||||
})
|
||||
|
||||
(mkIf cfg.lsp.enable {
|
||||
vim.lsp.lspconfig.enable = true;
|
||||
vim.lsp.lspconfig.sources.asm-lsp = ''
|
||||
lspconfig.asm_lsp.setup {
|
||||
capabilities = capabilities,
|
||||
on_attach = default_on_attach,
|
||||
cmd = {"${cfg.lsp.package}/bin/asm-lsp"},
|
||||
}
|
||||
'';
|
||||
})
|
||||
]);
|
||||
}
|
|
@ -2,7 +2,6 @@
|
|||
inherit (lib.nvim.languages) mkEnable;
|
||||
in {
|
||||
imports = [
|
||||
./asm.nix
|
||||
./bash.nix
|
||||
./dart.nix
|
||||
./clang.nix
|
||||
|
|
|
@ -15,38 +15,7 @@
|
|||
cfg = config.vim.languages.r;
|
||||
|
||||
r-with-languageserver = pkgs.rWrapper.override {
|
||||
packages = [pkgs.rPackages.languageserver];
|
||||
};
|
||||
|
||||
defaultFormat = "format_r";
|
||||
formats = {
|
||||
styler = {
|
||||
package = pkgs.rWrapper.override {
|
||||
packages = [pkgs.rPackages.styler];
|
||||
};
|
||||
nullConfig = ''
|
||||
table.insert(
|
||||
ls_sources,
|
||||
null_ls.builtins.formatting.styler.with({
|
||||
command = "${cfg.format.package}/bin/R",
|
||||
})
|
||||
)
|
||||
'';
|
||||
};
|
||||
|
||||
format_r = {
|
||||
package = pkgs.rWrapper.override {
|
||||
packages = [pkgs.rPackages.formatR];
|
||||
};
|
||||
nullConfig = ''
|
||||
table.insert(
|
||||
ls_sources,
|
||||
null_ls.builtins.formatting.format_r.with({
|
||||
command = "${cfg.format.package}/bin/R",
|
||||
})
|
||||
)
|
||||
'';
|
||||
};
|
||||
packages = with pkgs.rPackages; [languageserver];
|
||||
};
|
||||
|
||||
defaultServer = "r_language_server";
|
||||
|
@ -93,22 +62,6 @@ in {
|
|||
default = servers.${cfg.lsp.server}.package;
|
||||
};
|
||||
};
|
||||
|
||||
format = {
|
||||
enable = mkEnableOption "R formatting" // {default = config.vim.languages.enableFormat;};
|
||||
|
||||
type = mkOption {
|
||||
type = enum (attrNames formats);
|
||||
default = defaultFormat;
|
||||
description = "R formatter to use";
|
||||
};
|
||||
|
||||
package = mkOption {
|
||||
type = package;
|
||||
default = formats.${cfg.format.type}.package;
|
||||
description = "R formatter package";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable (mkMerge [
|
||||
|
@ -117,11 +70,6 @@ in {
|
|||
vim.treesitter.grammars = [cfg.treesitter.package];
|
||||
})
|
||||
|
||||
(mkIf cfg.format.enable {
|
||||
vim.lsp.null-ls.enable = true;
|
||||
vim.lsp.null-ls.sources.r-format = formats.${cfg.format.type}.nullConfig;
|
||||
})
|
||||
|
||||
(mkIf cfg.lsp.enable {
|
||||
vim.lsp.lspconfig.enable = true;
|
||||
vim.lsp.lspconfig.sources.r-lsp = servers.${cfg.lsp.server}.lspConfig;
|
||||
|
|
|
@ -14,38 +14,6 @@
|
|||
|
||||
cfg = config.vim.languages.typst;
|
||||
|
||||
defaultServer = "tinymist";
|
||||
servers = {
|
||||
typst-lsp = {
|
||||
package = pkgs.typst-lsp;
|
||||
lspConfig = ''
|
||||
lspconfig.typst_lsp.setup {
|
||||
capabilities = capabilities,
|
||||
on_attach = default_on_attach,
|
||||
cmd = ${
|
||||
if isList cfg.lsp.package
|
||||
then expToLua cfg.lsp.package
|
||||
else ''{"${cfg.lsp.package}/bin/typst-lsp"}''
|
||||
},
|
||||
}
|
||||
'';
|
||||
};
|
||||
tinymist = {
|
||||
package = pkgs.tinymist;
|
||||
lspConfig = ''
|
||||
lspconfig.tinymist.setup {
|
||||
capabilities = capabilities,
|
||||
on_attach = default_on_attach,
|
||||
cmd = ${
|
||||
if isList cfg.lsp.package
|
||||
then expToLua cfg.lsp.package
|
||||
else ''{"${cfg.lsp.package}/bin/tinymist"}''
|
||||
},
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
defaultFormat = "typstfmt";
|
||||
formats = {
|
||||
typstfmt = {
|
||||
|
@ -84,17 +52,11 @@ in {
|
|||
lsp = {
|
||||
enable = mkEnableOption "Typst LSP support (typst-lsp)" // {default = config.vim.languages.enableLSP;};
|
||||
|
||||
server = mkOption {
|
||||
description = "Typst LSP server to use";
|
||||
type = enum (attrNames servers);
|
||||
default = defaultServer;
|
||||
};
|
||||
|
||||
package = mkOption {
|
||||
description = "typst-lsp package, or the command to run as a list of strings";
|
||||
example = ''[lib.getExe pkgs.jdt-language-server "-data" "~/.cache/jdtls/workspace"]'';
|
||||
type = either package (listOf str);
|
||||
default = servers.${cfg.lsp.server}.package;
|
||||
default = pkgs.typst-lsp;
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -120,14 +82,19 @@ in {
|
|||
vim.treesitter.grammars = [cfg.treesitter.package];
|
||||
})
|
||||
|
||||
(mkIf cfg.format.enable {
|
||||
vim.lsp.null-ls.enable = true;
|
||||
vim.lsp.null-ls.sources.typst-format = formats.${cfg.format.type}.nullConfig;
|
||||
})
|
||||
|
||||
(mkIf cfg.lsp.enable {
|
||||
vim.lsp.lspconfig.enable = true;
|
||||
vim.lsp.lspconfig.sources.typst-lsp = servers.${cfg.lsp.server}.lspConfig;
|
||||
vim.lsp.lspconfig.sources.typst-lsp = ''
|
||||
lspconfig.typst_lsp.setup {
|
||||
capabilities = capabilities,
|
||||
on_attach=default_on_attach,
|
||||
cmd = ${
|
||||
if isList cfg.lsp.package
|
||||
then expToLua cfg.lsp.package
|
||||
else ''{"${cfg.lsp.package}/bin/typst-lsp"}''
|
||||
},
|
||||
}
|
||||
'';
|
||||
})
|
||||
]);
|
||||
}
|
||||
|
|
|
@ -4,20 +4,33 @@
|
|||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.strings) optionalString;
|
||||
inherit (lib.nvim.lua) toLuaObject;
|
||||
inherit (lib.nvim.dag) entryAnywhere;
|
||||
|
||||
cfg = config.vim.binds.whichKey;
|
||||
in {
|
||||
config = mkIf cfg.enable {
|
||||
vim = {
|
||||
startPlugins = ["which-key"];
|
||||
vim.startPlugins = ["which-key"];
|
||||
|
||||
pluginRC.whichkey = entryAnywhere ''
|
||||
local wk = require("which-key")
|
||||
wk.setup (${toLuaObject cfg.setupOpts})
|
||||
wk.register(${toLuaObject cfg.register})
|
||||
'';
|
||||
};
|
||||
vim.pluginRC.whichkey = entryAnywhere ''
|
||||
local wk = require("which-key")
|
||||
wk.setup ({
|
||||
key_labels = {
|
||||
["<space>"] = "SPACE",
|
||||
["<leader>"] = "SPACE",
|
||||
["<cr>"] = "RETURN",
|
||||
["<tab>"] = "TAB",
|
||||
},
|
||||
|
||||
${optionalString config.vim.ui.borders.plugins.which-key.enable ''
|
||||
window = {
|
||||
border = ${toLuaObject config.vim.ui.borders.plugins.which-key.style},
|
||||
},
|
||||
''}
|
||||
})
|
||||
|
||||
wk.register(${toLuaObject cfg.register})
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
_: {
|
||||
imports = [
|
||||
./which-key.nix
|
||||
./config.nix
|
||||
|
|
|
@ -1,51 +1,14 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.options) mkOption mkEnableOption;
|
||||
inherit (lib.types) attrsOf nullOr str attrs enum bool;
|
||||
inherit (lib.nvim.types) mkPluginSetupOption;
|
||||
{lib, ...}: let
|
||||
inherit (lib.options) mkEnableOption mkOption;
|
||||
inherit (lib.types) attrsOf nullOr str;
|
||||
in {
|
||||
options.vim.binds.whichKey = {
|
||||
enable = mkEnableOption "which-key keybind helper menu";
|
||||
|
||||
register = mkOption {
|
||||
description = "Register label for which-key keybind helper menu";
|
||||
type = attrsOf (nullOr str);
|
||||
default = {};
|
||||
description = "Register label for which-key keybind helper menu";
|
||||
};
|
||||
|
||||
setupOpts = mkPluginSetupOption "which-key" {
|
||||
preset = mkOption {
|
||||
type = enum ["classic" "modern" "helix"];
|
||||
default = "modern";
|
||||
description = "The default preset for the which-key window";
|
||||
};
|
||||
|
||||
notify = mkOption {
|
||||
type = bool;
|
||||
default = true;
|
||||
description = "Show a warning when issues were detected with mappings";
|
||||
};
|
||||
|
||||
replace = mkOption {
|
||||
type = attrs;
|
||||
default = {
|
||||
"<space>" = "SPACE";
|
||||
"<leader>" = "SPACE";
|
||||
"<cr>" = "RETURN";
|
||||
"<tab>" = "TAB";
|
||||
};
|
||||
description = "Functions/Lua Patterns for formatting the labels";
|
||||
};
|
||||
|
||||
win = {
|
||||
border = mkOption {
|
||||
type = str;
|
||||
default = config.vim.ui.borders.plugins.which-key.style;
|
||||
description = "Which-key window border style";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
in {
|
||||
imports = [
|
||||
(mkRemovedOptionModule ["vim" "visuals" "enable"] ''
|
||||
As top-level toggles are being deprecated, you are encouraged to handle plugin
|
||||
toggles under individual options.
|
||||
As top-level toggles are being deprecated, you are encouraged
|
||||
to handle plugin toggles under individual options.
|
||||
'')
|
||||
|
||||
./cellular-automaton
|
||||
|
|
|
@ -16,7 +16,7 @@ in {
|
|||
enable = mkEnableOption "Neovim dev icons [nvim-web-devicons]";
|
||||
|
||||
setupOpts = mkPluginSetupOption "nvim-web-devicons" {
|
||||
color_icons = mkEnableOption "different highlight colors per icon" // {default = true;};
|
||||
color_icons = mkEnableOption "different highlight colors per icon";
|
||||
variant = mkOption {
|
||||
type = nullOr (enum ["light" "dark"]);
|
||||
default = null;
|
||||
|
|
|
@ -189,7 +189,7 @@ in {
|
|||
};
|
||||
|
||||
plugins = mkOption {
|
||||
default = {};
|
||||
default = [];
|
||||
type = attrsOf lznPluginType;
|
||||
description = ''
|
||||
Plugins to lazy load.
|
||||
|
|
Loading…
Reference in a new issue