viseztrance / brightscript-mode

Major emacs mode for the BrightScript programming language used by BrightSign and Roku devices
GNU General Public License v3.0
1 stars 4 forks source link

mode is not active when visiting a brs file #2

Closed xvtstephen closed 2 years ago

xvtstephen commented 3 years ago

I installed from melpa and added the require line in .emacs. It starts emacs without any error messages, but when I visit a brs file the mode stays Fundamental. I went in .emacs and evaluated the require brightscript line again without errors. still it stays in funadamental. am I supposed to add hooks to switch to brs mode in my emacs or sth is not working? I see there is an .elc file, so the el file must have been evaluated.

$ find . -name "brightscript-mode.el*"
./.emacs.d/elpa/brightscript-mode-20200321.2126/brightscript-mode.elc
./.emacs.d/elpa/brightscript-mode-20200321.2126/brightscript-mode.el
./Public/Downloads/brightscript-mode.el
viseztrance commented 3 years ago

Though this is my first package, modes usually don't define these associations. I should had probably add some info in the readme on how to do it, sorry about that!

In your emacs config ex. ~/.emacs.d/init.el (or wherever it lies on your machine), add the following line:

(add-to-list 'auto-mode-alist '("\\.brs\\'" . brightscript-mode))

Alternatively, if you're still having problems you can always call the mode yourself. After opening the brs file, run ALT + X, then type brightscript-mode.

viseztrance commented 2 years ago

I have updated the readme with the file association instructions.