Zulip Chat Archive
Stream: general
Topic: VS code extension priority
Thomas Murrills (Feb 07 2024 at 20:59):
When I make a new file without naming it, VS code prefers to interpret it as Haskell or Python. Sometimes I like using new unsaved files for scratch work, and I just don't want the extra step of clicking "lean4" from the extension-chooser dropdown. :)
Is there a way to get VS code to interpret a file starting with import
as a Lean file by default?
Thomas Murrills (Feb 07 2024 at 21:14):
Ah, I found one way to do it: in Settings, set Files > Default Language to lean4
. (Maybe tying this setting to a workspace or profile(?) would be better if actively coding in other languages.)
Thomas Murrills (Feb 07 2024 at 21:15):
I'm a bit surprised that VS code's history-based language detection model (which I have enabled) consistently gets it wrong, seeing as the entire workspace and history is lean files, with no python or Haskell...
Last updated: May 02 2025 at 03:31 UTC