update blog post 28995b43
Steve · 2024-08-17 15:34 1 file(s) · +67 −11
src/content/post/leaving-neovim-for-zed.mdx +67 −11
5 5
tags: ["programming", "developer tools", "neovim", "zed"]
6 6
---
7 7
8 -
<img src="https://dweb.mypinata.cloud/ipfs/QmSaTFKCoJdjhfebDkUcYDc7NVC3oqxhCzCng9mkJoiqip" alt="cover-image" />
8 +
<img src="https://dweb.mypinata.cloud/ipfs/QmbthAXk65mJwDQnqY82xceLsUzUvzp5K2Nz3P79JNdvNC?img-quality=60" alt="cover-image" />
9 9
10 10
I think every developer has their own text editor journey and how they landed on the tool they use today. Perhaps I'm a geek but I love those stories. I have a great appreciation for developer tools and the work that goes into them. This post is for the other geeks out there that also care, and I hope my journey and perspective can prompt others to experiment and try developer tools outside their comfort zones. You never know what you might land on and how much you might enjoy it!
11 11
30 30
31 31
One of the biggest things that has stood out to me using Zed so far is how “everything just works.” There are so many features of an IDE or text editor that people take for granted until they have to set it up themselves in something lower level like Neovim. LSP (language server protocol) is certainly one of them. If you’re not familiar it’s the hints or errors that show up while you’re writing up your code, giving you deep insights to your repo on a language level. When you setup LSP in Neovim it’s a lot of work, and sometimes it can be a bit harder to figure out why it might be bugging out. However it does give you way more control and the option to do a lot of customization. With Zed LSP just works. There are configurations you can make to edit some things, but as a whole it just zips out of the box. There are already keybindings for things like “show definition”, “go to definition”, or even code actions. The only downside is outside of an extension you can’t use your own LSP that’s installed on your machine, but there’s always a pretty large language support that I haven’t had this issue yet.
32 32
33 -
<img src="https://dweb.mypinata.cloud/ipfs/QmcHSCCY3jehq2PaZfSR3o3R4qQojb5db1WpmYtJftEGbw" alt="image of LSP" />
33 +
<img src="https://dweb.mypinata.cloud/ipfs/QmNkysZ5Roy723sphUST8abmHakKR86K2YHXeeVTU22ASH" alt="image of LSP" />
34 34
35 35
Another piece that’s related to LSP is completions. This is when you’re typing some code and get  suggestions for auto completions that quickly fill the rest of the code out. LSPs usually have great auto-completion because they’re aware of the patterns used in that language. Just to be clear we’re not talking about Copilot yet, this is just completions for snippets and LSP. Once again with Zed it just works out of the box, unlike Neovim which ends up requiring several plugins to make it work right.
36 36
37 -
<img src="https://dweb.mypinata.cloud/ipfs/QmXC7XgUQKKejaXba6qRqM5qi1D4gVHMMZuLURJexyjinA" alt="gif of lsp completion" />
37 +
<video
38 +
  autoPlay
39 +
  muted
40 +
  loop
41 +
  playsinline
42 +
  className="w-full aspect-video"
43 +
  src="https://dweb.mypinata.cloud/ipfs/QmVEqwPxAoWgDwCLM3PrVxseLtLjCDK8LMxxz6DyD5fjxz"
44 +
></video>
38 45
39 46
Finally there’s Git integrations. What normally required multiple plugins in Neovim is again ready out of the box with Zed, including feature like toggling Git Blame, viewing diffs, and gutter symbols showing the status of edited lines.
40 47
41 -
<img src="https://dweb.mypinata.cloud/ipfs/QmTieQqgCXDRzKUynQwi5tvRBQf6dRkBJVafp69DJPVzYs" alt="git features gif" />
48 +
<video
49 +
  autoPlay
50 +
  muted
51 +
  loop
52 +
  playsinline
53 +
  className="w-full aspect-video"
54 +
  src="https://dweb.mypinata.cloud/ipfs/Qmcqv6kXnHHVbX8RxWpK6coPZHyNcPU7bxPfZ2Zwbsm6bz"
55 +
></video>
42 56
43 57
If I had to make a crude comparison, it’s similar to Linux and Apple. Linux will give you far more control over every piece of your software and hardware at the cost of spending time to configure it. Apple will give you less control but it will likely run smoother.
44 58
64 78
65 79
Zed also features an assistant panel where you can access several AI models via API, including OpenAI, Ollama, and Anthropic. Just requires a few lines of config to get started.
66 80
67 -
<img src="https://dweb.mypinata.cloud/ipfs/QmNQPCbUtH4wBpREkxFUtS66f24UVAYHukf6zVzprRZzyv" alt="gif of ai panel" />
81 +
<video
82 +
  autoPlay
83 +
  muted
84 +
  loop
85 +
  playsinline
86 +
  className="w-full aspect-video"
87 +
  src="https://dweb.mypinata.cloud/ipfs/QmPo8nXP8w9hJfxnhCpggrGKP89VbtiV1Rf3mFRHj9fUqA"
88 +
></video>
68 89
69 90
One feature that I think is particularly nice is the inline assistant, where you can select some lines of code and use `ctrl-enter` to trigger a request to be made to your code via the AI assistance configuration mentioned previously. If you like the results then you can confirm and keep coding.
70 91
71 -
<img src="https://dweb.mypinata.cloud/ipfs/QmYTVLrH7M2cHF8v26fwoA3FUHF5NRAwNJMWMFiw7jnNcx" alt="gif of inline assist" />
92 +
<video
93 +
  autoPlay
94 +
  muted
95 +
  loop
96 +
  playsinline
97 +
  className="w-full aspect-video"
98 +
  src="https://dweb.mypinata.cloud/ipfs/QmTTGznMRr64oqJG7hXFiCrqrTqXiY3kaPuQnhWbCCSAaL"
99 +
></video>
72 100
73 101
### Zed ≠ Neovim
74 102
152 180
}
153 181
```
154 182
155 -
<img src="https://dweb.mypinata.cloud/ipfs/QmXKbJt7K3DtLmHZGjEUryQxh1scESAh2w5qyc4nZLZVg1?img-quality=60" alt="reduced UI" />
183 +
<img src="https://dweb.mypinata.cloud/ipfs/QmVtqSNc6Ff9Zy8vBxr92AcVdh9eAGYkU8zWGLoyTnoeDL?img-quality=60" alt="reduced UI" />
156 184
157 185
### Plugin Replacements
158 186
167 195
}
168 196
```
169 197
170 -
<img src="https://dweb.mypinata.cloud/ipfs/QmVvhBcJ5bx2ZW2z86dEvMtcgWeN6Lx7FWqMCfjwmWCejK" alt="gif of tab switcher" />
198 +
<video
199 +
  autoPlay
200 +
  muted
201 +
  loop
202 +
  playsinline
203 +
  className="w-full aspect-video"
204 +
  src="https://dweb.mypinata.cloud/ipfs/QmQntcJQkJKoh2bmreRYun4BfDuLb8rXry6ZFmiVYPaeRx"
205 +
></video>
171 206
172 207
Speaking of Telescope, one big replacement is project wide search. While Zed doesn't have a fuzzy find feature, the project wide search is excellent. It will show all results in a multibuffer view which is pretty slick, and allows you to jump between that view and the buffer itself pretty easily.
173 208
174 -
<img src="https://dweb.mypinata.cloud/ipfs/QmSKTuKLBPjcqyZ5yY6AAubiGspQ7osmusSHYkqUX76Qom" alt="multibuffer gif" />
209 +
<video
210 +
  autoPlay
211 +
  muted
212 +
  loop
213 +
  playsinline
214 +
  className="w-full aspect-video"
215 +
  src="https://dweb.mypinata.cloud/ipfs/QmY2Cs7zBk7bEa7skNLBcA5dFnSmTS7CotFjftcMA2r3m1"
216 +
></video>
175 217
176 218
The terminal toggle is pretty similar to something like VSCode but there are some other hidden ways to get a better terminal experience. One of them is a shortcut to toggle the bottom terminal to be full screen, but even better is opening a terminal as a buffer in the main editing view.
177 219
184 226
}
185 227
```
186 228
187 -
<img src="https://dweb.mypinata.cloud/ipfs/QmQ4MV6JUigfEqeGcppjeomRtqahEHwh2re9DCScXj84Wy" alt="gif of terminal" />
229 +
<video
230 +
  autoPlay
231 +
  muted
232 +
  loop
233 +
  playsinline
234 +
  className="w-full aspect-video"
235 +
  src="https://dweb.mypinata.cloud/ipfs/QmYGcEqane6cpVPJj9H7qjgYmV75GPhmy7hkKob6YPVscY"
236 +
></video>
188 237
189 238
One of the big things I had to leave behind was Tmux and switching projects. While it isn't a perfect replacement, Zed has a "switch projects" feature which works really well and makes it pretty easy to switch contexts. You just won't get the exact same control and layout setup that you can get with Tmux
190 239
202 251
}
203 252
```
204 253
205 -
<img src="https://dweb.mypinata.cloud/ipfs/QmVeeV8KQ48TriBSkE8wqVCiHxufFnpjqA6EsLu5YD7bEu" alt="project switching" />
254 +
<video
255 +
  autoPlay
256 +
  muted
257 +
  loop
258 +
  playsinline
259 +
  className="w-full aspect-video"
260 +
  src="https://dweb.mypinata.cloud/ipfs/QmXh5mDRJyQRSCfmHNeZ5DDwnzPr3uo5mqCMQN1mLzGh6T"
261 +
></video>
206 262
207 263
## Should You Use Zed?
208 264