vimPlugins.Preview-nvim: init at 2024-06-01

This commit is contained in:
Gaetan Lepage 2024-07-01 08:32:37 +02:00
parent 8471cfbf67
commit 262a6fe785
4 changed files with 46 additions and 0 deletions

View File

@ -17515,5 +17515,17 @@ final: prev:
meta.homepage = "https://github.com/jhradilek/vim-snippets/";
};
Preview-nvim = buildVimPlugin {
pname = "Preview.nvim";
version = "2024-06-01";
src = fetchFromGitHub {
owner = "henriklovhaug";
repo = "Preview.nvim";
rev = "388882f3bfd09bcb0d5b4ab3d0fa5bc2dacbbc2e";
sha256 = "sha256-Tnl2TkLY9QXk/5qX2LcX5G2aq/sysH6BnD2YqXlneIU=";
};
meta.homepage = "https://github.com/henriklovhaug/Preview.nvim/";
};
}

View File

@ -79,6 +79,8 @@
, CoreServices
, # nvim-treesitter dependencies
callPackage
, # Preview-nvim dependencies
md-tui
, # sg.nvim dependencies
darwin
, # sved dependencies
@ -1275,6 +1277,15 @@
nvimRequireCheck = "plenary";
};
Preview-nvim = super.Preview-nvim.overrideAttrs {
patches = [
(substituteAll {
src = ./patches/preview-nvim/hardcode-mdt-binary-path.patch;
mdt = lib.getExe md-tui;
})
];
};
range-highlight-nvim = super.range-highlight-nvim.overrideAttrs {
dependencies = with self; [ cmd-parser-nvim ];
};

View File

@ -0,0 +1,22 @@
diff --git a/lua/preview.lua b/lua/preview.lua
index 6d9875d..729cc70 100644
--- a/lua/preview.lua
+++ b/lua/preview.lua
@@ -28,7 +28,7 @@ local function open_window(file)
vim.env.MDT_WIDTH = width
vim.cmd.vnew()
- vim.fn.termopen("mdt " .. file)
+ vim.fn.termopen("@mdt@ " .. file)
vim.cmd("setlocal nonumber norelativenumber")
vim.api.nvim_feedkeys("a", "t", false)
@@ -49,7 +49,7 @@ end
function M.setup()
-- Check if "mdt" is installed
if vim.fn.executable("mdt") == 0 then
- install()
+ -- install()
end
set_cmd()

View File

@ -21,6 +21,7 @@ https://github.com/numToStr/Navigator.nvim/,,
https://github.com/overcache/NeoSolarized/,,
https://github.com/chrisbra/NrrwRgn/,,
https://github.com/vim-scripts/PreserveNoEOL/,,
https://github.com/henriklovhaug/Preview.nvim/,HEAD,
https://github.com/yssl/QFEnter/,,
https://github.com/chrisbra/Recover.vim/,,
https://github.com/vim-scripts/Rename/,,