igbanam / dotfiles

Things I need to setup my computer
MIT License
2 stars 0 forks source link

Migrate to Vim9 #16

Closed igbanam closed 2 years ago

igbanam commented 2 years ago

With the new Vim9, a lot of Neovim users are migrating to Lua. I'm going the other direction.

Developing with Vim9 happens to be closer to typed Ruby (i.e. Crystal-ine). Knowing Vim9 would allow me break free from plugins quicker. Moving to Lua would only leave me dependent on the Neovim ecosystem; which — don't get me wrong — is very good, but is an extension of the original Vim ecosystem.

Another major reason for me choosing Vim9 over Lua is: Lua is not built for Neovim. This means there would always be a layer visible to developers which binds Neovim to Lua. Another level worse is the visible glue layer when you want to interface with native Vim from Lua for Neovim. Vimscript is custom-designed to script the Vim editor. The language has gotten better, and it closely integrates with Vim internals.

Imagine when some new editor extends Vim 9 😏

igbanam commented 2 years ago

A notable mention which isn't part of this PR.

I noticed I lost my configuration for languageserver.sobet. Turns out this was added to my :CocConfig in Neovim. This is different from the :CocConfig in Vim because the runtimepath both vary. Vim has its runtimepath at ~/.vim/ while Neovim has its at ~/.config/nvim/.

To fix this, I simply copied coc-settings.json from Neovim's rtp to Vim's.

igbanam commented 2 years ago

This comes with a little but of screen jitter; but my hopes is that it'll fade into the subconscious with practice.

igbanam commented 2 years ago

EdgeDB isn't part of the migration to Vim9, but good-god! what a coincidence to find this.

igbanam commented 2 years ago

The only hiccup I've seen with this so far is preservim/nerdtree#1321

My comment on that issue is the fix which currently works PLUS in the minimal nature of Vim, I think I like that a lot better.

sukima commented 2 years ago

Bravo! 👏 That is a fantastic PR description. Not just in information exchange and providing context—I wish all my PR reviews had descriptions like that—but also in that it has very clear on the pros/cons between Neovim Lua and Vim VimScript9. Which BTW I agree with you 1000%

igbanam commented 2 years ago

This seems to be taking shape. It's been 2 months since the original PR, and nothing has broken so far. Matter of fact, building out for Vim has gotten a bit easier; AND Vim has started getting out of the way so work can be done through Vim, and not in Vim.

An example of this setup is in https://github.com/vim/vim/issues/10537#issuecomment-1261399021