pucelle / vscode-css-navigation

Allowing Go to definition from HTML to CSS, or Find References from CSS to HTML.
https://marketplace.visualstudio.com/items?itemName=pucelle.vscode-css-navigation
MIT License
64 stars 8 forks source link

[Feature Request] Support custom classAttributeName for react-css-modules #60

Closed dr2009 closed 3 years ago

dr2009 commented 3 years ago

babel-plugin-react-css-modules use css-modules in this way

import React from 'react';
import './table.css';

export default class Table extends React.Component {
  render () {
    return <div styleName='table' className='global-table'>
      <div styleName='row'>
        <div styleName='cell'>A0</div>
        <div styleName='cell'>B0</div>
      </div>
    </div>;
  }
}

so can you support custom classAttributeName for babel-plugin-react-css-modules to trigger the intellisense ?

"CSSNavigation.classAttributeName": "styleName"
pucelle commented 3 years ago

Will consider it.

pucelle commented 3 years ago

Will do it after completed https://github.com/pucelle/vscode-css-navigation/issues/59 and implement a new syntax parser.

pucelle commented 3 years ago

Just released v1.11.0, I guess it should work right now, if what I understand is correct. Never mind to reopen if you find problems.