5 ms·
Is there code-completion/intellisense baked-in as of Emacs 29? I think not. Why can't something that is built into IDEs like Intellij be built into Emacs even
by billfruit 3y ago
Is there code-completion/intellisense baked-in as of Emacs 29? I think not.
Why can't something that is built into IDEs like Intellij be built into Emacs even after 30+ years of development?
- G3rn0ti 3y agoYou don’t understand how Emacs works. It is not supposed to be an IDE from the get-go. But there are extensions that together can turn it into one. For whatever language you program with.
- billfruit 3y agoI understand that, my point was that the LSP server which is required for code completion to work is not built in/packaged together with Emacs.
- G3rn0ti 3y agoThere are hundreds of language servers out there. Even VScode does not ship all of those. Emacs‘ LSP client „lsp-mode“ tries to download them for you if possible. For example, in case of JavaScript and TypeScript you don’t have to provide it yourself.
- ljm 3y agoIt is built in, and it’s better with eglot. It’s just not enabled by default because emacs isn’t used exclusively for programming.
- billfruit 3y agoIt's not built in, eglot is only an LSP client, it requires a LSP server to function which is not included with Emacs.
- G3rn0ti 3y agoSee my comment above. LSP servers are complicated beasts coming with a lot of specific dependencies. It is simply impossible to ship all available language servers together with Emacs. Even VSCode does not do it. For popular languages it downloads them automatically for you. But this is exactly what "lsp-mode" (the alternative to "eglot.el") does, too [1]. If you are an expert in a specific language it also should not be too difficult for you to install and setup one yourself. My personal prediction, however, is this: Thanks to the advent of the static parser framework "treesitter" we will see language servers becoming obsolete in the long run. Treesitter enables an editor to load a parser backend as a plugin and on top of that provides a powerful query API to semantically analyse your code. This should be sufficient to implement all of what an external language server does already but inside the editor's process. [1] https://emacs-lsp.github.io/lsp-mode/page/languages/ https://emacs-lsp.github.io/lsp-mode/page/languages/
- billfruit 3y agoYes it can be set up, but my point was precisely that it(LSP servers for popular languages) is not baked into Emacs, instead making them complicated external dependencies necessary to be set up to get a basic IDE functionality of code completion working. Code completion works out of the box for example in IntelliJ for example without needing to download and install further packages. The tree sitter approach does sound something along in that direction, that should bode well if it works out.
- schmooser 3y agoDid you ask why does JetBrains have so many IDEs, each for different language? PyCharm, WebStorm, RubyMine, CLion, Idea. Emacs has LSP client that works will all LSP servers. It's your responsibility to bring an LSP server or implement your own, not Emacs'.