Hello to everyone. I have a little problem, I have used Neovim Coc while learning Javascript and I want to know is if there is a way for lsp-mode to behave like Coc. For example, when typing the next in Neovim:

button.addEventListener("click", (e) => { alert("THIS IS A BUTTON!!!!"); e.target.style.background = "blue"; }); 

If I ask for completion for e.target.... in Coc, I get style option and background, etc. When I want to do this in lsp-mode in Emacs, I don't get any candidate.

Another example is if I select an HTML element by putting their class or id:

let test = document.querySelector(".this-is-a-class");

let test2 = document.querySelector("#this-is-an-id");

when I ask for property completion in Coc for test and test2, I get candidates corresponding to the HTML element. In lsp-mode I don't get any of these.

I don't know if Coc works like this or if lsp-mode doesn't have this feature. Sorry but English is not my first language.

submitted by /u/poijulaino
[link] [comments]