1

I don't want to use js2-mode as major mode when editing js files. But I find I use swank-js very often(with magnar's slime-js setting).

Of course I know that swank-js depends on js2-mode Can I just (require 'js2-mode)(means not as major mode) and add some extra settings to enable swank-js ? Any help is appreciated.

Saddle Point
  • 3,074
  • 4
  • 23
  • 33
  • Why don't you want to use js2-mode? Maybe the problem is more easily fixed in that end. – Magnar Dec 11 '12 at 07:06
  • @Magnar It seems that I just don't use many of its features. Sometimes `paredit-kill` not work very well in js2 but in js-mode. And can I stop its syntax check? Syntax check is good, but I just feel that js2-mode's syntax check is a bit ... I'm sorry for my broken English, I don't know how to describe it. I just feel uncomfortable when I am typing in js2 with its syntax check. – Saddle Point Dec 11 '12 at 09:01
  • Yes, I know exactly how you feel. It is constantly telling me I have errors, when I'm just not done typing yet. You can turn it off with `(setq js2-mode-show-parse-errors nil)` - I don't know a fix for paredit-kill tho. – Magnar Dec 11 '12 at 09:57
  • @Magnar Thanks for your comment, I'll try it soon later. – Saddle Point Dec 11 '12 at 10:50
  • @Magnar After `(setq js2-mode-show-parse-errors nil)`, it seems nothing change. The minibuffer keep displaying error messages when typing. – Saddle Point Dec 11 '12 at 11:22
  • @Magnar Another odd thing is even I've set `js2-idle-timer-delay` to 0.1 or 0.05, when I am typing I can feel that the highlight is delayed and maybe it's waiting for finishing parsing the file. That will not happen in any other major mode I've try as after I type a keyword they highlight it immediately. I don't know if js2 needs time to parsing a file, even within 10 lines. – Saddle Point Dec 11 '12 at 12:41
  • @Magnar I've guess the simple highlight is separated from syntax check when I worked with a IDE before. – Saddle Point Dec 11 '12 at 12:48

1 Answers1

0

You can, of course without the feature that requires js2-mode like smart evaluation of statement and function definition. I have to write a functions to have evaluation of line and region.

tungd
  • 14,467
  • 5
  • 41
  • 45