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
improve snippet manager and add tests #4012
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4012 +/- ##
==========================================
+ Coverage 69.55% 69.89% +0.33%
==========================================
Files 517 517
Lines 50224 50382 +158
Branches 9474 9492 +18
==========================================
+ Hits 34933 35214 +281
+ Misses 15291 15168 -123
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have snippets in the Ace code base that would benefit from these changes?
return this.FILEPATH(editor).replace(/[^/\\]*$/, ""); | ||
}, | ||
FILEPATH: function(editor) { return "/not implemented.txt"; }, | ||
WORKSPACE_NAME: function() { return "Unknown"; }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How would we be able to configure this value in the IDE?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the snippet loader plugin https://github.com/c9/core/blob/d8917f33fd7d32141d895fb7de530cfee2a416cf/plugins/c9.ide.language.generic/snippet_loader.js#L7 will need to do
snippetManager.variables.WORKSPACE_NAME=function() { return c9.projectName }
snippetManager.variables.FILEPATH=function(editor) { return editor.session.c9doc.tab.path }
not directly, but this will allow us to replace some of broken snippets that use vim specific backtick syntax with snippets from textmate bundles that will work now. |
fixes #2925 #2926 #3924 #2471