This does two things to the neuron_dir configuration argument before using it in the autocmd path match for setting up mappings:
Resolves the real path; this is necessary if the path given is a link of some kind, as vim autocmds appear to compare against the real path.
Escapes the path so it is safe to use a path with spaces in it.
Note: There are plenty of things other than spaces that, if present in the path, would break its use here. That said, neovim's documentation on file-pattern is lacking, and reading through the source code to try and figure out how they're actually interpreted was a complete nightmare, so I've just fixed the one problem I actually had. And hell, the other possible issues are ones people are a lot less likely to run into.
This does two things to the
neuron_dir
configuration argument before using it in the autocmd path match for setting up mappings:Note: There are plenty of things other than spaces that, if present in the path, would break its use here. That said, neovim's documentation on
file-pattern
is lacking, and reading through the source code to try and figure out how they're actually interpreted was a complete nightmare, so I've just fixed the one problem I actually had. And hell, the other possible issues are ones people are a lot less likely to run into.