-
Notifications
You must be signed in to change notification settings - Fork 28
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
Vim 8.1 support #149
Comments
Here's a really terrible first effort at using intero to display the type signature of the identifier under the cursor. I added it to my .vim/plugin directory and it worked so I thought I'd put it up here. Next steps involve more documentation, testing, cleaning up the code and adding more features. To be able to run it, you need to first install intero using stack build intero in your stack project directory.
|
Very cool! That's a demonstration that this can work :) We'll need to find every neovim-specific thing here and identify it's counterpart in vim, and then choose which codepath to go on based on which editor we're using. I think that much of the current code will be fine in either editor, and only the async/terminal stuff will need to be modified. |
I tried to go through the intero-neovim code to understand which things in my example are vim-specific and I made a table of important(?) counterparts.
Based on the evidence, your observation about most of the code being fine in either editor is on point! I really like how the intero-neovim code is structured so I think it would be nice to maintain that when porting the plugin. If I'm interested in getting it to work, you wouldn't mind if I started transplanting the code function-by-function and making tiny changes as necessary, would you? |
Go for it! If you implement this then I will likely make you a maintainer and responsible for the non-neovim parts :) |
I would suggest writing a "compatibility layer" file with functions like g:vim_compat:term_list() that does the same thing in both neovim and vim. Then all things which are different between the editors can just be ported there and used from client code without having to care about the vim/neovim distinction. |
Okay I believe I got the plugin to work with Vim 8, and I've put the code up here. When I say that it "works" I mean that I can use the commands defined in plugin/intero.vim The README.md file describes the changes I made and why I had to make them. I want to ask you a few questions about adapting the code to the "compatibility layer" style once you have seen exactly what needed to be changed. |
This is fantastic work @Fyrbll 😄 I'll review it more closely tomorrow. |
@parsonsmatt I don't know if you got the chance to look at the code and/or try out the plugin yet. I understand that you might be quite busy with other things. Given that, I really appreciate the time you've spent responding to the messages on this thread. I'm certain that people other than myself would like to use intero with vim. What do you think about spreading the word that a vim port of the intero-neovim plugin exists and is available for testing? That way I can handle issues that people report and fix them. How should I go about it? Thanks! |
I apologize, I didn't get the chance to review it. Please feel free to put out a notice that there is a fork for vim and we'll get some beta testers going :) |
Hello! I'm sorry about having disappeared for about a month... I was returning to college after a break and needed to adjust. I'm actively making time for Haskell stuff again so I should be more prompt with everything. I'm going to:
|
Vim 8.1 has async stuff and a terminal, so we can potentially support vanilla vim in addition to neovim. I have no idea what this entails, so this issue will serve as a place to stuff research and notes.
The text was updated successfully, but these errors were encountered: