Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
prefer lispindent() to 'lisp' and add cpo to syntax file
  • Loading branch information
rhysd committed Jul 29, 2018
commit c4555b53f5646458f75d1306e83fec2f857e0045
5 changes: 3 additions & 2 deletions runtime/indent/wast.vim
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ endif
let b:did_indent = 1

" WebAssembly text format is S-expression. We can reuse LISP indentation
setlocal lisp
setlocal indentexpr=
" logic.
setlocal indentexpr=lispindent('.')
setlocal noautoindent nosmartindent

let b:undo_indent = "setl lisp< indentexpr<"
6 changes: 6 additions & 0 deletions runtime/syntax/wast.vim
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ if exists("b:current_syntax")
finish
endif

let s:cpo_save = &cpo
set cpo&vim

syn cluster wastCluster contains=wastModule,wastInstWithType,wastInstGeneral,wastParamInst,wastControlInst,wastString,wastNamedVar,wastUnnamedVar,wastFloat,wastNumber,wastComment,wastList,wastType

" Instructions
Expand Down Expand Up @@ -76,3 +79,6 @@ hi def link wastComment Comment
hi def link wastType Type

let b:current_syntax = "wast"

let &cpo = s:cpo_save
unlet s:cpo_save