Hannah-Sten / TeXiFy-IDEA

LaTeX support for the IntelliJ platform by JetBrains.
https://hannah-sten.github.io/TeXiFy-IDEA
MIT License
893 stars 89 forks source link

Does not highlight syntax, nor recognise .tex format #1584

Closed thekalinga closed 4 years ago

thekalinga commented 4 years ago

Type of JetBrains IDE (IntelliJ, PyCharm, etc.) and version

IntelliJ IDEA 2020.2.1 (Community Edition) installed using Snap Store

Operating System

Ubuntu 16.04

TeXiFy IDEA version

0.7

What I did (steps to reproduce)

I created a project using New -> Project -> Latex, the opened the file, I see the syntax is not highlighted & no suggestions are shown

Expected behavior

It should highlight & show suggestions for control sequences

Actual behavior

Nothing gets highlighted

image

thekalinga commented 4 years ago

Strangely, the highlighting & suggestions work for other types (.bib, .sty, .tikz, .cls) but not for .tex

thekalinga commented 4 years ago

In my settings, I see that *.tex was associated under Text (File | Settings | Editor | File Types)

I now removed that from there & then associated with Latex Source by adding *.tex under File Name Patterns section manually.

Now the plugin recognises & processes the file. I have no idea why that happened. Did I manually mess it up before, no idea.

Closing this issue as no one else has reported this issue

thekalinga commented 4 years ago

I believe it is possible that others also might face this issue.

I believe this might have happened. Initially when I opened a .tex file in IDEA (before I installed this plugin), I might have asked IDEA to use to use plain Text editor for showing the file. Now, after installing this plugin, those associations have not been reset, leading to this strange case. This is my hypothesis.

Not sure why this plugin dint reset file extension association.

PHPirates commented 4 years ago

There should be no reason to assign .tex files to the Text filetype if you don't have the plugin installed: IntelliJ will suggest 'Plugins supported .tex files found` instead when you open the file - at least that is what happens for me.

Did you verify that you cannot open .tex files if you don't assign it to the Text filetype?