Skip to content

[plugins] Complementary plugins: lazydev.nvim and render-markdown.nvim #139

@stanfish06

Description

@stanfish06

What

Two plugins that complement the existing setup without overlapping with previously suggested plugins (#31, #129).


1. lazydev.nvim (folke/lazydev.nvim)

Rationale tied to existing config:

The config uses lua-language-server (luals) with LuaJIT runtime for editing the Neovim config itself. Without lazydev.nvim, luals has no knowledge of the Neovim API — it cannot autocomplete vim.api.*, vim.lsp.*, vim.treesitter.*, etc., and marks every vim.* call as an unknown global. The statusline in statusline.lua, the async library in lib/async.lua, and all LSP/treesitter calls in plugin_config.lua would benefit immediately.

lazydev.nvim ships Neovim's full API type definitions and automatically activates them when editing files inside $STDPATH/config or any plugin directory. It requires zero configuration for the basic case:

-- lua/config/plugins.lua: add the plugin
{ name = "lazydev.nvim", src = "https://github.com/folke/lazydev.nvim.git" },

-- lua/config/plugin_config.lua: one-line setup
local ok, lazydev = pcall(require, "lazydev")
if ok then lazydev.setup({}) end

luals picks up the type annotations automatically via a workspace library injection. The LSP completion popup (already wired via vim.lsp.completion.enable) will immediately gain accurate vim.* completions and hover docs.


2. render-markdown.nvim (MeanderingProgrammer/render-markdown.nvim)

Rationale tied to existing config:

The config has obsidian.nvim wired with daily_notes = { folder = "journal" } and markdown parsers installed for treesitter (markdown, markdown_inline). Currently markdown files render as plain text — headings are # characters, links are [text](url), checkboxes are - [ ].

render-markdown.nvim uses treesitter to render markdown in-buffer: headings become styled with Unicode decorations, checkboxes render as /, code blocks get highlighted backgrounds, and links are concealed to show only the link text. It activates only in normal mode and turns off in insert mode, so editing is not disrupted.

This is the plugin explicitly recommended by obsidian.nvim's maintainers as a replacement for obsidian's own deprecated built-in UI renderer (see issue #78). It also benefits non-obsidian markdown (README files, scratch notes, LSP hover that renders as markdown).

-- lua/config/plugins.lua
{ name = "render-markdown.nvim", src = "https://github.com/MeanderingProgrammer/render-markdown.nvim.git" },

-- lua/config/plugin_config.lua (minimal setup — full options in :help render-markdown)
local ok, rm = pcall(require, "render-markdown")
if ok then rm.setup({}) end

No extra dependencies: uses treesitter (already installed) and nerd font icons (already enabled: vim.g.have_nerd_font = true).


Where

lua/config/plugins.lua — package list; lua/config/plugin_config.lua — setup calls.

Priority

lazydev.nvim is the lower-effort, higher-payoff addition — it directly improves the experience of editing this config file. render-markdown.nvim is a UX polish item for the obsidian/markdown workflow.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions