From 558de3d9adc3b2ea1403ef995ea46dfad6ca0bdd Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 28 Mar 2025 07:21:36 +0800 Subject: vim-patch:052b86b: runtime(solidity): update syntax script with error definitions closes: vim/vim#16978 References: - https://docs.soliditylang.org/en/latest/contracts.html#transient-storage - https://soliditylang.org/blog/2021/04/21/custom-errors/ https://github.com/vim/vim/commit/052b86ba6315e65eb034ac906128f9bd82d5f2d7 Co-authored-by: S0AndS0 --- runtime/syntax/solidity.vim | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/runtime/syntax/solidity.vim b/runtime/syntax/solidity.vim index a46d041a10..5391bba707 100644 --- a/runtime/syntax/solidity.vim +++ b/runtime/syntax/solidity.vim @@ -2,10 +2,11 @@ " Language: Solidity " Maintainer: Cothi (jiungdev@gmail.com) " Original Author: tomlion (https://github.com/tomlion/vim-solidity/blob/master/syntax/solidity.vim) -" Last Change: 2022 Sep 27 +" Last Change: 2025 Mar 25 " " Contributors: " Modified by thesis (https://github.com/thesis/vim-solidity/blob/main/indent/solidity.vim) +" Modified by S0AndS0 (https://github.com/S0AndS0/vim/blob/syntax-solidity-updates/runtime/syntax/solidity.vim) if exists("b:current_syntax") finish @@ -15,7 +16,7 @@ endif syn keyword solKeyword abstract anonymous as break calldata case catch constant constructor continue default switch revert require syn keyword solKeyword ecrecover addmod mulmod keccak256 syn keyword solKeyword delete do else emit enum external final for function if immutable import in indexed inline -syn keyword solKeyword interface internal is let match memory modifier new of payable pragma private public pure override virtual +syn keyword solKeyword interface internal is let match memory modifier new of payable pragma private public pure override virtual transient syn keyword solKeyword relocatable return returns static storage struct throw try type typeof using syn keyword solKeyword var view while @@ -158,6 +159,15 @@ hi def link solEvent Type hi def link solEventName Function hi def link solEventArgSpecial Label +" Error +syn match solError /\/ nextgroup=solErrorName,solErrorArgs skipwhite +syn match solErrorName contained /\<[a-zA-Z_$][0-9a-zA-Z_$]*/ nextgroup=solErrorArgs skipwhite +syn region solErrorArgs contained matchgroup=solFuncParens start='(' end=')' contains=solErrorArgCommas,solBuiltinType skipwhite skipempty +syn match solErrorArgCommas contained ',' + +hi def link solError Type +hi def link solErrorName Function + " Comment syn keyword solCommentTodo TODO FIXME XXX TBD contained syn match solNatSpec contained /@title\|@author\|@notice\|@dev\|@param\|@inheritdoc\|@return/ -- cgit From d96a685fae5035cb91aa2709f823740bfccb899e Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 28 Mar 2025 07:21:52 +0800 Subject: vim-patch:f9f4e27: runtime(hyprlang): save and restore cpo setting in syntax script fixes: vim/vim#16970 closes: vim/vim#16973 https://github.com/vim/vim/commit/f9f4e27ad76ee36a5a49013a84a466800d26f360 Co-authored-by: Christian Brabandt --- runtime/syntax/hyprlang.vim | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/runtime/syntax/hyprlang.vim b/runtime/syntax/hyprlang.vim index cde504d9ca..081d917b4c 100644 --- a/runtime/syntax/hyprlang.vim +++ b/runtime/syntax/hyprlang.vim @@ -1,11 +1,14 @@ " Vim syntax file " Language: hyprlang " Maintainer: Luca Saccarola -" Last Change: 2025 Jan 29 +" Last Change: 2025 Mar 26 if exists("b:current_syntax") finish endif +let s:cpo= &cpo +set cpo&vim + let b:current_syntax = "hyprlang" syn case ignore @@ -56,4 +59,6 @@ hi def link hyprString String hi def link hyprColor Structure hi def link hyprCommand Keyword +let &cpo = s:cpo +unlet s:cpo " vim: ts=8 sts=2 sw=2 et -- cgit