Fully-Faltoo blog by Pratyush

Bio Twitter Screener

12th Feb. 2024

Trying out Neovim and Zed

I was a VS Code user for last many years. Though it "just worked", it
started getting slower. It became too magical and too bundled. It became harder to configure and customise. I had too many plugins and I didn't know what was overriding what.

This is when I read about Zed. I liked their simplicity and speed. Zed provides very limited configuration options. This makes it easy to configure and understand what's happening.

Zed introduced me to the concepts of "tree-sitter" and "LSP":
  • Tree-Sitter: is it a grammar parser. It tells what is a variable, what is a function, what is a comment, and this is then used for syntax highlighting.
  • Language server protocol (LSP): this is responsible for linting, auto-completion, code lookups, definition jumping, auto-imports and other things. This is actually what makes our interaction with the languages easy.
Zed doesn't let us change the LSP. I also found their vim mode a bit patchy. That's when I started exploring Neovim.

Climbing the steep Neovim mountain

Using Zed has made me greedy for speed and curious for configuration. I think I can get my perfect code-editor if configure (Neo)vim right.

Vim already gives me 50% of what I want – a perfect vim-mode. Now I only want a few more things.
  • Choose my own LSP (ruff-lsp, elixis-ls)
  • Use Tree-Sitter
  • Cmd+D for multiple cursors
  • Cmd+p for fuzzy file search
  • Cmd+shift+p for all menu options
I am still configuring my init.lua file after 5 days. Each day I feel I am coming closer to my idle editor. And each day I discover a new rabbit-hole.
  • Day 1 went in getting and understanding the plug-in system - lazy.
  • Day 2 went in adding lots of plugins for comments, indents, auto-close of tags and brackets. Though tiring, I liked this "do-one-thing-well" approach.
  • Day 3 went in configuring LSPs. Elixir is working quite well now.
  • Day 4 and 5 has gone into configuring LSPs for Python. I want to use ruff-lsp along with pyright. I still haven't been able to get the two working without overlaps.
I am not sure if I am wasting time and will fallback to VS Code. Let's hope I am able to climb this Neovim peak.

Leave a comment

Your email will not be published.