mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-11-09 06:55:30 +00:00
add keybinds, resolve review etc
This commit is contained in:
parent
0738bd5b18
commit
0ebeca8f39
3 changed files with 35 additions and 18 deletions
|
|
@ -135,3 +135,9 @@
|
||||||
|
|
||||||
- Add `vim.languages.zig.dap` support through pkgs.lldb dap adapter. Code
|
- Add `vim.languages.zig.dap` support through pkgs.lldb dap adapter. Code
|
||||||
Inspiration from `vim.languages.clang.dap` implementation.
|
Inspiration from `vim.languages.clang.dap` implementation.
|
||||||
|
|
||||||
|
PartyWumpus:
|
||||||
|
|
||||||
|
[typst-concealer]: https://github.com/PartyWumpus/typst-concealer
|
||||||
|
|
||||||
|
- Add inline typst concealing support under `vim.languages.typst` using [typst-concealer].
|
||||||
|
|
|
||||||
6
flake.lock
generated
6
flake.lock
generated
|
|
@ -2636,11 +2636,11 @@
|
||||||
"plugin-typst-concealer": {
|
"plugin-typst-concealer": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1737944956,
|
"lastModified": 1737954973,
|
||||||
"narHash": "sha256-YCkxM1xqY3gTrKVzRFI4fedOzhEeIq/dnYya/MST6Qo=",
|
"narHash": "sha256-DV5RNMAdSePc5T3XAAGAbY5LB1G5tapQxtJEhT8DtDY=",
|
||||||
"owner": "PartyWumpus",
|
"owner": "PartyWumpus",
|
||||||
"repo": "typst-concealer",
|
"repo": "typst-concealer",
|
||||||
"rev": "e3d5bc44dc4ea9d68f3cee271eee1a75ff7d59e9",
|
"rev": "e7ff35c359a7c8cf375cb02a97b23e76bd9bbe57",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@
|
||||||
inherit (lib.attrsets) attrNames;
|
inherit (lib.attrsets) attrNames;
|
||||||
inherit (lib.generators) mkLuaInline;
|
inherit (lib.generators) mkLuaInline;
|
||||||
inherit (lib.meta) getExe;
|
inherit (lib.meta) getExe;
|
||||||
|
inherit (lib.nvim.binds) mkMappingOption mkKeymap;
|
||||||
inherit (lib.nvim.lua) expToLua toLuaObject;
|
inherit (lib.nvim.lua) expToLua toLuaObject;
|
||||||
inherit (lib.nvim.types) mkGrammarOption mkPluginSetupOption;
|
inherit (lib.nvim.types) mkGrammarOption mkPluginSetupOption;
|
||||||
inherit (lib.nvim.dag) entryAnywhere;
|
inherit (lib.nvim.dag) entryAnywhere;
|
||||||
|
|
@ -168,43 +169,47 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
typst-concealer = {
|
typst-concealer = {
|
||||||
enable =
|
enable = mkEnableOption ''
|
||||||
mkEnableOption ''
|
[typst-concealer]: https://github.com/PartyWumpus/typst-concealer
|
||||||
[typst-concealer]: https://github.com/PartyWumpus/typst-concealer
|
|
||||||
|
|
||||||
Inline typst preview for Neovim via [typst-concealer]
|
Inline typst preview for Neovim via [typst-concealer]
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
mappings = {
|
||||||
|
toggleConcealing = mkMappingOption "Enable typst-concealer in buffer" "<leader>TT";
|
||||||
|
};
|
||||||
|
|
||||||
setupOpts = mkPluginSetupOption "typst-concealer" {
|
setupOpts = mkPluginSetupOption "typst-concealer" {
|
||||||
do_diagnostics = mkOption {
|
do_diagnostics = mkOption {
|
||||||
type = nullOr bool;
|
type = nullOr bool;
|
||||||
description = ''Should typst-concealer provide diagnostics on error?'';
|
|
||||||
default = !cfg.lsp.enable;
|
default = !cfg.lsp.enable;
|
||||||
|
description = "Should typst-concealer provide diagnostics on error?";
|
||||||
};
|
};
|
||||||
color = mkOption {
|
color = mkOption {
|
||||||
type = nullOr str;
|
type = nullOr str;
|
||||||
description = ''What color should typst-concealer render text/stroke with? (only applies when styling_type is "colorscheme")'';
|
|
||||||
default = null;
|
default = null;
|
||||||
|
example = "rgb(\"#f012be\")";
|
||||||
|
description = "What color should typst-concealer render text/stroke with? (only applies when styling_type is 'colorscheme')";
|
||||||
};
|
};
|
||||||
enabled_by_default = mkOption {
|
enabled_by_default = mkOption {
|
||||||
type = nullOr bool;
|
type = nullOr bool;
|
||||||
description = ''Should typst-concealer conceal newly opened buffers by default?'';
|
|
||||||
default = null;
|
default = null;
|
||||||
|
description = "Should typst-concealer conceal newly opened buffers by default?";
|
||||||
};
|
};
|
||||||
styling_type = mkOption {
|
styling_type = mkOption {
|
||||||
type = nullOr (enum ["simple" "none" "colorscheme"]);
|
type = nullOr (enum ["simple" "none" "colorscheme"]);
|
||||||
description = ''What kind of styling should typst-concealer apply to your typst?'';
|
|
||||||
default = null;
|
default = null;
|
||||||
|
description = "What kind of styling should typst-concealer apply to your typst?";
|
||||||
};
|
};
|
||||||
ppi = mkOption {
|
ppi = mkOption {
|
||||||
type = nullOr int;
|
type = nullOr int;
|
||||||
description = ''What PPI should typst render at. Plugin default is 300, typst's normal default is 144.'';
|
|
||||||
default = null;
|
default = null;
|
||||||
|
description = "What PPI should typst render at. Plugin default is 300, typst's normal default is 144.";
|
||||||
};
|
};
|
||||||
typst_location = mkOption {
|
typst_location = mkOption {
|
||||||
type = str;
|
type = str;
|
||||||
default = getExe pkgs.typst;
|
default = getExe pkgs.typst;
|
||||||
description = ''Where should typst-concealer look for your typst binary?'';
|
description = "Where should typst-concealer look for your typst binary?";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
@ -235,10 +240,16 @@ in {
|
||||||
})
|
})
|
||||||
|
|
||||||
(mkIf cfg.extensions.typst-concealer.enable {
|
(mkIf cfg.extensions.typst-concealer.enable {
|
||||||
vim.startPlugins = ["typst-concealer"];
|
vim.lazy.plugins.typst-concealer = {
|
||||||
vim.pluginRC.typst-concealer = entryAnywhere ''
|
event = "BufRead *.typ";
|
||||||
require("typst-concealer").setup(${toLuaObject cfg.extensions.typst-concealer.setupOpts})
|
package = "typst-concealer";
|
||||||
'';
|
setupModule = "typst-concealer";
|
||||||
|
setupOpts = cfg.extensions.typst-concealer.setupOpts;
|
||||||
|
|
||||||
|
keys = [
|
||||||
|
(mkKeymap "n" cfg.extensions.typst-concealer.mappings.toggleConcealing "<cmd>lua require('typst-concealer').toggle_buf()<CR>" {desc = "Toggle typst-concealer in buffer";})
|
||||||
|
];
|
||||||
|
};
|
||||||
})
|
})
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue