Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set the default mode of file in Spacemacs?

Tags:

spacemacs

Every time I open a .js file with Spacemacs, the default mode is web-mode. But what I want is react-mode.

Is there any way to achieve this ? Thanks.

like image 870
user2331095 Avatar asked Jan 22 '16 09:01

user2331095


1 Answers

I found some information from #4751.

We can simply add (add-to-list 'auto-mode-alist '("\\.js\\'" . react-mode)) to docspacemacs/user-config in .spacemacs.

like image 148
user2331095 Avatar answered Sep 30 '22 23:09

user2331095