Questions tagged [javascript]

for the use (typically editing) of JavaScript code in Emacs.

1
vote
1answer
64 views

set js-indent-level from .eslintrc?

when I edit javascript, I'm usually actually editing someone else's code. Is there a way to dynamically set the value of js-indent-level from a .eslintrc file?
0
votes
1answer
59 views

Add a watch statement in Indium?

Is it possible to add a watch statement in Indium like you can in the node debugging utility? from Debugger | Node.js v9.10.1 Documentation: It is possible to watch expression and variable values ...
0
votes
1answer
441 views

Enable JSX folding in web-mode

I'm using web-mode to edit jsx files and I'm wondering what minor-mode can I use to add folding support. Is there anything out there that works? Thanks
4
votes
0answers
360 views

Web mode -indentation is misaligned on skipping semicolons

When i indent javascript code (inside html - web mode) that has no semicolons in it, the next statements are indented right with two extra spaces, <script> function processTemplates(){ ...
3
votes
0answers
1k views

flycheck eslint for javascript

I'm trying to setup a lint for javascript files. Here's the relevant setup I have. (use-package js2-mode :ensure t :init (progn (add-to-list 'auto-mode-alist '("\\.js?\\'" . js2-jsx-...
2
votes
0answers
118 views

How to generate TAGS tables for JavaScript with React?

I'd like to create TAGS tables for JavaScript ES6 code using React like the following: import React from 'react' import { observer } from 'mobx-react' import { Formik, Form, Field } from 'formik' ...
1
vote
0answers
23 views

Migrate Webstorm Code Highlighting

I am currently using Webstorm as my daily driver but I am trying to look into Emacs and possibly transition. One of the most important things to me that I have spent the last 3 years on was to ...
1
vote
0answers
89 views

how to get tern-mode to show documentation in the mini-buffer when autocompleting?

For my javascript setup within emacs, I am using tern-mode with company, using the following config. when auto-completing, I only get an 'usage example at dot', and the 'method signature in the mini-...
0
votes
0answers
13 views

Web-beautify JS code on Windows (js-beautify for unminimifying)

I'm trying to un-minimify JS code on Windows. I've installed web-beautify from MELPA. I also installed Node.js for Windows, which is a dependency of this package. I then ran npm -g install js-beautify ...
0
votes
0answers
110 views

better highlight syntax errors in javascript-IDE

I am using editing JavaScript in Emacs using the Javascript-IDE major mode. This is what I have in my .emacs file: (use-package js2-mode :mode "\\.jsx?\\'" :init (setq js2-highlight-level 3) ...
0
votes
0answers
80 views

Emacs and JSlint

Is there a way to make Emacs flycheck run JSlint (not flymake, not JShint, and not eslint) on the current file?
0
votes
0answers
42 views

comint-mode problem with C++ style comments (and quotes)?

This is a rephrase of my SO question https://stackoverflow.com/questions/44147993, which didn't receive much attention in SO. Basically, I suspect that I enountered a problem with nodejs-repl.el (...
0
votes
0answers
97 views

Evaluate entire buffer in skewer-mode

skewer-mode has been a very useful tool for me learning JavaScript. I constantly use skewer-eval-last-expression and skewer-eval-defun for debugging purposes, but I find that most of the time I want ...
0
votes
0answers
49 views

Css mode break indent region for javascript-mode

I have css-mode and javascript-mode and if I open css file the indent-region-function is set to css-indent-region which break javascript-mode indent region, how can I fix that? the workaround is to ...
0
votes
0answers
42 views

Is there a way to colorize markdown coding partial

I want to colorize code snippet in markdown-mode. # foo.rb def foo do_something end And javascript code. // bar.js function bar(){ do_something(); } In markdown-mode the codes are colored by ...
0
votes
0answers
214 views

Strange tabbing behaviour in .erb files

Note that I use spaces for tabs. When I am working in erb files for rails such as example.js.erb or example2.html.erb, I am getting some very odd (and annoying) auto-tabbing behaviour, which I can't ...
0
votes
0answers
121 views

Set javascript mode indents to (1-based) columns 5, 9, 13, 17,

When setting the js-indent-level to 4, my code is aligned in (1-based) columns 4, 8, 12, 16, ... To me this makes perfect sense, but unfortunately I'm sharing code with others whose editors ...