Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/samueljoli/hurl.nvim

Vim syntax highlighting for Hurl
https://github.com/samueljoli/hurl.nvim

hurl lua neovim syntax-highlighting vim

Last synced: 12 days ago
JSON representation

Vim syntax highlighting for Hurl

Awesome Lists containing this project

README

        

# hurl.nvim
Lua port of syntax highlighting for [Hurl](https://github.com/Orange-OpenSource/hurl)

## Installation

#### Packer
```vim
use 'samueljoli/hurl.nvim'
```

#### Plug
```vim
Plug 'samueljoli/hurl.nvim'
```

## Configuration
This plugin allows you to customize several syntax match rules as originally defined by `hurl`. If no configuration is provided, the plugin will use your colorscheme's default highlight groups.

**Example:**
```lua
use {
'samueljoli/hurl.nvim',
config = function()
require('hurl').setup({
comment = "#ebc021", -- default => Comment
method = "#fffc58", -- default => Statement
url = "#fffc58", -- default => Underlined
version = "#032ea7", -- default => Statement
status = "#032ea7", -- default => Number
section = "#032ea7", -- default => Statement
operators = "#c592ff", -- default => Operator
string = "#032ea7", -- default => String
query = "#d57bff", -- default => Identifier
filter = "#032ea7", -- default => Operator
predicate = "#032ea7", -- default => Operator
template = "#032ea7", -- default => Identifier
escapeQuote = "#032ea7", -- default => SpecialChar
escapeNumberSign = "#032ea7", -- default => SpecialChar
})
end
}
```



List of supported syntax match rules:

  • comment


  • method

    • GET

    • POST

    • PUT

    • PATCH

    • DELETE

    • CONNECT

    • OPTIONS

    • TRACE

    • LINK

    • UNLINK

    • PURGE

    • LOCK

    • UNLOCK

    • PROPFIND

    • VIEW



  • url


  • version

    • HTTP

    • HTTP/1.0

    • HTTP/1.1

    • HTTP/2

    • HTTP/*




  • status

    • [0-9]




  • section

    • [Asserts]

    • [Captures]

    • [Cookies]

    • [FormParams]

    • [MultipartFormData]

    • [Options]

    • [QueryStringParams]




  • operators

    • ==

    • !=

    • >

    • >=

    • <

    • <=



  • string


  • query

    • status

    • url

    • header

    • cookie

    • body

    • jsonpath

    • xpath

    • regex

    • variable

    • duration

    • sha256

    • md5

    • bytes





🚨 If an invalid hex code is passed, the plugin will use the fallback syntax match rule and log the key-value pair to the console. To view the log, check Vim's `:messages`.

## Examples

>[cyberpunk](https://github.com/samueljoli/cyberpunk.nvim)
Screen Shot 2023-04-06 at 6 57 08 PM

>[gruvbox](https://github.com/ellisonleao/gruvbox.nvim)
Screen Shot 2023-04-06 at 6 57 29 PM

>[noctis](https://github.com/kartikp10/noctis.nvim)
Screen Shot 2023-04-06 at 6 58 26 PM