Open wjk opened 5 years ago
Hello again @wjk 😃
We have some preliminary documentation in review that will go up hopefully tonight or tomorrow regarding extending the new editor. I will update this issue when it's live.
In short though - currently you would still need a traditional Mono.Addins-based addin, but it would contain an assembly that exports necessary MEF parts for the editor to consume.
In other words, the existing .mpack/Mono.Addins addin system is still in play for bootstrapping the addin itself, but you should then be able to have your assembly loaded into the MEF graph. From there the API and functionality available should be 1:1 with Windows for non-UI (Cocoa vs WPF) parts and we have some Cocoa-specific extension points available as well should you need them.
Given the discussion in #7170 it would be ideal if we could continue the extension discussion on the Visual Studio Developer Community.
We are starting to develop samples, here's a rough draft for now: https://github.com/gundermanc/vs-xplat-extensibility-samples
It shows how to add Completion and Quick Info to your language service. I recommend following both of these folks, who are devs on the Visual Studio editor team: https://github.com/gundermanc/vs-xplat-extensibility-samples/graphs/contributors
I'm not sure about extending an existing new editor, but as of a few weeks back it was impossible to add a new editor to VSmac that uses the new editor apis due to the need to hardcode in editors. @slluis might have an update to that?
@decriptor I'm not quite sure what you mean here...
@decriptor perhaps: https://github.com/mono/monodevelop/pull/7872 (and see my comment in particular)?
@abock I think that PR does addresses what I was talking about. Thanks!
Following discussion in #7170, I been informed that the vs-editor-core code will not be released. That's fine (albeit somewhat disappointing). However, without being able to see all the code for the new editor, I don't have quite enough information to know how to write a new language binding for MonoDevelop/VSMac, and have it use the new editor. (The techniques seem pretty similar to what you would do on VS for Windows, but they cannot be completely identical, as VSMac uses a different system for discovering extensions.) I was thinking of porting the PTVS plugin for VS for Windows to VSMac, but I would like to be able to use the new editor if it is at all possible. Thanks!