Skip to content

Commit 170148a

Browse files
authored
Escape paths containing space (because windows)
The following content was showing up in `:messages` on startup after installing. ``` [gruvbox-material] Generated C:\Users\Dakota Lorance\AppData\Local\nvim-data\lazy\gruvbox-material\after\syntax Failed to run `config` for gruvbox-material vim/_editor.lua:431: C:\Users\Dakota Lorance\.config\nvim\init.lua..nvim_exec2() called at C:\Users\Dakota Lorance\.config\nvim\init.lua:0..C:\Users\Dakota Lorance\AppData\Local\nvim-data\lazy\gruvbox-material\colors\gruvbox-material.vim[1622]..function gruvbox_material#syn_gen, line 20: Vim(set):E518: Unknown option: Lorance\AppData\Local\nvim-data\lazy\gruvbox-material\after ``` The problem was caused by the default name of my windows user directory containing a space. e.g.: `C:\Users\First Last\`
1 parent b16dcd7 commit 170148a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

autoload/gruvbox_material.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ function! gruvbox_material#syn_gen(path, last_modified, msg) "{{{
319319
call gruvbox_material#ftplugin_detect(a:path)
320320
else
321321
echohl WarningMsg | echom '[gruvbox-material] Generated ' . rootpath . syntax_relative_path | echohl None
322-
execute 'set runtimepath+=' . fnamemodify(rootpath, ':p') . 'after'
322+
execute 'set runtimepath+=' . fnameescape(fnamemodify(rootpath, ':p')) . 'after'
323323
endif
324324
endfunction "}}}
325325
function! gruvbox_material#syn_write(rootpath, syn, content) "{{{

0 commit comments

Comments
 (0)