conform.nvim
conform.nvim copied to clipboard
Account for spaces in the file path when formatting with stylua
Hi,
I found a bug when formatting a file that has spaces in its path using stylua on Windows.
The command that was being executed was something like:
stylua --search-parent-directories --stdin-filepath C:\\some\\path with\\spaces.lua
This was causing stylua to search for C:\\some\\path and with\\spaces.lua as two separate files and crash.
I simply added simple quotes around the $FILENAME environment variable so the executed command would be:
stylua --search-parent-directories --stdin-filepath 'C:\\some\\path with\\spaces.lua'
I don't think this should break anything but i didn't do much testing. Let me know if you want me to look at some particular test cases.