tilt-dev / tiltfile.tmbundle

Tiltfile syntax highlighting support in JetBrains IDEs & others
Apache License 2.0
19 stars 2 forks source link

[bug] Can't make it work for PyCharm #1

Closed jguillon closed 2 years ago

jguillon commented 2 years ago

Hi!

I was able to import the bundle under PyCharm, but it doesn't seem to effectively work in the text editor. Am I missing something? Is there a way to debug it locally?

Capture d’écran 2022-06-20 à 10 15 53
Versions [Click to expand] > PyCharm 2021.2.4 (Professional Edition) Build #PY-212.5712.39, built on December 21, 2021 Runtime version: 11.0.13+8-b1504.49 x86_64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. macOS 12.4 GC: G1 Young Generation, G1 Old Generation Memory: 2048M Cores: 12 Registry: ide.balloon.shadow.size=0 Non-Bundled Plugins: org.jetbrains.plugins.go-template (212.5712.51), me.lensvol.blackconnect (0.5.0), name.kropp.intellij.makefile (212.5712.51), com.nerdscorner.android.plugin.github (2.1.1), mobi.hsz.idea.gitignore (4.3.0), com.mallowigi (50.2.0), com.intellij.kubernetes (212.5712.14), org.toml.lang (0.2.155.4114-212), PlantUML integration (5.13.0), com.koxudaxi.poetry (1.1.5-212), com.jetbrains.intellij.datalore (0.1.14-212), ru.adelf.idea.dotenv (2022.1), com.chrisrm.idea.MaterialThemeUI (6.9.1)
milas commented 2 years ago

When you say it does not work effectively in the editor, do you mean that there's no syntax highlighting at all?

jguillon commented 2 years ago

Not at all indeed! I tried to disable my Material Theme, to reload, restart, and again. But nothing seems to have any effect on Tiltfiles syntax highlighting.

milas commented 2 years ago

Is your file named Tiltfile or something else?

In PyCharm Preferences, go to Editor > File Types and look to see if there's an association for Tiltfile under something else, e.g. "Text".

You can also try adding explicit mapping(s) in that same section under "Files supported via TextMate bundles":

TextMate bundle file associations in JetBrains IDEs

I just tested a fresh install of PyCharm Professional 2022.1.3 w/o any imported settings and highlighting worked after importing the bundle as described in the README here/JetBrains docs. (I did NOT need to add a manual mapping like I suggested above.) I'm on macOS as well (12.4).

Beyond that, I don't see anything else in the PyCharm docs, so you might need to ask JetBrains support for further help, unfortunately.

jguillon commented 2 years ago

It works now ! For obscure reasons, I had to manually add the mapping that you just described for it to work. Now, I removed the mapping and it still works...

Thanks a lot for your help. And keep on working on tilt, this tool is amazing ❤️

milas commented 2 years ago

Yay! I'm glad you got it working!

tzelleke commented 1 year ago

I had the same problem and was able to fix it by removing Tiltfile from the Python File type (which I had manually defined before) and from File type auto-detected by file content (which had been added by PyCharm seemingly).