Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [javascript]

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

30 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4 votes
0 answers
577 views

How to use dap-mode with TypeScript?

https://github.com/emacs-lsp/dap-mode provides DAP debugging for various languages (along the same lines as LSP does for completion, formatting, etc). How can I use that to debug programs written in ...
Croad Langshan's user avatar
4 votes
0 answers
2k 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-...
eugene's user avatar
  • 489
4 votes
0 answers
389 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(){ ...
Saravana's user avatar
  • 2,071
3 votes
0 answers
541 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' ...
WilliamKF's user avatar
  • 393
2 votes
0 answers
79 views

How to move by defun without moving up a level?

I am attempting to navigate methods in a file. Typically these are javascript or python files, which have a classes at the "top level", which in turn have methods nested within those ...
cammil's user avatar
  • 509
1 vote
0 answers
14 views

What is the correct way to make js2-next-error available when using js2-mode as major mode?

I'm using js2-mode. It provides js2-next-error, but apparently only when using js2-minor-mode and not when using js2-mode as a major mode. This is clear from the code in js2-mode.el (in version ...
mhucka's user avatar
  • 173
1 vote
0 answers
292 views

How to configure emacs for use with yarn 3?

The yarn package manager suggests a snippet of elisp to use: Create a .dir-locals.el with the following content to enable Flycheck and LSP support and make sure LSP is loaded after local variables ...
gburnett's user avatar
  • 165
1 vote
0 answers
49 views

Emacs freezes on javascript mode if I enter a newline after a dot character

Cursor is on the dot, I press newline, emacs hangs. This happens often to me I kill emacs and restart it. I come to this situation to break long lines at function calls at dot character. situation('...
eguneys's user avatar
  • 175
1 vote
0 answers
378 views

dap-mode for nodejs with nodemon

After 5 hours of googling and trying out different configurations i give up. How do i setup dap-mode for debugging nodejs with nodemon so that the debugger restarts when nodemon restarts? Non-solution ...
Simon's user avatar
  • 231
1 vote
0 answers
2k views

Emacs configure lsp-mode / lsp-ui

I work mainly with javascript and typescript. And I have enabled lsp-mode in Doom Emacs. But I am not very happy about the descriptions and information shown to me on hover. It is not very useful and ...
kresdjan's user avatar
1 vote
0 answers
62 views

tide-mode in org-edit-src-code

I want to activate tide-mode when using Javascript soruce code blocks, following this it works well with indium: https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-js.html But I want to use ...
anquegi's user avatar
  • 749
1 vote
0 answers
29 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 ...
mihovale's user avatar
1 vote
1 answer
216 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?
Matt's user avatar
  • 43
0 votes
0 answers
16 views

How can I load a specific language server for a particular file extension?

I'm using emacs29 on linux. At present, if I load a file with the extension '.tsx', and then do 'M-x lsp-mode' I get an error: 'Symbol’s value as variable is void: lsp-ada-project-file' I assume that ...
bob.dobbs's user avatar
  • 111
0 votes
1 answer
33 views

Disable code autocompletion in JS files

For some reason, my Emacs started autocompleting code. I have noticed this in both web-mode and rjsx-mode. For example, if I type <button></ it will autocomplete it to <button></...
cheryllium's user avatar
0 votes
0 answers
114 views

Uncommenting not working on Javascript file

I am trying to use the block un-comment command C-x C-; but I am getting the error message "Can't find the comment end". I am writing Javascript code in an .html file. The block comment ...
Lucas Myers's user avatar
0 votes
1 answer
837 views

Javascript mode mixes tabs and spaces for indent

My javascript mode indents with a mix of tabs and spaces. I'm ok with the mix if spaces are used for cosmetic alignment, but this is just wrong: First level of indentation is spaces, second is tab, ...
Gauthier's user avatar
  • 509
0 votes
0 answers
84 views

What doesn't my JavaScript layer automatically automatically format my JavaScript files?

When I open a JavaScript file, the file appears as plain text. When I activate javascript-mode in more (SPC SPC) on a .js file, then the file is correctly formatted. I have the layer installed with ...
Clarice Bouwer's user avatar
0 votes
2 answers
849 views

How to correctly configure Flow backend for LSP mode?

I'm using spacemacs @develop (branch). I can't use lsp and lsp-ui. In vscode everything works (using flow lsp mode). With company-flow I can also make it working. When opening a .js file with // @...
Robert Zaremba's user avatar
0 votes
0 answers
732 views

How to set up Emacs Tide to use auto-complete for completion instead of company-mode?

I installed Tide in Emacs, and found it is pretty useful for writing JavaScript code. But one thing is that Tide has built-in support for company-mode to do completions. Since I am an auto-complete ...
lebesgue's user avatar
  • 101
0 votes
0 answers
171 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 ...
kotchwane's user avatar
  • 515
0 votes
1 answer
125 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 ...
ebpa's user avatar
  • 7,499
0 votes
0 answers
186 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?
yPhil's user avatar
  • 983
0 votes
0 answers
57 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 (...
user avatar
0 votes
0 answers
176 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 ...
elethan's user avatar
  • 4,825
0 votes
0 answers
67 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 ...
jcubic's user avatar
  • 743
0 votes
0 answers
52 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 ...
ironsand's user avatar
  • 423
0 votes
0 answers
387 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 ...
Kittenmittons's user avatar
0 votes
0 answers
134 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 ...
jas's user avatar
  • 101
0 votes
2 answers
826 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
Cezar's user avatar
  • 193