1 line
1.6 KiB
Plaintext
1 line
1.6 KiB
Plaintext
<!-- SC_OFF --><div class="md"><p>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:</p> <pre><code>button.addEventListener("click", (e) => { alert("THIS IS A BUTTON!!!!"); e.target.style.background = "blue"; }); </code></pre> <p>If I ask for completion for <a href="https://e.target"><code>e.target</code></a><code>....</code> in Coc, I get <code>style</code> option and <code>background</code>, etc. When I want to do this in lsp-mode in Emacs, I don't get any candidate.</p> <p>Another example is if I select an HTML element by putting their class or id:</p> <p><code>let test = document.querySelector(".this-is-a-class");</code></p> <p><code>let test2 = document.querySelector("#this-is-an-id");</code></p> <p>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.</p> <p>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.</p> </div><!-- SC_ON -->   submitted by   <a href="https://www.reddit.com/user/poijulaino"> /u/poijulaino </a> <br/> <span><a href="https://www.reddit.com/r/emacs/comments/r5xknm/configure_lspmode_to_behave_more_or_less_like/">[link]</a></span>   <span><a href="https://www.reddit.com/r/emacs/comments/r5xknm/configure_lspmode_to_behave_more_or_less_like/">[comments]</a></span> |