I am using TeXstudio on macOS Monterey. I am facing the following scenario:

I have created the files abc.tex and abc.sty in some same folder. I compile them. But, seeing no autocompletion happening for the new commands that I define in abc.sty, I check the folder /Users/atom/.config/texstudio/completion/autogenerated. There is no problem here since a cwl file is automatically created here, named abc.cwl. But upon opening it, I see that it doesn't update as I add more commands to abc.sty.

I have tried quitting and relaunching TeXstudio but to no avail. I have also tried restarting my Mac, but again, nothing.

Can someone help me with this?

  • Could you attach your abc.sty?
    – antshar
    Commented Aug 19, 2022 at 16:29

1 Answer 1


Autogenerated cwls do not update when you change the sty file. You can either manually update the cwl with your new commands, or delete abc.cwl after making changes to abc.sty and relaunch texstudio. In the second case the new autogenerated cwl will contain the added commands.

  • But it used to work fine in my Windows laptop, that I replaced with a MacBook less than 15 days ago.
    – Atom
    Commented Aug 16, 2022 at 19:44
  • I use windows and this is the behavior for as long as I've used texstudio (~3 years).
    – mbert
    Commented Aug 17, 2022 at 3:51
  • I can confirm that modifying autogenerated cwls indeed update the syntax checking. Also, this should not be posted as an answer, since it's not helpful at all, but also misleading.
    – antshar
    Commented Aug 19, 2022 at 16:21
  • It's not that editing the autogenerated cwl does not update highlighting; it does. I specifically said that modifying the .sty file will not be reflected in the autogenerated cwl if one was already generated. See edits to answer for clarification
    – mbert
    Commented Aug 19, 2022 at 19:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .