We shouldn't be setting conceallevel in the syntax file. Besides not
being able to undo this if we switch to another syntax later, it also
interferes with embedding rust in other filetypes (such as markdown).
Instead, set it in the ftplugin, where it belongs.
if !exists('g:rust_conceal_mod_path')
hi! link Conceal Operator
endif
-
-setlocal conceallevel=2
let b:delimitMate_excluded_regions = delimitMate#Get("excluded_regions") . ',rustLifetimeCandidate,rustGenericLifetimeCandidate'
endif
+if has('conceal') && exists('g:rust_conceal')
+ let b:rust_set_conceallevel=1
+ setlocal conceallevel=2
+endif
+
" Motion Commands {{{1
" Bind motion commands to support hanging indents
\|else
\|unlet! b:delimitMate_excluded_regions
\|endif
+ \|if exists('b:rust_set_conceallevel')
+ \|setlocal conceallevel<
+ \|unlet b:rust_set_conceallevel
+ \|endif
\|unlet! b:rust_last_rustc_args b:rust_last_args
\|delcommand RustRun
\|delcommand RustExpand