4 ms·
So how do you get intellisense and debug C++ in Zed?
by rs186 2y ago
So how do you get intellisense and debug C++ in Zed?
- LoganDark 2y agoZed uses open-source language servers. It just doesn't rely on proprietary extensions. I actually worked a bunch on the language server logic in Zed trying to get a bunch of it to work on Windows. All I have to say about that is: ugh.
- yoyohello13 2y agoclangd is an LSP. You can use it in any editor with LSP support https://clangd.llvm.org/ https://clangd.llvm.org/
- hu3 2y agoWhy isn't Cursor using this by default then?
- dharmab 2y agoI don't think MSVC provides an LSP, so the VSC C++ extension uses proprietary Intellisense features instead. LLVM provides their own extension to use the clangd LSP: https://marketplace.visualstudio.com/items?itemName=llvm-vs-code-extensions.vscode-clangd https://marketplace.visualstudio.com/items?itemName=llvm-vs-... In short: Corporate politics and the Cursor team taking the path of least resistance.
- dharmab 2y agoThere's a great doc on exactly how Zed handles syntax and intellisense-style completions: https://zed.dev/docs/configuring-languages https://zed.dev/docs/configuring-languages Debugging isn't in yet, but is actively being worked on and planned for public release before 1.0: https://github.com/zed-industries/zed/issues/5065 https://github.com/zed-industries/zed/issues/5065, there's an active channel in their Discord discussing the development of the feature.
- AbuAssar 2y agoWill they use DAP?
- dharmab 2y agoMy understanding is that DAP support is merged into their internal builds and is being polished up for a public release.
- pests 2y agoThat first link doesn’t really explain anything about syntax/autocomplete. It’s just about config options per language (formatted, linter, lsp) but I guess I was expecting something else?
- dharmab 2y agoIt explains it in clear terms: """ Zed's language support is built on two main technologies: Tree-sitter: This handles syntax highlighting and structure-based features like the outline panel. Language Server Protocol (LSP): This provides semantic features such as code completion and diagnostics. These components work together to provide Zed's language capabilities. """ Note this is _not_ how VSC's C++ Intellisense works. The VSC C++ plugin uses proprietary features of MSVC, it doesn't use LSP.
- pests 2y agoThat’s not really a description of anything, just a list of libraries zed uses, let alone a great doc. Just expected more than “its tree sitter and lsp”.