3 ms·
Use lsp-mode and company-mode for language completion. The lsp-mode connects to the language server on the language I'm developing for language specific semant
by ww520 4y ago
Use lsp-mode and company-mode for language completion. The lsp-mode connects to the language server on the language I'm developing for language specific semantic rules and syntax. Company-mode does the completion. It is a generic completion framework, which lsp-mode hooks into to provide language specific completion.
The best is that I can use the standard Emacs commands I'm familiar with to use LSP. E.g. Per your example, I can use the describe-thing-at-point command, which is in Emacs for the longest time, to show the inferred type of the variable at the cursor. I can use the same command to show the signature of a function. Lsp-mode hooks into the old command to do the magic based on language context.
Same with the company-mode. Since it's a generic completion framework, I'm already familiar with its commands and key bindings. It works the same for all languages and other editing mode. E.g. in writing English, the completion command would pop up a list of word choice.