I’m usually fine with swap files being created in the same directory as the files being edited—I have the
directory setting left on its default value. I have one project, though, with “file watching” functionality that gets confused by swap files.
I notice that
directory is a global setting (i.e. you can’t set it on a per-buffer basis). Is there some workaround so that I can change where swap files are put only when I’m editing files within a certain directory?