From dce9e8dec5ef51730291c7bbff3e3997433eabbd Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Wed, 6 Dec 2017 12:56:27 +0100 Subject: Update --- autoload/dart.vim | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'autoload/dart.vim') diff --git a/autoload/dart.vim b/autoload/dart.vim index 76013172..2ff55cb6 100644 --- a/autoload/dart.vim +++ b/autoload/dart.vim @@ -152,4 +152,13 @@ function! s:DotPackagesFile() abort return [v:false, ''] endfunction +" Prevent writes to files in the pub cache. +function! dart#setModifiable() abort + let full_path = expand('%:p') + if full_path =~# '.pub-cache' || + \ full_path =~# 'Pub\Cache' + setlocal nomodifiable + endif +endfunction + endif -- cgit v1.2.3