How to get autocomplete for plain JS or commonjs files? reddit / emacs ---------------------------------------------------------------------- dash_o_truth · 2022-08-17 04:36 Hi, I'm using Doom and lsp works great in `rjsx-mode` for `js` files, but for simple, plain es6 js files like: const express = require("express"); const app = express(); I don't get any autocomplete. How do I get it to autocomplete? In vscode, `app.` just works, so what do I need to do? ---------------------------------------------------------------------- dash_o_truth · 2022-08-17 12:24 I managed to get it working, Doom's LSP wasn't installing `typescript- language-server` alongside `typescript` at `/home//.emacs.d/.local/etc/lsp/npm/`; manually installing it there seems to make autocomplete work. But now how do I get the `lsp-ui-doc-show` to show as I'm typing? I have to manually invoke it. ---------------------------------------------------------------------- PhantomSeahorse · 2022-08-17 18:43 https://emacs-lsp.github.io/lsp-mode/tutorials/how-to-turn-off/ ---------------------------------------------------------------------- dash_o_truth · 2022-08-18 10:07 Thank you for this! Is it possible for it to show while typing? I have to finish the word first, then it shows. In vscode it shows the best match while typing ---------------------------------------------------------------------- PhantomSeahorse · 2022-08-18 10:45 It might have something to do with your `company` package configurations. Try setting `company-idle-delay` to some small number like 0.2