Skip to content

samueljoli/hurl.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 

Repository files navigation

hurl.nvim

Lua port of syntax highlighting for Hurl

Installation

Packer

use 'samueljoli/hurl.nvim'

Plug

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:

  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

Screen Shot 2023-04-06 at 6 57 08 PM

gruvbox

Screen Shot 2023-04-06 at 6 57 29 PM

noctis

Screen Shot 2023-04-06 at 6 58 26 PM

Releases

No releases published

Packages

No packages published

Languages