Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to Vim9 #16

Merged
merged 40 commits into from Oct 2, 2022
Merged

Migrate to Vim9 #16

merged 40 commits into from Oct 2, 2022

Conversation

igbanam
Copy link
Owner

@igbanam igbanam commented Aug 16, 2022

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
Copy link
Owner Author

igbanam commented Aug 16, 2022

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
Copy link
Owner Author

igbanam commented Aug 17, 2022

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

@igbanam
Copy link
Owner Author

igbanam commented Aug 18, 2022

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

@igbanam
Copy link
Owner Author

igbanam commented Sep 4, 2022

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
Copy link

sukima commented Sep 14, 2022

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%

truly, I can't remember what these do, but I've been using them since
and the behaviour seems stable, and there's no impact on the way I work.
There's no harm in keeping them.
It was getting annoying when the indent gets reapplied for every
keystroke. This broke tags longer than 80 lines. Best I could triage,
this behaviour comes from runtime/xmlformat.vim which sets a precursor
for the html format which is heavily depended on in Svelte.

Setting an infinite textwidth allows me to trigger indentation whenever
I want to, and not be at the mercy of an over eager editor.
I saw this in the Vim repository and thought, why the 🤬 not
🤷🏾‍♂️
@igbanam
Copy link
Owner Author

igbanam commented Oct 2, 2022

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 vim/vim#10537 (comment)

@igbanam igbanam merged commit 754de67 into release Oct 2, 2022
@igbanam igbanam deleted the migrate-to-vim9script branch October 2, 2022 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants