romainl/ctags-patterns-for-javascript

Not finding components defined using styled-components

Closed this issue · 4 comments

Hi, first of all, thanks for making such a comprehensive set of ctags rules. Much appreciated.

I have some components in my library defined like so:

import { Box, styled } from '@smooth-ui/core-sc'
import Theme from 'theme'

const FramedBox = styled(Box)`
  border: 1px solid ${Theme.black800};
  border-radius: 0px 5pt 5pt 5pt;
  padding: 0px 5% 0px 5%;
  display: grid;
  grid-template-columns: 45% 45%;
  grid-gap: 5%;
  overflow-y: auto;

  @media(min-width: 769px){
    height: 50vh;
  }

  @media (max-width: 992px){
    grid-template-columns: 100%;
  }
`

export default FramedBox

But when I try and Ctrl + ] on a consuming file, it says that E426: tag not found: FramedBox

Is there some additional customization I need to make this work?

Hi, @donatoaz Could you try branch #19?

FramedBox should be tagged, with kind S.

(that's the first and last time I use a # in a branch name)

Awesome, it worked out perfectly.

OK, let me add styled components to the README and I'll merge this into master.

Merged.