forked from aniani/vim
runtime(solidity): add new ftplugin (#12877)
Set undo_{ftplugin,indent} closes #11240 Co-authored-by: cothi <jiungdev@gmail.com>
This commit is contained in:
parent
c6d533b0ad
commit
e34b51e95f
3
.github/CODEOWNERS
vendored
3
.github/CODEOWNERS
vendored
@ -210,6 +210,7 @@ runtime/ftplugin/scss.vim @tpope
|
||||
runtime/ftplugin/sdoc.vim @gpanders
|
||||
runtime/ftplugin/sed.vim @dkearns
|
||||
runtime/ftplugin/sh.vim @dkearns
|
||||
runtime/ftplugin/solidity.vim @cothi
|
||||
runtime/ftplugin/solution.vim @dkearns
|
||||
runtime/ftplugin/spec.vim @ignatenkobrain
|
||||
runtime/ftplugin/ssa.vim @ObserverOfTime
|
||||
@ -299,6 +300,7 @@ runtime/indent/sass.vim @tpope
|
||||
runtime/indent/scala.vim @derekwyatt
|
||||
runtime/indent/scss.vim @tpope
|
||||
runtime/indent/sh.vim @chrisbra
|
||||
runtime/indent/solidity.vim @cothi
|
||||
runtime/indent/systemverilog.vim @Kocha
|
||||
runtime/indent/tcl.vim @dkearns
|
||||
runtime/indent/tcsh.vim @dkearns
|
||||
@ -470,6 +472,7 @@ runtime/syntax/sdoc.vim @gpanders
|
||||
runtime/syntax/sed.vim @dkearns
|
||||
runtime/syntax/sh.vim @cecamp
|
||||
runtime/syntax/sm.vim @cecamp
|
||||
runtime/syntax/solidity.vim @cothi
|
||||
runtime/syntax/spec.vim @ignatenkobrain
|
||||
runtime/syntax/sqloracle.vim @chrisbra
|
||||
runtime/syntax/squirrel.vim @zenmatic
|
||||
|
15
runtime/ftplugin/solidity.vim
Normal file
15
runtime/ftplugin/solidity.vim
Normal file
@ -0,0 +1,15 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: Solidity
|
||||
" Maintainer: Cothi (jiungdev@gmail.com)
|
||||
" Original Author: tomlion (https://github.com/tomlion/vim-solidity)
|
||||
" Last Change: 2022 Sep 27
|
||||
" 2023 Aug 22 Vim Project (did_ftplugin, undo_ftplugin)
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
setlocal commentstring=//\ %s
|
||||
|
||||
let b:undo_ftplugin = "setlocal commentstring<"
|
@ -1,9 +1,11 @@
|
||||
" Vim indent file
|
||||
" Language: Solidity
|
||||
" Acknowledgement: Based off of vim-javascript
|
||||
" Maintainer: Cothi (jiungdev@gmail.com)
|
||||
" Original Author: tomlion (https://github.com/tomlion/vim-solidity)
|
||||
" Last Changed: 2022 Sep 27
|
||||
" Language: Solidity
|
||||
" Maintainer: Cothi (jiungdev@gmail.com)
|
||||
" Original Author: tomlion (https://github.com/tomlion/vim-solidity)
|
||||
" Last Change: 2022 Sep 27
|
||||
" 2023 Aug 22 Vim Project (undo_indent)
|
||||
"
|
||||
" Acknowledgement: Based off of vim-javascript
|
||||
"
|
||||
" 0. Initialization {{{1
|
||||
" =================
|
||||
@ -20,6 +22,8 @@ setlocal nosmartindent
|
||||
setlocal indentexpr=GetSolidityIndent()
|
||||
setlocal indentkeys=0{,0},0),0],0\,,!^F,o,O,e
|
||||
|
||||
let b:undo_indent = "setlocal indentexpr< indentkeys< smartindent<"
|
||||
|
||||
" Only define the function once.
|
||||
if exists("*GetSolidityIndent")
|
||||
finish
|
||||
|
@ -1,10 +1,10 @@
|
||||
" Vim syntax file
|
||||
" Language: Solidity
|
||||
" Maintainer: Cothi (jiungdev@gmail.com)
|
||||
" Original Author: tomlion (https://github.com/tomlion/vim-solidity/blob/master/syntax/solidity.vim)
|
||||
" Last Changed: 2022 Sep 27
|
||||
" 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
|
||||
"
|
||||
" Additional contributors:
|
||||
" Contributors:
|
||||
" Modified by thesis (https://github.com/thesis/vim-solidity/blob/main/indent/solidity.vim)
|
||||
|
||||
if exists("b:current_syntax")
|
||||
|
Loading…
x
Reference in New Issue
Block a user