Skip to content
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

Open
1 task done
k0tran opened this issue Nov 6, 2024 · 2 comments
Open
1 task done
Labels
admin read Pending admin review bug [core label] triage Maintainer needs to classify the issue

Comments

@k0tran
Copy link
Contributor

k0tran commented Nov 6, 2024

Check for existing issues

  • Completed

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.

Zed: v0.158.1 (Zed)
OS: Linux Wayland altlinux 20240122
Memory: 15.3 GiB
Architecture: x86_64
GPU: Intel(R) Graphics (ADL GT2) || Intel open-source Mesa driver || Mesa 24.2.6

If applicable, add mockups / screenshots to help explain present your vision of the feature

I think this has to do something with this

"Plain Text": ["txt"],

Which may overwrite extension config.toml

If applicable, attach your Zed.log file to this issue.

Zed.log

@k0tran k0tran added admin read Pending admin review bug [core label] triage Maintainer needs to classify the issue labels Nov 6, 2024
@k0tran k0tran mentioned this issue Nov 6, 2024
1 task
@k0tran
Copy link
Contributor Author

k0tran commented Nov 6, 2024

So I added this line to "file_types" section in Zed settings: "CMake": ["CMakeLists.txt"],
And it worked. I suppose the fix is to add this to Zed default settings.

I could make a PR, but first I would like to know if I should add "cmake" to "CMake" file_type like this "Cmake": ["CMakeLists.txt", "cmake"]. It seems unnecessary but could be nice

@SomeoneToIgnore

This comment was marked as outdated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
admin read Pending admin review bug [core label] triage Maintainer needs to classify the issue
Projects
None yet
Development

No branches or pull requests

2 participants