cvigilv / esqueleto.nvim

Reduce your boilerplate code the lazy-bones way
MIT License
98 stars 7 forks source link

Latex filetypes? #43

Closed Kr30x closed 8 months ago

Kr30x commented 8 months ago

Hello, I'm enjoying using your plugin. However, I'm stuck with creating a LaTeX template. When I need to create a python or cpp template, everything seems fine, but when it comes to LaTeX, I don't know what pattern to use. I tried 'latex', 'tex'.

My file structure is just like in the set up example (I wanted to put it in here, but something is wrong with indentation it tree :( ).

How can I fix this problem or what is the logic behind patterns namings?

cvigilv commented 8 months ago

Could you provide an example? I also use LaTeX and have some templates that are triggered by esqueleto (see here for examples) defining the pattern as tex (see here for my plugin config).

Kr30x commented 8 months ago

I've recorded my screen and uploaded a video

cvigilv commented 8 months ago

mmm... thats weird... Could you open a tex file and type on the command line set filetype and copy the output here?

Also, the files MUST BE empty, otherwise it won't work. I wasn't able to see if the file already existed. Maybe try deleting the file first and creating it again to see if it works.

cvigilv commented 8 months ago

Saw the video again and noticed something: Your current config sets tex file filetype to plaintex, therefore your current configuration for the plugin won't work. Could you test changing the tex pattern for plaintex to see if the plugin prompts insertion?

Kr30x commented 8 months ago

I've changed to plaintex and everything forked as supposed to, thank you!