-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Syntastic integration #17
Comments
The problem is when to run it. Unless we can run it right before syntastic invokes DMD, the user will have to restart Vim whenever they add a new dependency... It would have been ideal if syntastic had hooks - e.g. it could have run doautocmd User Synstatic_pre_DMD or something, and Dutyl will have aucmd User Synstatic_pre_DMD call dutyl#updateSyntasticDMDPaths() to update the import paths. Another advantage of this approach is that neither plugin need to explicitly check for the other's existence - nothing will happen if syntastic invokes |
Interesting solution. I'll have to try your solution. Looks neat. If it works out well then a pull request to Syntastic first :) |
Looks nice. This kind of events, if invoked from all across syntastic, could probably benefit checkers for other languages - but that's for the syntastic maintainers to decide and worry about. |
Your feedback on the above branches would be useful :) Syntastic/D behavior Compiler flags |
OK, I took a deeper look:
|
If calling BTW - don't you also need to pass the |
Thank you for the feedback. Exactly what was needed to improve it :)
I'm trying to first concentrate on the simple case but ensure that the changes post_exe is "-c -of/dev/null" This allowed me to personally "hardcode" -dip25 by setting g:syntastic_d_dmd_args. |
Yea, I really need to add this to the docs. Dutyl should support plugins - all it's tools are written as plugins - so I really should document how to structure these plugins...
Should have said it before, but the |
"The requirement specification left room for assumptions". |
Update. |
One more suggestion - if you remove the line call dutyl#register#module('syntastic', 'dutyl#syntastic#new', 120) from Yes, this is also something I need to add to the requirement specification when I finally get to writing it... |
Done. I thought it was strange to do a register on the module. Good you pointed it out. |
While I'm pointing out things to remove, |
Thank you :) I've tried to summaries our conversation here in the following text. Specification for Dutyl pluginsDutyl is designed to contain sub-plugins which only accesses each other via a
How-to add a new plugin to DutylWhen adding a new plugin to dutyl consider the following questions. Does the new plugin provide a service that is used by other plugins in Dutyl?If yes then you need the following: a) Look in for example autoload/dutyl/dub.vim for a good example of ..#new. function! s:functions.projectRoot() abort b) Registering the service is done by adding the following line to plugin/dutyl.vim call dutyl#register#module('dub','dutyl#dub#new',0) Note the last parameter. It is the priority of the service. The design of dutyl If no, then do NOT add any ...#new function, s:functions etc. |
Nice. I'll flesh it out some more when I have time. I am actually pondering whether the plugin architecture documentation should be in markdown as part of I did a quick search and found a script for converting markdown to vimdoc, so it shouldn't be a problem to have both. I should convert Vebugger to do that too. |
:) In my ears CONTRIBUTING.md sounds right. It's not user documentation but rather developer. But I think either or works. A developer is happy when one can use the editor of choice to view the information. Sweet, Vebugger looks nice. Another plugin to install! |
The Vim plugin syntastic have support for D by checking the compile errors from DMD.
A problem though for syntastic/D is that the import paths for DMD are often wrong. So the error messages are often times complaining about the first module import that isn't part of std.
A solution for this would be to reuse the information that Dutyl have gathered from D tools and supply that to syntastic/D.
A proof of concept that is working "for me".
What would you say about adding such an integration in Dutyl?
It would of course required checking if the plugin syntastic is installed etc.
The text was updated successfully, but these errors were encountered: