sainnhe / edge

Clean & Elegant Color Scheme inspired by Atom One and Material
MIT License
869 stars 56 forks source link

let g:edge_better_performance = 1 cause errors on Windows #20

Closed jdhao closed 3 years ago

jdhao commented 3 years ago

Steps to reproduce. Use the following minimal config:

set runtimepath+=C:\Users\Administrator\AppData\Local\nvim-data\plugged\edge
let g:edge_enable_italic = 1
let g:edge_better_performance = 1
colorscheme edge

Open nvim with nvim -u minimal.vim. I am seeing a lot of errors.

Judging from the errors. It seems that edge try to create directory C:\Users\Administrator\AppData\Local\nvim-data\plugged\edge\colors\edge.vim\after\ftplugin. In fact it should create directory: C:\Users\Administrator\AppData\Local\nvim-data\plugged\edge\after\ftplugin.

jdhao commented 3 years ago

The culprit is the following comamnd here:

    return substitute(a:path, '/colors/edge\.vim$', '', '')

Since file path on Windows use backslash, the above command can not get the root directory of plugin edge. It still returns the full path to edge.vim: C:\Users\Administrator\AppData\Local\nvim-data\plugged\edge\colors\edge.vim. We need to figure out another way to get the root path of edge.

sainnhe commented 3 years ago

Thank you for the fix!