From bba0fa8537b991d6792bd1a1dce25bcc35d42c70 Mon Sep 17 00:00:00 2001 From: xs Date: Sun, 8 Nov 2026 18:56:39 +0800 Subject: vimrc: skip rust-analyzer detachedFiles for buffers whose directory does not exist --- core/vimrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/vimrc b/core/vimrc index 22b6b41..783df3d 100644 --- a/core/vimrc +++ b/core/vimrc @@ -203,7 +203,7 @@ function! RustCrate() abort endfunction function! s:RustAddDetached() abort let l:p = expand('%:p') - if empty(l:p) || index(g:ra_init.detachedFiles, l:p) >= 0 | return 0 | endif + if empty(l:p) || !isdirectory(fnamemodify(l:p, ':h')) || index(g:ra_init.detachedFiles, l:p) >= 0 | return 0 | endif call add(g:ra_init.detachedFiles, l:p) return 1 endfunction -- cgit