Mac电脑,idea突然文件都展示成了文本格式,导致ts,tsx文件都不能正常加载或提示异常,解决方案详细说明如下

有一天使用clean my mac软件清理电脑

突然发现idea出现了文件都以文本格式展示,如图所示

然后就卸载,计划重新安装,安装了好几个版本,并且setting->file types怎么设置都展示不对,考虑是否idea没卸载干净,于是idea打开help->Show Log in Finder,查到idea安装的目录。

分别删除了以下几个文件

bash 复制代码
~/Library/Application Support/JetBrains/IntelliJIdea<version>
~/Library/Caches/JetBrains/IntelliJIdea<version>
~/Library/Logs/JetBrains/IntelliJIdea<version>
~/Library/Preferences/JetBrains/IntelliJIdea<version>

然后重新下载idea并安装,打开项目发现ts文件没问题了,但是tsx还是不对

于是打开Settings->File types

找到TypeScript JSX右侧添加上了*.tsx

随后Apply,OK

最后完美解决~

随后在plugins中下载了Eslint,Pretter,LingMa插件用于提升开发速度😄

相关推荐
秋雨梧桐叶落莳1 小时前
计算器仿写总结
学习·macos·ios·objective-c·cocoa
令狐前生7 小时前
Intellij IDEA 2025 破解安装
java·ide·intellij-idea
寒水馨9 小时前
macOS下载、安装uv-0.12.0(附安装包uv-aarch64-apple-darwin.tar.gz)
python·macos·rust·项目管理·包管理器·astral·pip替代
223糖10 小时前
Idea,pycharm2026激活保姆级教程
java·ide·intellij-idea
寒水馨10 小时前
macOS下载、安装protobuf-v35.1(附安装包protoc-35.1-osx-universal_binary.zip)
macos·google·grpc·序列化·protobuf·protoc·数据交换
寒水馨11 小时前
macOS下载、安装ripgrep-15.2.0(附安装包ripgrep-15.2.0-aarch64-apple-darwin.tar.gz)
macos·正则表达式·rust·ripgrep·rg·命令行搜索·代码搜索
起司喵喵1 天前
Flutter-MacOS桌面OS系统|flutter.+window_manager客户端OS模板
flutter·macos·策略模式
代码对我眨眼睛1 天前
macOS Google Chrome 常用快捷键
前端·chrome·macos
啊真真真1 天前
macOS下libnfc ..写卡失败问题及解决方案
macos·策略模式
叶 落1 天前
Mac 通过 Miniconda 安装 Python
python·macos·conda·miniconda