Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot enable the js-mode with javascript layer #9665

Closed
eggcaker opened this issue Sep 29, 2017 · 7 comments
Closed

Cannot enable the js-mode with javascript layer #9665

eggcaker opened this issue Sep 29, 2017 · 7 comments
Labels
stale marked as a stale issue/pr (usually by a bot)

Comments

@eggcaker
Copy link

Description :octocat:

Cannot enable the js-mode after open any .js file

Reproduction guide 🪲 - Start Emacs

  • open a .js file

Observed behaviour: 👀 💔

Expected behaviour: ❤️ 😄

System Info 💻

  • OS: darwin
  • Emacs: 25.3.1
  • Spacemacs: 0.200.9
  • Spacemacs branch: develop (rev. 3d0dbf28)
  • Graphic display: t
  • Distribution: spacemacs
  • Editing style: vim
  • Completion: ivy
  • Layers:
(javascript vimscript python nginx
            (typescript :variables typescript-fmt-on-save t)
            html ruby csv lua osx sql docker
            (auto-completion :variables auto-completion-return-key-behavior 'complete auto-completion-tab-key-behavior 'cycle auto-completion-private-snippets-directory "~/.spacemacs.d/snippets/" auto-completion-complete-with-key-sequence "jj" auto-completion-complete-with-key-sequence-delay 0.1 auto-completion-enable-snippets-in-popup t auto-completion-enable-help-tooltip t auto-completion-enable-sort-by-usage t :disabled-for org erc sh)
            ivy emacs-lisp
            (org :variables org-enable-github-support t org-enable-org-journal-support t org-enable-bootstrap-support t org-enable-reveal-js-support t)
            git
            (markdown :variables markdown-live-preview-engine 'vmd)
            yaml
            (ibuffer :variables ibuffer-group-buffers-by nil)
            (shell :variables shell-default-term-shell "/usr/local/bin/zsh" shell-default-shell 'eshell shell-enable-smart-eshell t shell-default-height 30 shell-protect-eshell-prompt nil shell-default-position 'right)
            shell-scripts syntax-checking version-control javascript restructuredtext docker java
            (python :variables python-fill-column 110 python-sort-imports-on-save t python-enable-yapf-format-on-save t)
            evil-commentary
            (elfeed :variables url-queue-timeout 30 elfeed-enable-web-interface nil rmh-elfeed-org-files
                    (list "~/.spacemacs.d/pelm-feed/feeds.org"))
            (restclient :variables restclient-use-org t)
            imenu-list pelm-misc pelm-org pelm-org-trello pelm-contact)
  • System configuration features: JPEG RSVG IMAGEMAGICK NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES

Backtrace 🐾

Eager macro-expansion failure: (error "Don’t know how to make a localized variable an alias") [2 times]
File mode specification error: (error Don’t know how to make a localized variable an alias)
@mimischi
Copy link

mimischi commented Oct 2, 2017

One thing I could think of is VueJS. Currently there is only vue-mode and it's using mmm-mode to display the HTML template, JS and CSS in one .vue file. js2-mode does not support mmm-mode (see this js2-mode issue) and therefore one needs to use js-mode. But I'm currently not sure if having the javascript layer enabled even competed with vue-mode at all. Need to isolate my configurations and test it out.

@offbyone
Copy link

I don't know if this will be relevant, but I'm seeing this too, specifically when I try to open a Javascript file after opening a Python one. The other order works just fine.

System Info 💻

  • OS: darwin
  • Emacs: 26.1
  • Spacemacs: 0.300.0
  • Spacemacs branch: nil (rev. nil)
  • Graphic display: t
  • Distribution: spacemacs
  • Editing style: emacs
  • Completion: helm
  • Layers:
(shell-scripts react lua go nginx csv sql graphviz elixir javascript auto-completion better-defaults emacs-lisp git markdown
               (shell :variables shell-default-height 30 shell-default-shell 'shell shell-default-position 'bottom)
               cr-shell spell-checking syntax-checking version-control yaml html java scala
               (ruby :variables ruby-enable-enh-ruby-mode t ruby-version-manager 'rbenv)
               emacs-lisp python pandoc docker ansible themes-megapack terraform pdb spacemacs-layouts)
  • System configuration features: NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES THREADS

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!

@github-actions github-actions bot added the stale marked as a stale issue/pr (usually by a bot) label Feb 28, 2020
@offbyone
Copy link

I mean... it's stale because nobody on the project has responded :)

IS there more information we, as submitters and commenters, could add?

@duianto
Copy link
Contributor

duianto commented Mar 10, 2020

Opening a .js seems to work for me on the develop branch.

SPC h d m (which calls describe-mode) shows:

Javascript-IDE mode defined in ‘js2-mode.el’:
Major mode for editing JavaScript code.

I'm only "strange" message I'm seeing in the messages buffer, is:

Package iswitchb is obsolete!

But this comment: #2423 (comment)
says that iswitchb is a deprecated Emacs core package.

I'm not finding any reference to iswitchb in Spacemacs, so it's coming from an upstream package.

These are the packages that the javascript package uses:

(setq javascript-packages
'(
add-node-modules-path
company
counsel-gtags
dap-mode
evil-matchit
flycheck
ggtags
helm-gtags
imenu
impatient-mode
import-js
js-doc
js2-mode
js2-refactor
livid-mode
nodejs-repl
org
prettier-js
skewer-mode
tern
tide
web-beautify
))

There's no error either if a .py file is opened before or after the .js file.

The only message when opening a .py file is:

Importmagic and/or epc not found. importmagic.el will not be working.

But I'm not sure if imagemagic even is supported in Windows so it's probably expected.

Windows 1903
#### System Info :computer:
- OS: windows-nt
- Emacs: 26.3
- Spacemacs: 0.300.0
- Spacemacs branch: develop (rev. 884afe138)
- Graphic display: t
- Distribution: spacemacs
- Editing style: vim
- Completion: helm
- Layers:
```elisp
(autohotkey auto-completion c-c++ command-log emacs-lisp git github
            (gnus :variables gnus-summary-thread-gathering-function 'gnus-gather-threads-by-subject)
            go helm imenu-list javascript
            (markdown :variables markdown-live-preview-engine 'vmd markdown-command "vmd")
            multiple-cursors org pdf python
            (shell :variables shell-default-shell 'shell shell-default-height 30 shell-default-position 'bottom)
            spell-checking syntax-checking treemacs version-control)
```
- System configuration features: XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS THREADS LCMS2

@LoganBarnett
Copy link

@eggcaker Did you close this issue because you found a solution? If so, could you please share it?

@LoganBarnett
Copy link

@eggcaker disregard - I found your js2-mode ticket while researching further. For posterity it can be found here. This solution doesn't work for me but I have filed mooz/js2-mode#545 in hopes that I might gain more traction there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale marked as a stale issue/pr (usually by a bot)
Projects
None yet
Development

No branches or pull requests

5 participants