k0tran / zed_neocmake

CMake grammar and neocmakelsp for Zed editor
11 stars 4 forks source link

`CMakeLists.txt` not detected #5

Open johann-cm opened 1 month ago

johann-cm commented 1 month ago

Since I've recently updated zed, the CMakeLists.txt no longer gets properly recognized as a cmake source file. Instead, it gets recognized as a plain text file, and I have to manually select the language. .cmake files are still being automatically recognized.

My zed version: 0.157.4

k0tran commented 1 month ago

Can confirm on 0.157.5 Not sure why it's happening though At first though that the problem that it is matching whole filename, but zed-make works just fine

k0tran commented 3 weeks ago

Related issue in the upstream https://github.com/zed-industries/zed/issues/20291 @johann-cm Until it is resolved you can fix this issue by adding these lines to your Zed settings (inside brackets):

"file_types": {
    "CMake": [
      "CMakeLists.txt"
    ],
}

This fixed issue for me.

notpeter commented 5 days ago

I think I likely broke this in:

I left a comment here describing more: