Skip to content

wardenclyffetower/mermaidjs.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mermaidjs.nvim

A Neovim plugin for Mermaid.js syntax highlighting using nvim-treesitter.

Installation

Install with your favorite plugin manager.

Packer

use {
  'your-username/mermaidjs.nvim',
  requires = {
    'nvim-treesitter/nvim-treesitter',
    run = ':TSUpdate'
  },
  config = function()
    require('nvim-treesitter.configs').setup {
      -- A list of parser names, or "all"
      ensure_installed = { "mermaid" },

      -- Install parsers synchronously (only applied to `ensure_installed`)
      sync_install = false,

      -- Automatically install missing parsers when entering buffer
      auto_install = true,

      highlight = {
        enable = true,
        additional_vim_regex_highlighting = false,
      },
    }
  end,
}

Usage

This plugin automatically highlights .mmd and .mermaid files.

After installing, you need to install the mermaid parser for nvim-treesitter.

Run the following command in Neovim:

:TSInstall mermaid

This will download and build the mermaid parser from the tree-sitter-mermaid repository.

About

An early experiment of a mermaidjs plugin for neovim

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors