From c145ed7dc67973ced152f936a96750a2ce1d0a9d Mon Sep 17 00:00:00 2001 From: Geraldo Ribeiro Date: Mon, 20 May 2024 15:30:33 +0400 Subject: [PATCH] Avoid try to format verilog file with v extension --- ftplugin/vlang.vim | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ftplugin/vlang.vim b/ftplugin/vlang.vim index dc46cfe..1c96a44 100644 --- a/ftplugin/vlang.vim +++ b/ftplugin/vlang.vim @@ -12,6 +12,9 @@ else endif function! _VFormatFile() + if &ft != 'vlang' + return + endif if exists('g:v_autofmt_bufwritepre') && g:v_autofmt_bufwritepre || exists('b:v_autofmt_bufwritepre') && b:v_autofmt_bufwritepre let substitution = system("v fmt -", join(getline(1, line('$')), "\n")) if v:shell_error != 0