Lua port of syntax highlighting for Hurl
use 'samueljoli/hurl.nvim'
Plug 'samueljoli/hurl.nvim'
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:
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
.