rails.vim #34032
sj26
started this conversation in
Ideas From Vim
rails.vim
#34032
Replies: 1 comment
-
Maybe tasks are the answer? Like I could create a zed-rails extension, implement native tasks like "go to alternate" and "go to related" which do the rails heuristics etc, but inside a rust module so it's all hot and fast? With a suggested keymap. I'm happy to try it. Still very interested in what Zed-natives suggest here 🙏 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I miss rails.vim so much. Like a bunch of folks, I've come to Zed from Vim. I love the AI features. Vim can't keep up here (imho). But while a coding model is better in Zed, I am worse. Mostly navigating around the codebase.
Today, for example, I just want to jump into this form partial:
In vim, with rails.vim, I would
gf
and be in the file.Folks say "use ⌘P":
That's not a solution.
Another example - in a model, I want to switch to the spec file:
In vim:
:A
.In Zed, I have to do this — instead of "go to spec" my brain has to think "what sort of file is this, what's it called, what would the spec be called, how am I going to trick the fuzzy finder into finding the right thing .. okay great" — I feel like a coding model burning my context window:
It's so much slower. I feel like I'm on crutches navigating around this codebase.
How do I make this fast in Zed?
I'm using Shopify's ruby-lsp and ruby-lsp-rails which are excellent. I think they might have functions to speed this up. But it doesn't seem to match Zed's model of the world.
Like none of these are what I want:
If Zed had extensions that let me do little scripting things and keybindings, including extending vim mode and a proper vim console, I would just do that.
Tasks + keybindings feel like a workaround, not a solution. Like I've got this "toggle spec" task:
It runs a little script that switches files. I've bound it to a shortcut like ⌘⌥T .. or something. I keep forgetting the shortcut.
I tried binding it like this, to use my muscle memory:
but that makes popping up Zed's menu slow. And it's going to get real tedious to do all the combinations rails.vim can do. And in vim I can combine them with things like splits or tabs or new windows in one command.
Like, I kinda want to be able to at least add items into the command palette or something:
How far away are fully fledged Zed extensions? Is that what I'm waiting for? The zed-rails extension? Or is there a gap here I can already fill with LSPs? Or could I contribute some enhancements for LSPs to enable this sort of navigation?
I just love Zed. I love how fast it is. I love the CRDT fundamentals. I love the model integrations. But I need to get off the crutches and I can't figure out out, and would just love some advice 🙏
Beta Was this translation helpful? Give feedback.
All reactions