From b7353bd34e74541c1306b1e8fec4cc993be29aed Mon Sep 17 00:00:00 2001 From: David Tomaschik Date: Fri, 2 Dec 2022 17:23:36 -0800 Subject: [PATCH] Setup rust paths for ycm --- dotfiles/vimrc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dotfiles/vimrc b/dotfiles/vimrc index f9f6c22..f57d429 100644 --- a/dotfiles/vimrc +++ b/dotfiles/vimrc @@ -157,6 +157,12 @@ if isdirectory("/usr/share/vim-youcompleteme") && empty($VIRTUAL_ENV) "let g:ycm_gopls_binary_path='gopls' let g:ycm_autoclose_preview_window_after_insertion=1 set runtimepath+=/usr/share/vim-youcompleteme + " Add rust settings + let g:tmp_rust_path=trim(system("rustc --print sysroot")) + if isdirectory(g:tmp_rust_path) + let g:ycm_rust_toolchain_root=g:tmp_rust_path + endif + unlet! g:tmp_rust_path endif " Enable vim-bracketed-paste mode