Since im using eslint, syntax checking from js-mode is redundant to me. so how to turn it off globally instead of toggling on and off?
I configured eslint not to check for semicolons, but js2-mode still checks it. if js2-mode syntax checking cant be disabled globally, is there a way to only turn off semicolon check?
shangsunset's answer only disables the semi-colon warning, to disable all js2-mode errors and warnings globally, you'll need something like this in your .spacemacs's dotspacemacs/user-config section:
;; Turn off js2 mode errors & warnings (we lean on eslint/standard)
(setq js2-mode-show-parse-errors nil)
(setq js2-mode-show-strict-warnings nil)
putting (setq js2-strict-missing-semi-warning nil) in .spacemacs solves my issue.
I found a way to toggle manually SPC t s. There's documentation as to how to disable it in your .spacemacs file, but I haven't been able to get it to work.
Related
I am Emacs (v24.5) newbie and I use it with ergoemacs-mode (v5.14.7.3.1) key-bindings.
I often need to edit data in YAML format manually and I do it in yaml-mode (v20160101.921) because of its highlighting and proper indenting.
However, when I try to set-mark in yaml-mode with ergoemacs-mode keys M-SPC it does nothing and only says:
edmacro-parse-keys: M- must prefix a single character, not SPc
Could you, please, suggest how can I make M-SPC behave in yaml-mode as it does everywhere else in Emacs (i.e., org-mode, ess).
Edit: Solved in newer version of ergoemacs-mode
I've been using cperl-mode in Emacs for some time. On a new system, I've been getting a problematic behaviour: when I type something like "if", Emacs expands it into a full-blown statement, so it'll automatically give me
if () {
}
This is really distracting. Setting cperl-electric-keywords to nil doesn't change this behaviour. I already have cperl-hairy set to nil.
I see there was discussion of this on Perl Monks here http://www.perlmonks.org/?node_id=864654 , and it does work, as suggested there, to say cperl-toggle-abbrev, or to use the menu Perl -> Toggle -> Electric Keywords. But I want this behaviour to be permanent, and putting (setq cperl-electric-keywords nil) into my .emacs doesn't work.
How can I modify my .emacs to handle this?
In the above screenshot, it can be seen that Emacs highlights the whitespace between parentheses, unless I move my cursor one place to either side.
I have smartparens enabled in my emacs config, but even if I disable them, this problem still persists.
I also don't have whitespace-mode enabled.
Any idea what may be causing this?
The relevant part of my config:
(require 'smartparens-config)
(smartparens-global-mode t)
(show-smartparens-global-mode t)
Thanks.
Unfortunately the solution given by Ignacy Moryc, didn't help me, but this one helped:
(setq sp-highlight-pair-overlay nil)
This looks like show-paren-mode
If you have (show-paren-mode t) anywhere in your config file, you might want to remove it. Or you can change the show-paren-style variable value to parenthesis
(setq show-paren-style 'parenthesis)
I'm facing a very bizarre behaviour. No matter how I set ac-auto-start, be it through customization, by evaluating (setq ac-auto-start 2), (setq-default ac-auto-start 2) or (setq-local ac-auto-start 2) immediately after I do it, the variable is set to nil.
I've looked through the source of auto-complete mode and the ac-slime in my case, but none of these does nothing to this variable. I am at a loss as to how to deal with this.
The effective consequences of this malfunction is that completion combobox doesn't appear on its own, unless I force it to by doing M-x auto-complete. This behaviour is consistent in all modes where auto-complete minor mode is enabled.
EDIT
This seems to be an issue with latest Emacs. Now it fails to modify variables values, no matter what variable it is. So, say, after running it with -Q I've now discovered that I can't evaluate the code that uses (setq ...) forms as it has no effect. :/ So, please, hold on, I'll try to investigate this...
This was due to the typo, but the original problem is still there.
Emacs version is 24.3.50.1 pulled from trunk about a week ago.
auto-complete is version 1.4 installed from MELPA.
I'm setting the variable by moving the point to the REPL buffer, then M-:. I check its value in the same way.
EDIT2
OK, I finally found the reason: I had enzyme package installed, and it had an earlier version of auto-complete inside of it, for some reason parts of the auto-complete code were loaded from there and other parts from the one installed from MELPA. After disabling enzyme it all works well now.
EDIT3
This still happens after I run (auto-complete-mode 1) in the REPL buffer. The variable will become impossible to set. I've searched through various autocomplete timers that may be setting something, but no luck so far.
There is indeed something strange going on with the setting of auto-complete-mode.
(I'm using the ELPA version in a GNU Emacs 24.3.1)
This is set up by customize-group RET auto-complete :
'(ac-auto-show-menu t)
'(ac-auto-start t)
At this point if you M-x auto-complete-mode you get a [no match] right in the minibuffer. Only after you try to M-x auto-complete, yelding a "auto-complete-mode is not enabled" weird error, will you be able to M-x auto-complete-mode (but without command completion... Hm) and then be in the mode.
If you put this in your init file (.emacs)
(require 'auto-complete)
(auto-complete-mode t)
It will be effective only if you re-eval it after startup (?!?).
The same with something like
(if (auto-complete)
(auto-complete-mode t))
The only way that I found to get auto-complete-mode to load at startup is to :
(eval-and-compile
(require 'auto-complete nil 'noerror))
(The above customize options are now effective)
It sounds easy but I can't fix it: I want to permanently disable automatic spell-checking in emacs. There must be a simple line for my init.el. Can somebody help me?
Figure out why it's on in the first place (it isn't enabled by default), then fix that. Either your init file is turning it on, or else some system-wide init file is. Read about those files: http://www.gnu.org/software/emacs/manual/html_node/emacs/Init-File.html
From a brief look, the simplest way I can see is to redefine the function:
(eval-after-load "flyspell"
'(defun flyspell-mode (&optional arg)))
or you could use advice to force the argument to always be -1 (see C-h f turn-off-flyspell), but that would be slightly more complex and less efficient for no good reason.
If you want to know what is running it in the first place, you could use M-x debug-on-entry flyspell-mode, which will show a stack trace when the function is called (q to exit the debugger; C-h m to list other commands; M-: (info "(elisp)debugger") for help). Use M-x cancel-debug-on-entry to remove that breakpoint.
(flyspell-mode 0)
I found mine in ~/.emacs.d/usk/text.el
I deleted the block of code having to do with FlySpell and closed emacs.
After reopening emacs, I still saw the spelling error (red underline). However, I simply deleted and retyped the "misspelled" words and then, emacs didn't underline. Problem solved.
I'm running Debian.
In my case flyspell-mode has been gaining ground in the .emacs.desktop file.
This was not the first time that desktop-mode causes pain in restoring obsolete things. In this case it restored all modes on a per-file basis, although in .emacs.el I had already disabled flyspell-mode and flyspell-prog-mode everywhere.
Solution: either edit the .emacs.desktop file or delete it.
Using Emacs graphical mode you can just right click above "Fly" minor mode bellow and select "Turn Off minor mode" like this: