Compare commits

...

6 commits

Author SHA1 Message Date
diniamo
eb4065daca
Merge ed69816f68 into 52042f624c 2024-12-20 18:58:27 +01:00
raf
52042f624c
Merge pull request #498 from NotAShelf/fix-mdpw-ft
preview/markdown-preview: convert `mkdp_filetypes` to correct format
2024-12-20 20:01:21 +03:00
raf
af31021ce4
Merge branch 'main' into fix-mdpw-ft 2024-12-20 20:00:57 +03:00
raf
5c69fbd951
Merge pull request #501 from diniamo/nvim-notify-cleanup
nvim-notify: fix some stuff
2024-12-20 19:00:04 +03:00
diniamo
5d898da816 nvim-notify: fix some stuff 2024-12-20 16:27:44 +01:00
4f61628399
preview/markdown-preview: convert mkdp_filetypes to correct format 2024-12-19 09:53:15 +03:00
3 changed files with 7 additions and 15 deletions

View file

@ -14,17 +14,9 @@ in {
startPlugins = ["nvim-notify"]; startPlugins = ["nvim-notify"];
pluginRC.nvim-notify = entryAnywhere '' pluginRC.nvim-notify = entryAnywhere ''
require('notify').setup(${toLuaObject cfg.setupOpts}) local notify = require("notify")
notify.setup(${toLuaObject cfg.setupOpts})
-- required to fix offset_encoding errors vim.notify = notify
local notify = vim.notify
vim.notify = function(msg, ...)
if msg:match("warning: multiple different client offset_encodings") then
return
end
notify(msg, ...)
end
''; '';
}; };
}; };

View file

@ -28,7 +28,7 @@ in {
}; };
stages = mkOption { stages = mkOption {
type = enum ["fade_in_slide_out" "fade_in" "slide_out" "none"]; type = enum ["fade_in_slide_out" "fade" "slide" "static"];
default = "fade_in_slide_out"; default = "fade_in_slide_out";
description = "The stages of the notification"; description = "The stages of the notification";
}; };
@ -41,7 +41,7 @@ in {
background_colour = mkOption { background_colour = mkOption {
type = str; type = str;
default = "#000000"; default = "NotifyBackground";
description = "The background colour of the notification"; description = "The background colour of the notification";
}; };

View file

@ -4,8 +4,8 @@
lib, lib,
... ...
}: let }: let
inherit (lib.strings) concatMapStringsSep;
inherit (lib.modules) mkIf; inherit (lib.modules) mkIf;
cfg = config.vim.utility.preview.markdownPreview; cfg = config.vim.utility.preview.markdownPreview;
in { in {
config = mkIf cfg.enable { config = mkIf cfg.enable {
@ -15,7 +15,7 @@ in {
mkdp_auto_start = cfg.autoStart; mkdp_auto_start = cfg.autoStart;
mkdp_auto_close = cfg.autoClose; mkdp_auto_close = cfg.autoClose;
mkdp_refresh_slow = cfg.lazyRefresh; mkdp_refresh_slow = cfg.lazyRefresh;
mkdp_filetypes = [(concatMapStringsSep ", " (x: "'" + x + "'") cfg.filetypes)]; mkdp_filetypes = cfg.filetypes;
mkdp_command_for_global = cfg.alwaysAllowPreview; mkdp_command_for_global = cfg.alwaysAllowPreview;
mkdp_open_to_the_world = cfg.broadcastServer; mkdp_open_to_the_world = cfg.broadcastServer;
mkdp_open_ip = cfg.customIP; mkdp_open_ip = cfg.customIP;