This extension extends HTML and ejs code editing with
Go To Definition and
Go To Symbol in Workspace support for css/scss/less (classes and IDs) found in strings within the source code.
This was heavily inspired by a similar feature in Brackets called CSS Inline Editors.
The extension supports all the normal capabilities of symbol definition tracking, but does it for css selectors (classes, IDs and HTML tags). This includes:
- Peek: load the css file inline and make quick edits right there. (
- Go To: jump directly to the css file or open it in a new editor (
- Hover: show the definition in a hover over the symbol (
In addition, it supports the Symbol Provider so you can quickly jump to the right CSS/SCSS/LESS code if you already know the class or ID name
cssPeek.supportTags - Enable Peeking from HTML tags in addition to classnames and IDs. React components are ignored, but it's a good idea to disable this feature when using Angular.
cssPeek.peekFromLanguages - A list of vscode language names where the extension should be used.
cssPeek.peekToExclude - A list of file globs that filters out style files to not look for. By default,
See editor docs for more details
Contributions are greatly appreciated. Please fork the repository and submit a pull request.
- Use Globs for configuration options instead of RegExp via #61 ❤ @arch-stack
- (Temporarily) fix bug #19 by handling errors from
- Add support for Symbol Provider #18
- Fix bug #14 that caused CSS Peek to fail after any HTML comments
- Fix bug that limited the language support only to HTML. Now supports all languages provided by "activeLanguages" config
- Fix an error wherby the Overview was missing on the Visual Studio Marketplace
- A complete rewrite featuring the new Language Server Protocol
- Added scss support
- Added multi definition support (provides all CSS rules matching the selector)
- Added support for HTML tag selectors
- Add configuration option to ignore file from CSS lookup
- Workaround for bug if large number of files exist
- Better recognition of CSS selector word from cursor position
- Optimize code for fewer file lookups
- Configure search file extensions using "css_peek.searchFileExtensions"