Code Monkey home page Code Monkey logo

vim-ungrammar's Introduction

vim-ungrammar

Vim-ungrammar is a plugin for Neovim and Vim for the Ungrammar filetype which provides:

  • Filetype detection.
  • ftplugin setting adjustments.
    • Use let g:ungrammar_formatting = v:false to turn it off.
  • Syntax files.

Preview

Here is a preview of the syntax highlighting, using nvim-highlite as a theme:

preview

Configuration

Highlighting Groups

This plugin defines the following syntax groups:

Group Name Description Example
ungramAlternation An alternation on a rule. |
ungramConditionalGroup A group which is a conditional. (Foo|Bar)?
ungramConditionalString A conditional ungramString. 'for'?
ungramConditional A conditional (1-or-0). ?
ungramLabel A label for a token or string. scope:'local'
ungramOperator An operator. =
ungramOr Alternative for a given position. Foo|Bar
ungramQuote A quote for a string or token. '
ungramRepeatGroup A group which is repeated. (Foo|Bar)*
ungramRepeatString A repeated ungramString. 'for'*
ungramRepeat 0 or more repetitions. *
ungramRule A rule for a grammar. Foo
ungramString A specific string of characters. 'for'
ungramToken A token. 'identifier_var'

Markdown Integration

You can use this plugin seamlessly with plasticboy/vim-markdown provided that the following is part of your init.vim configuration:

let g:vim_markdown_fenced_languages = ['ungram=ungrammar']

Then, you can create codeblocks in markdown and it will use the syntax file from this plugin:

	```ungram
	 Foo = 'A' | 'B'

Credits

vim-ungrammar's People

Contributors

iron-e avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.