From af7235f8ea6f6e566e9f635a02db650fc2f9113f Mon Sep 17 00:00:00 2001 From: Prabir Shrestha Date: Wed, 23 Nov 2016 19:58:15 -0800 Subject: [PATCH] fix langserver#util#get_uri() in windows (#13) --- autoload/langserver/util.vim | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/autoload/langserver/util.vim b/autoload/langserver/util.vim index 7d5043c..82cd0fe 100644 --- a/autoload/langserver/util.vim +++ b/autoload/langserver/util.vim @@ -13,7 +13,11 @@ let s:diagnostic_severity = { "" " Get a uri from a filename function! langserver#util#get_uri(name, filename) abort - return 'file://' . a:filename + if has('win32') || has('win64') + return 'file:///' . substitute(a:filename, '\', '/', 'g') + else + return 'file://' . a:filename + endif endfunction ""