This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-11-25
Channels
Anyone else using emacs as a JS editor? Man, it has become incredible laggy for me. https://github.com/mooz/js2-mode/issues/163
Not sure how to interpret that but considering the issue, I guess it's js2 that is just laggy with big files
I switched from js2 to LSP mode for js and ts a few years ago. I think js2 has always had issues with large files.
I use js-mode
+ lsp-mode
I think this is pretty much all my relevant config
(defun ed/setup-js-and-typescript ()
(interactive)
(lsp-mode)
(flycheck-mode +1)
(setq flycheck-check-syntax-automatically '(save mode-enabled))
(eldoc-mode +1)
(setq js-indent-level 2)
(setq typescript-indent-level 2)
(define-key js-mode-map (kbd "M-.") 'lsp-find-definition)
(subword-mode +1)
(yas-minor-mode-on))
(add-hook 'js-mode-hook #'ed/setup-js-and-typescript)
I think for me it was the victim of one of my Emacs bankruptcies. I guess it depends on how you installed it? Maybe check your custom.el
file for mentions of js2
and maybe M-x describe-variable auto-mode-alist
and see if it mentions js2-mode
anywhere? And maybe run (package-delete 'js2-mode)
?
About a week ago I updated the packages (by cleaning up the .emacs.d
folder basically), and something happened with the completion that I don’t really understand. I am in Python land these days, and it looks like it has to do with company
and the jedi
backend, maybe? Any ideas?
This is the error I get in the editor when it is about to autocomplete
Company: An error occurred in post-command
Company: frontend company-pseudo-tooltip-unless-just-one-frontend error "Args out of range: 0, -1" on command post-command
I hadn't heard of that error in particular but people have observed a bunch of stuff around company-mode lately Try using https://github.com/company-mode/company-mode/releases/tag/0.10.1 Its author has expressed that there's been rework over the last few weeks.
Thank you! Will try that
I was able to get the auto-complete back again by
• downloading a previous version (0.9.13)
• unzip it
• run package-install-file
and pick company.el
When looking into my .emacs.d/elpa
folder, there are two versions of company there (the latest, and the one manually installed with only a few files in it). When I restart emacs, it will load the latest version (I think). But running the install-file will re-enable the lost auto complete 😄
I have not done that much package install before, other than specifying the things I want in my init.el file. There’s probably a much better way than my manual approach.
Have you checked that you don't have a (package-install 'company)
somewhere in your .emacs.d?
There's of course the possibility of it being a transitive dependency of some other package. LMK
Yes, I had it there as a package to install. When installing the file, I think I expected the existing installation to be overwritten. Thank you for helping me find the cause and a workaround! I have also added an issue to the company
GitHub.
Solved: and it was a on me. It was an other package that caused the issues - the emojify
package that I had set to download from “melpa-stable”
At some point, that version became incompatible with company. Using “melpa” for this package solved all issues.