OXY2DEV / markview.nvim

An experimental markdown previewer for Neovim
Apache License 2.0
603 stars 23 forks source link

πŸ“œ Markview.nvim

Simple markdown previewer for neovim

headings lists tables

[!WARNING] This plugin is in it's alpha stage and may go through breaking changes.

πŸ“‘ Table of contents

πŸ›Έ Features

πŸ”­ Requirements

πŸ“¦ Installation

πŸ’€ Lazy.nvim

For plugins.lua or lazy.lua users.

{
    "OXY2DEV/markview.nvim",

    dependencies = {
        -- You may not need this if you don't lazy load
        -- Or if the parsers are in your $RUNTIMEPATH
        "nvim-treesitter/nvim-treesitter",

        "nvim-tree/nvim-web-devicons"
    },
}

For plugins/markview.lua users

return {
    "OXY2DEV/markview.nvim",

    dependencies = {
        -- You may not need this if you don't lazy load
        -- Or if the parsers are in your $RUNTIMEPATH
        "nvim-treesitter/nvim-treesitter",

        "nvim-tree/nvim-web-devicons"
    },
}

🦠 Mini.deps

local MiniDeps = require("mini.deps");

MiniDeps.add({
    source = "OXY2DEV/markview.nvim",

    depends = {
        -- You may not need this if you don't lazy load
        -- Or if the parsers are in your $RUNTIMEPATH
        "nvim-treesitter/nvim-treesitter",

        "nvim-tree/nvim-web-devicons"
    }
})

πŸ€” Others

The installation process for any other plugin manager(s) is the same.

If your plugin manager doesn't support dependencies then you can always load the plugins in the right order.

Plug "nvim-treesitter/nvim-treesitter"
Plug "nvim-tree/nvim-web-devicons"

Plug "OXY2DEV/markview.nvim"

🧭 Setup

[!NOTE] This plugin does not use setup() to initialize. So, it is completely optional to call it.

Configuration table for the setup() function is given below.

require("markview").setup({
    buf_ignore = { "nofile" },
    modes = { "n" },

    -- Returns the conceallevel to the global value when changing modes
    restore_conceallevel = true,
    -- Returns the concealcursor to the global value when changing modes
    restore_concealcursor = false,

    headings = {},
    code_blocks = {},
    block_quotes = {},
    horizontal_rules = {},
    hyperlinks = {},
    images = {},
    inline_codes = {},
    list_items = {},
    checkboxes = {},
    tables = {}
});

For customisation related options check the wiki pages.

🎹 Commands

[!NOTE] Commands are a test feature.

There is only a single command for now, :Markview.

When called without any arguments, it toggles the plugin.

Possible subcommands are,

πŸ‘Ύ Showcases

[!IMPORTANT] Screenshots on a phone are very blurry(Yes, the plugin was made on my phone).

If you have screenshots of the plugin, you can submit them in the special issue(not yet open). And yes, credit will be provided.