vscode-code-outline
vscode-code-outline copied to clipboard
Outline of Mocha (describe, it) tests
Hey, first of all, thanks for the great plugin!
I'd like to know if there is any way to configure the plugin to show tests outlines
Basically it should show describe
and it
describe('my test', () =>{
it('should do something', () => {
});
});
* my test
* should do something
You could write a specialized SymbolProvider for mocha test files (assuming you can detect them easily). A SymbolProvider with proper symbol ranges is all it takes for code outline to work.
Thanks, could you post a link to a SymbolProvider, so I can take a look?
The API is here:
- https://code.visualstudio.com/docs/extensionAPI/vscode-api#_languages
- https://code.visualstudio.com/docs/extensionAPI/vscode-api#DocumentSymbolProvider
I'm not sure if there's an easy to follow example of providing VSCode language features through an extension. The API is there but the docs are kind of hard to find.