Remix.run Logo
rs186 21 hours ago

So how do you get intellisense and debug C++ in Zed?

dharmab 20 hours ago | parent | next [-]

There's a great doc on exactly how Zed handles syntax and intellisense-style completions: 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, there's an active channel in their Discord discussing the development of the feature.

pests 11 hours ago | parent | next [-]

That 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 9 hours ago | parent [-]

It 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 3 hours ago | parent [-]

That’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”.

AbuAssar 15 hours ago | parent | prev [-]

Will they use DAP?

dharmab 15 hours ago | parent [-]

My understanding is that DAP support is merged into their internal builds and is being polished up for a public release.

yoyohello13 21 hours ago | parent | prev | next [-]

clangd is an LSP. You can use it in any editor with LSP support https://clangd.llvm.org/

hu3 19 hours ago | parent [-]

Why isn't Cursor using this by default then?

dharmab 16 hours ago | parent [-]

I 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-...

In short: Corporate politics and the Cursor team taking the path of least resistance.

LoganDark 21 hours ago | parent | prev [-]

Zed 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.