Skip to content

replace markdown-preview with peek.nvim + bump deps#128

Merged
redyf merged 37 commits into
redyf:mainfrom
jee-mj:for_redif
Jun 6, 2026
Merged

replace markdown-preview with peek.nvim + bump deps#128
redyf merged 37 commits into
redyf:mainfrom
jee-mj:for_redif

Conversation

@jee-mj

@jee-mj jee-mj commented May 26, 2026

Copy link
Copy Markdown
Contributor

swapped out markdown-preview.nvim for peek.nvim — it renders in a native
window instead of opening a browser, way nicer. also bumped the nix
inputs so everything builds clean on the latest nixos 2605.
preview now works for: markdown, html, pandoc, rmd, qmd, vimwiki, tex, latex
same keybind: cp toggles it

jee-mj and others added 29 commits May 19, 2026 11:13
- copilot-lua: move options under settings and convert to snake_case
- treesitter-textobjects: move options under settings and convert to snake_case
- alpha: move layout under settings
Neovim 0.12.2's module loader (via lazy.nvim's cache) fails to resolve
Lua modules from runtimepath/lua/ directories in the Nix store, causing
require('nvim-treesitter'), require('cmp'), and others to fail at startup.

The wrapped package adds a --cmd flag that augments package.path with
all lua/ directories on the runtimepath, so modules are found regardless
of which loader is active.

Usage: nix run github:jee-mj/Neve#wrapped
Neovim 0.12 requires $HOME/.local/share/nvim for stdpath('data').
The nixvim test harness only creates .cache/nvim, causing an
'Invalid save_dir' error that fails the check. Fix by overriding
the check derivation to pre-create the missing directory.
Replace the empty spec = [] workaround with explicit neocord plugin
registration in lazy.nvim's managed plugins. This ensures lazy.nvim
treats the settings table as opts (2nd arg to setup()), preventing
it from resetting the runtimepath and breaking Vimscript autoload
functions like neocord#SetAutoCmds.

Using config = "" (empty string) prevents lazy.nvim from running
its auto-setup callback, since Nixvim handles neocord setup
separately.
Adds fd, tree-sitter, nixfmt-rfc-style, stylua, prettierd, and
nerd-fonts.symbols-only to the runtime closure. Resolves 6 checkhealth
items (1 error, 5 warnings) for missing CLI formatters and tools.
nixpkgs now aliases nixfmt-rfc-style to pkgs.nixfmt. The old name
triggers deprecation warnings during evaluation.
- Remove markdown-preview.nvim (external browser, Firefox-based)
- Add peek.nvim (native webview, Deno-powered)
- Preview filetypes: markdown, html, pandoc, rmd, qmd, vimwiki, tex, latex
- Keybind unchanged: <leader>cp toggles preview
- Enabled by default (was previously disabled)
- Adds deno to extraPackages as runtime dependency
Pin nixpkgs, nixvim, and flake-utils to specific revisions
instead of following branch refs (nixos-unstable/default).
@redyf

redyf commented Jun 3, 2026

Copy link
Copy Markdown
Owner

Thank you for the contribution! I'll take a better look during the weekend 😄

redyf added 8 commits June 6, 2026 00:31
lazy.nvim's setup() forces vim.go.loadplugins = false. Since this config
also tells lazy not to reset the runtimepath/packpath, lazy never
re-sources the plugin/ scripts of the Nix-managed start packages, so any
command defined only there silently disappears, most notably :Telescope
(and :TodoTelescope), which unlike most plugins is not created inside
its setup(). Re-enable loadplugins after init so Neovim sources those
scripts.
…kage

  - Inputs are movable refs again (nixpkgs -> nixos-unstable, nixvim and flake-utils without a fixed rev); exact version pinning lives in
    flake.lock so 'nix flake update' (and the update CI) can manage the revs instead of frozen URLs.

  - Restore 'nixvim.inputs.nixpkgs.follows = \"nixpkgs\"' so nixvim shares
  the root nixpkgs again instead of carrying its own.

  - Remove the 'packages.wrapped' derivation: it tried to fix the missing
  Telescope commands via package.path, but the real cause was loadplugins
  being disabled by lazy.nvim (fixed separately). It was dead code.

  - Regenerate flake.lock: nixpkgs and nixvim move to current revs and the
  duplicate nixpkgs node is dropped (effect of the follows).
checkhealth is the live source of truth; a static snapshot of its output goes stale on every
  nixvim/nixpkgs/Neovim bump (already inaccurate for the nvim-treesitter section and missing newer warnings) and risks masking real issues by
  labeling everything as expected.
So the user can choose which one is better for their needs.
nvim-web-devicons and mini.icons are competing icon providers, not complementary ones.
The module enabled both, but without calling mock_nvim_web_devicons() the consumer plugins keep requiring nvim-web-devicons, so mini.icons just loads unused — extra startup cost
  and a risk of inconsistent icons for no benefit.
@redyf redyf merged commit 2fb4ccf into redyf:main Jun 6, 2026
5 of 6 checks passed
@redyf

redyf commented Jun 6, 2026

Copy link
Copy Markdown
Owner

Thanks again @jee-mj!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants