I’d like to configure the smarttab mode using smarttab.kak
. I know how to configure the mode for files of various types, but how do I set the default mode to expandtab
while setting the mode to smarttab
or noexpandtab
for certain file types?
I tried to this and it didn’t work:
plug "andreyorst/smarttab.kak" defer smarttab %{
# when `backspace' is pressed, 4 spaces are deleted at once
set-option global softtabstop 4
} config %{
hook global WinSetOption .* expandtab # default
## override defaults??
# these languages will use `noexpandtab' behavior
hook global WinSetOption filetype=(makefile|gas) noexpandtab
# these languages will use `smarttab' behavior
hook global WinSetOption filetype=(c|cpp) smarttab
# these languages will use `expandtab' behavior
hook global WinSetOption filetype=(rust|markdown|lisp|scheme|sh|perl|purescript|elm|css|scss|html|javascript) expandtab
}
When I edit a makefile, the mode is set to expandtab
instead of noexpandtab
, even though the file type is correctly set to makefile
.
I’m clearly missing something about how Kakoune sets options. Help!