I am using spacemacs to work on a few different projects and these projects have vastly different coding standards. Tabs vs spaces, 80 columns vs 100 columns, etc, etc. I'm trying to define a way to apply a handful of different styles based on directory. I don't want to hard code project paths into my .spacemacs nor do I want to litter my project directory with editor config data. For this reason, I'm trying to define a class of settings and then apply them to a directory.
I have this chunk in my
(dir-locals-set-class-variables 'linux-kernel '(c-mode . ((indent-tabs-mode . 't) (c-default-style . "linux") (c-basic-offset . 8) (tab-width . 8) (fill-column . 80) (evil-shift-width . 8))))
Then I open up a file in a kernel tree and none of these settings are applied. Of course this is expected because I have defined a dir locals class and not applied it. So then I do
:(dir-locals-set-directory-class "/path/to/some/kernel/dir" 'linux-kernel), but the kernel code that I was editing (under the folder mentioned in the previous command) doesn't have any of the new settings applied. Any additional files opened in that directory also don't have the settings applied.
I'm pretty new to emacs, so I could be making a really basic mistake. Did I apply the class correctly?