Reputation: 513
Has anyone integrated smart-tabs-mode and scala-mode2 before? I'm trying to figure out what to add to smart-tabs-insinuate-alist to support scala - does anyone know?
Upvotes: 0
Views: 244
Reputation:
I do not use smart-tabs or scala-mode so my answer may not be complete. According to smart-tabs mode's emacswiki page. You can add support for additional languages using smart-tabs-add-language-support
you will need to specify the the following parameters
1) Language name
2) Language mode hook
3) Indent line functions (and indent region function)
4) Offset variable
Looking at scala-mode2
it appears to provides a language mode hook (scala-mode-hook
), indent line function (scala-indent:indent-line
) and offset variable (scala-indent:step
) (it apparently does not provide a function to indent a function). Using this info and assuming that I understood smart-tabs manual correctly you can add support for scala-mode2 using the following code
(smart-tabs-add-language-support scala scala-mode-hook
((scala-indent:indent-line . scala-indent:step)))
Then to activate the support do
(smart-tabs-insinuate 'scala)
Also smart-tabs has a github repository, you can always report issues if something does not work for you.
Upvotes: 2