Merge pull request #323735 from GaetanLepage/preview-nvim
vimPlugins.Preview-nvim: init at 2024-06-01
This commit is contained in:
commit
d88ba03906
@ -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/";
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
@ -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 ];
|
||||
};
|
||||
|
@ -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()
|
@ -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/,,
|
||||
|
Loading…
Reference in New Issue
Block a user