0

I am using use-package and straight (with (setq straight-use-package-by-default t)) to load my packages.

I would like to use this scss-mode package to work SCSS files. I am loading it with

(use-package scss-mode :mode "\\.scss'" :config (setq scss-compile-at-save t scss-sass-command "sassc")) 

But Emacs still uses the built-in scss-mode when I open .scss files. How can I use the above mode instead? (Emacs 29.4).

2
  • What does M-x locate-library RET scss-mode RET say? If it does not point to where you've installed the mode, add the path to your load-path, at the beginning so it will override the built-in one. Also, I don't think your :mode specification above is correct. You should probably use what the linked documentation shows: : mode ("\\.scss\\'" . scss-mode). Check your auto-mode-alist to make sure it's correct. Commented Jan 28 at 14:31
  • This question is similar to: Make emacs automatically open binary files in hexl-mode. If you believe it’s different, please edit the question, make it clear how it’s different and/or how the answers on that question are not helpful for your problem. Commented Jan 28 at 19:18

1 Answer 1

0

See this link how to install a custom recipe. For your case, it should be something like this:

(straight-use-package scss-mode :straight (scss-mode :host github :repo "antonj/scss-mode" :files ("antonj/scss-mode/*.el")) :mode ("\\.scss\\'" . scss-mode)) 

If this is OK, then you can add your :config section as described in your code snippet.

1
  • I have nothing against old packages, but just wondering why you don't like the up-to-date built-in package. Commented Jan 30 at 14:04

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.