about summary refs log tree commit diff
path: root/src/etc/vim/ftplugin
diff options
context:
space:
mode:
Diffstat (limited to 'src/etc/vim/ftplugin')
-rw-r--r--src/etc/vim/ftplugin/rust.vim9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/etc/vim/ftplugin/rust.vim b/src/etc/vim/ftplugin/rust.vim
index 39edc1f9a20..8a538177403 100644
--- a/src/etc/vim/ftplugin/rust.vim
+++ b/src/etc/vim/ftplugin/rust.vim
@@ -56,6 +56,11 @@ if exists("g:loaded_delimitMate")
 	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
@@ -103,6 +108,10 @@ let b:undo_ftplugin = "
 		\|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