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 ""