summaryrefslogtreecommitdiff
path: root/mnv/runtime/syntax/privoxy.mnv
diff options
context:
space:
mode:
authorMehmet Samet Duman <yongdohyun@projecttick.org>2026-04-04 12:41:27 +0300
committerMehmet Samet Duman <yongdohyun@projecttick.org>2026-04-04 12:41:27 +0300
commit4f2d36194b4f299aa7509d815c07121039ea833b (patch)
treef3ded014bad3a4c76ff6a22b8726ebaab68c3d13 /mnv/runtime/syntax/privoxy.mnv
parent5b578e70c314723a3cde5c9bfc2be0bf1dadc93b (diff)
downloadProject-Tick-4f2d36194b4f299aa7509d815c07121039ea833b.tar.gz
Project-Tick-4f2d36194b4f299aa7509d815c07121039ea833b.zip
NOISSUE change uvim folder name to mnv
Signed-off-by: Mehmet Samet Duman <yongdohyun@projecttick.org>
Diffstat (limited to 'mnv/runtime/syntax/privoxy.mnv')
-rw-r--r--mnv/runtime/syntax/privoxy.mnv183
1 files changed, 183 insertions, 0 deletions
diff --git a/mnv/runtime/syntax/privoxy.mnv b/mnv/runtime/syntax/privoxy.mnv
new file mode 100644
index 0000000000..934ff1e5f7
--- /dev/null
+++ b/mnv/runtime/syntax/privoxy.mnv
@@ -0,0 +1,183 @@
+" MNV syntax file
+" Language: Privoxy actions file
+" Maintainer: Doug Kearns <dougkearns@gmail.com>
+" Last Change: 2026 Jan 07
+
+" Privoxy 4.1.0
+
+if exists("b:current_syntax")
+ finish
+endif
+
+let s:cpo_save = &cpo
+set cpo&mnv
+
+syn region privoxyActionsBlock matchgroup=privoxyBraces start="^\s*\zs{" end="}"
+ \ contains=@privoxyActionPrefix,privoxyLineContinuation
+
+" Actions {{{
+let s:actions =<< trim END
+ add-header
+ block
+ change-x-forwarded-for
+ client-header-filter
+ client-body-filter
+ client-body-tagger
+ client-header-tagger
+ content-type-overwrite
+ crunch-client-header
+ crunch-if-none-match
+ crunch-incoming-cookies
+ crunch-outgoing-cookies
+ crunch-server-header
+ deanimate-gifs
+ delay-response
+ downgrade-http-version
+ external-filter
+ fast-redirects
+ filter
+ filter-client-headers
+ filter-server-headers
+ force-text-mode
+ forward-override
+ handle-as-empty-document
+ handle-as-image
+ hide-accept-language
+ hide-content-disposition
+ hide-forwarded-for-headers
+ hide-from-header
+ hide-if-modified-since
+ hide-referrer
+ hide-referer
+ hide-user-agent
+ https-inspection
+ ignore-certificate-errors
+ limit-connect
+ limit-cookie-lifetime
+ prevent-compression
+ prevent-keeping-cookies
+ overwrite-last-modified
+ redirect
+ server-header-filter
+ server-header-tagger
+ suppress-tag
+ session-cookies-only
+ set-image-blocker
+END
+
+for s:action in s:actions
+ exe 'syn match privoxyAction "\<' .. s:action .. '\>" contained nextgroup=privoxyParams'
+endfor
+unlet s:action s:actions
+
+syn region privoxyParams matchgroup=privoxyParamBraces start="{" end="}" contained
+
+syn match privoxyFilterAction "\<filter\>-\@!" contained nextgroup=privoxyFilterParams
+syn region privoxyFilterParams matchgroup=privoxyParamBraces start="{" end="}" contained contains=privoxyFilterArg
+
+syn cluster privoxyAction contains=privoxyAction,privoxyFilterAction
+" }}}
+
+" Filters {{{
+let s:filters =<< trim END
+ allow-autocompletion
+ all-popups
+ banners-by-link
+ banners-by-size
+ blogspot
+ bundeswehr
+ content-cookies
+ crude-parental
+ demoronizer
+ frameset-borders
+ fun
+ github
+ google
+ html-annoyances
+ ie-exploits
+ iframes
+ imdb
+ img-reorder
+ js-annoyances
+ js-events
+ jumping-windows
+ msn
+ no-ping
+ quicktime-kioskmode
+ refresh-tags
+ shockwave-flash
+ site-specifics
+ sourceforge
+ tiny-textforms
+ unsolicited-popups
+ webbugs
+ yahoo
+ x-httpd-php-to-html
+ html-to-xml
+ xml-to-html
+ less-download-windows
+ privoxy-control
+ hide-tor-exit-notation
+ no-brotli-accepted
+ privoxy-control
+ remove-first-byte
+ remove-test
+ overwrite-test-value
+END
+
+for s:filter in s:filters
+ exe 'syn match privoxyFilterArg "\<' .. s:filter .. '\>" contained"'
+endfor
+unlet s:filter s:filters
+" }}}
+
+syn match privoxyEnablePrefix "\%(^\|\s\|{\)\@1<=+\l\@=" nextgroup=privoxy.*Action contained
+syn match privoxyDisablePrefix "\%(^\|\s\|{\)\@1<=-\l\@=" nextgroup=privoxy.*Action contained
+syn cluster privoxyActionPrefix contains=privoxyDisablePrefix,privoxyEnablePrefix
+
+syn match privoxySettingsHeader "^\s*\zs{{settings\}}" contains=privoxyBraces nextgroup=privoxySettingsSection skipnl skipwhite
+syn match privoxyDescriptionHeader "^\s*\zs{{description\}}" contains=privoxyBraces nextgroup=privoxyDescriptionSection skipnl
+syn match privoxyAliasHeader "^\s*\zs{{alias\}}" contains=privoxyBraces nextgroup=privoxyAliasSection skipnl
+
+syn region privoxySettingsSection start="." end="^\s*\ze{" contained contains=privoxyComment,privoxySettingName
+syn region privoxyDescriptionSection start="." end="^\s*\ze{" contained
+syn region privoxyAliasSection start="." end="^\s*\ze{" contained contains=privoxyComment,privoxyAliasName
+
+syn match privoxySettingName "\<[a-z][a-z-]*" contained nextgroup=privoxySettingEqual
+syn match privoxySettingEqual "=" contained nextgroup=privoxySettingValue
+syn match privoxySettingValue ".*" contained
+
+syn match privoxyAliasName "[+-]\<[a-z][a-z-]*" contained nextgroup=privoxyAliasEqual skipwhite
+syn match privoxyAliasEqual "=" contained nextgroup=privoxyAliasValue skipwhite
+syn region privoxyAliasValue start="\S" skip="\\$" end="$" contained contains=@privoxyAction,@privoxyActionPrefix,privoxyLineContinuation
+
+syn match privoxyBraces "[{}]" contained
+syn match privoxyLineContinuation "\\$" contained
+
+syn keyword privoxyTodo TODO FIXME XXX NOTE contained
+syn match privoxyComment "#.*" contains=privoxyTodo,@Spell
+
+hi def link privoxyAction Identifier
+hi def link privoxyAliasEqual Operator
+hi def link privoxyAliasHeader Title
+hi def link privoxyBraces Delimiter
+hi def link privoxyComment Comment
+hi def link privoxyDescriptionHeader Title
+hi def link privoxyDisablePrefix Added
+hi def link privoxyEnablePrefix Removed
+hi def link privoxyFilterAction privoxyAction
+hi def link privoxyFilterArg Constant
+hi def link privoxyLineContinuation Special
+hi def link privoxyParamBraces privoxyBraces
+hi def link privoxySettingEqual Operator
+hi def link privoxySettingName Keyword
+hi def link privoxySettingsHeader Title
+hi def link privoxySettingValue Constant
+hi def link privoxyTodo Todo
+
+let b:current_syntax = "privoxy"
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
+
+" mnv: ts=8 fdm=marker