-
-
Notifications
You must be signed in to change notification settings - Fork 58
Vimscript support #117
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
Comments
Thanks @SamSaffron this is great! I'm not familiar with vimscript at all, but from what I understand, would it be useful to have a syntax tree option to format with a specific cursor position? I think I could build that in (it's already built into prettier, so I could port that here). |
I see, as in retain cursor position after you perform the prettification. Yes that sound very handy. I guess syntax tree would need to take in "buffer" and "current cursor position" vis STDIN somehow and return it in STDOUT.... I think implementation wise the easiest thing to do would be to support a comment like this at the top of the file:
Then if syntax-tree sees it, it converts it to
So programs integrating would ship in this "magic" comment at the head of STDIN?
:) that makes two of us, I was just fumbling my way around here |
I was thinking more you would pass it in as a command-line option, like |
I was thinking about this Kevin, how would you feed back the result to the user? I was thinking many integrations go STDIN -> syntax tree -> STDOUT ... so it makes sense just to have this in STDIN for symmetry , |
Going to close this for now. Folks can find this through search or using https://github.com/dense-analysis/ale, which has stree now preconfigured. |
Not really an issue, please close. But in case anyone is looking for vimscript support ... I kind of cobbled this hack up.
I guess the next thing will be for someone to cleanly package this up in a plugin (and clean the messy bits).
The text was updated successfully, but these errors were encountered: