pest-parser / pest.vim

Vim syntax highlighting for pest PEG grammar files.
MIT License
31 stars 7 forks source link

pest.vim

Syntax highlighting for pest PEG grammar files.

Example (using the default color scheme):

Screenshot

Installation

Using Vundle

Add the following to your vimrc

Plugin 'pest-parser/pest.vim'

Using packer.nvim

use 'pest-parser/pest.vim'

Neovim LSP support

Install language server

If you're using mason.nvim, run:

:MasonInstall pest-language-server

Or install it manually:

cargo install pest-language-server

Set up language server

Then set it up by calling this somewhere in your neovim lua config (you may need to pass any common opts to this as well):

require('pest-vim').setup {}

If you're using mason-lspconfig.nvim with Automatic server setup, you can configure it as:

require('mason-lspconfig').setup_handlers {
    ...

    ['pest_ls'] = function ()
        require('pest-vim').setup {}
    end,
    ...
}