Compare commits

..

No commits in common. "0ebeca8f3947ea586325b1a5632d7a28912a05e3" and "d9448d8ed3ea2ccefc1f414d05e0761b5255bb58" have entirely different histories.

3 changed files with 19 additions and 35 deletions

View file

@ -135,9 +135,3 @@
- Add `vim.languages.zig.dap` support through pkgs.lldb dap adapter. Code
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
View file

@ -2636,11 +2636,11 @@
"plugin-typst-concealer": {
"flake": false,
"locked": {
"lastModified": 1737954973,
"narHash": "sha256-DV5RNMAdSePc5T3XAAGAbY5LB1G5tapQxtJEhT8DtDY=",
"lastModified": 1737944956,
"narHash": "sha256-YCkxM1xqY3gTrKVzRFI4fedOzhEeIq/dnYya/MST6Qo=",
"owner": "PartyWumpus",
"repo": "typst-concealer",
"rev": "e7ff35c359a7c8cf375cb02a97b23e76bd9bbe57",
"rev": "e3d5bc44dc4ea9d68f3cee271eee1a75ff7d59e9",
"type": "github"
},
"original": {

View file

@ -11,7 +11,6 @@
inherit (lib.attrsets) attrNames;
inherit (lib.generators) mkLuaInline;
inherit (lib.meta) getExe;
inherit (lib.nvim.binds) mkMappingOption mkKeymap;
inherit (lib.nvim.lua) expToLua toLuaObject;
inherit (lib.nvim.types) mkGrammarOption mkPluginSetupOption;
inherit (lib.nvim.dag) entryAnywhere;
@ -169,47 +168,44 @@ in {
};
};
typst-concealer = {
enable = mkEnableOption ''
[typst-concealer]: https://github.com/PartyWumpus/typst-concealer
enable =
mkEnableOption ''
[typst-concealer]: https://github.com/PartyWumpus/typst-concealer
Inline typst preview for Neovim via [typst-concealer]
'';
mappings = {
toggleConcealing = mkMappingOption "Enable typst-concealer in buffer" "<leader>TT";
};
Inline typst preview for Neovim via [typst-concealer]
''
// {default = false;};
setupOpts = mkPluginSetupOption "typst-concealer" {
do_diagnostics = mkOption {
type = nullOr bool;
description = ''Should typst-concealer provide diagnostics on error?'';
default = !cfg.lsp.enable;
description = "Should typst-concealer provide diagnostics on error?";
};
color = mkOption {
type = nullOr str;
description = ''What color should typst-concealer render text/stroke with? (only applies when styling_type is "colorscheme")'';
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 {
type = nullOr bool;
description = ''Should typst-concealer conceal newly opened buffers by default?'';
default = null;
description = "Should typst-concealer conceal newly opened buffers by default?";
};
styling_type = mkOption {
type = nullOr (enum ["simple" "none" "colorscheme"]);
description = ''What kind of styling should typst-concealer apply to your typst?'';
default = null;
description = "What kind of styling should typst-concealer apply to your typst?";
};
ppi = mkOption {
type = nullOr int;
description = ''What PPI should typst render at. Plugin default is 300, typst's normal default is 144.'';
default = null;
description = "What PPI should typst render at. Plugin default is 300, typst's normal default is 144.";
};
typst_location = mkOption {
type = str;
default = getExe pkgs.typst;
description = "Where should typst-concealer look for your typst binary?";
description = ''Where should typst-concealer look for your typst binary?'';
};
};
};
@ -240,16 +236,10 @@ in {
})
(mkIf cfg.extensions.typst-concealer.enable {
vim.lazy.plugins.typst-concealer = {
event = "BufRead *.typ";
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";})
];
};
vim.startPlugins = ["typst-concealer"];
vim.pluginRC.typst-concealer = entryAnywhere ''
require("typst-concealer").setup(${toLuaObject cfg.extensions.typst-concealer.setupOpts})
'';
})
]);
}