-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CMakeLists.txt
considered Plain Text file even with NeoCMake extension installed
#20291
Comments
So I added this line to "file_types" section in Zed settings: I could make a PR, but first I would like to know if I should add "cmake" to "CMake" file_type like this |
This comment was marked as outdated.
This comment was marked as outdated.
This fixed issue for me diff --git a/assets/settings/default.json b/assets/settings/default.json
index a59e115901..49cd414b66 100644
--- a/assets/settings/default.json
+++ b/assets/settings/default.json
@@ -843,6 +843,7 @@
// }
//
"file_types": {
+ "CMake": ["CMakeLists.txt", "cmake"],
"Plain Text": ["txt"],
"JSON": ["flake.lock"],
"JSONC": [ |
Also added this to my fork. If everything is fine I'm ready to open PR https://github.com/k0tran/zed/tree/main |
I think I likely broke this in: Relevant lines from default.json with the "txt" line: "file_types": {
"Plain Text": ["txt"],
"JSONC": ["**/.zed/**/*.json", "**/zed/**/*.json", "**/Zed/**/*.json", "**/.vscode/**/*.json"],
"Shell Script": [".env.*"]
}, Currently here is the order of file_type overrides: (top wins)
As we don't ship default.json settings Languages provided by 3rd party extensions, for the moment you'll have to manually add this to your settings: "file_types": {
"CMake": [
"CMakeLists.txt"
]
} The longer term fix is perhaps to populate the Plain Text language with My apologies for breaking this. |
there is another issue with the with Cmake extension. |
@regisx001 Please file that upstream on k0tran/zed_neocmake |
Check for existing issues
Describe the bug / provide steps to reproduce it
Extracted from #5102 (comment)
Basically when you open CMakeLists.txt Zed automatically chooses Plain Text format.
CMakeLists.txt
is already added to config.toml:https://github.com/k0tran/zed_neocmake/blob/master/languages/cmake/config.toml#L3
Problem appeared about 3 weeks ago (everything worked before - k0tran/zed_neocmake#5)
Environment
My machine specs here, but I don't think this is related.
If applicable, add mockups / screenshots to help explain present your vision of the feature
I think this has to do something with this
zed/assets/settings/default.json
Line 838 in 17b9d19
Which may overwrite extension config.toml
If applicable, attach your Zed.log file to this issue.
Zed.log
The text was updated successfully, but these errors were encountered: