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 is not syntax highlighted #534

Closed
python152 opened this issue Sep 6, 2018 · 22 comments · Fixed by #4204
Closed

CMakeLists.txt is not syntax highlighted #534

python152 opened this issue Sep 6, 2018 · 22 comments · Fixed by #4204
Assignees
Labels
enhancement an enhancement to the product that is either not present or an improvement to an existing feature Feature: language services help wanted we currently are not planning work on this and would like help from the open source community
Milestone

Comments

@python152
Copy link

Brief Issue Summary

CMakeLists.txt is not syntax highlighted

Expected:

When I open CMakeLists.txt, expected syntax highlight and intellisense.

Apparent Behavior:

It is opened as a plaintext, and if I want to change the language association, there is no "Cmake" - the closest thing is makefile.

CMake Tools Log

None

Platform and Versions

[[For issues, fill out the following. Otherwise delete this section.]]

  • Operating System: macOS
  • CMake Version: 3.11.4
  • VSCode Version: 1.26.1
  • CMake Tools Extension Version: 1.1.1
  • Compiler/Toolchain: Clang
@decimad
Copy link

decimad commented Sep 7, 2018

There are addons providing syntax highliting for cmake... This one is concerned about building with cmake.

@mmanyen
Copy link

mmanyen commented Sep 7, 2018

https://marketplace.visualstudio.com/items?itemName=twxs.cmake

@soroshsabz
Copy link

ITNOA

I think it is very good to provide Colorization and Completion Lists features with this extension to see complete solution to work with cmake.

@vector-of-bool did you can merge twxs.cmake with this project?

thx

@bobbrow bobbrow added enhancement an enhancement to the product that is either not present or an improvement to an existing feature Feature: other labels Jul 22, 2019
@oryandunn
Copy link

I would also prefer if this extension provided the syntax highlighting. I'm currently using the twxs.cmake, however, it differs from the highlighting that Microsoft themselves provide for cmake files in Visual Studio 2019. In particular, variables and control flow statements are different. I find the VS2019 highlighting to be better.

Also, in some environments, it's easier to get approval to use extensions provided by Microsoft themselves.

@bobbrow bobbrow added this to the Backlog milestone Apr 6, 2020
@bobbrow
Copy link
Member

bobbrow commented Apr 6, 2020

Thanks for the feedback. This feature request is not yet on our roadmap. Please make sure you add a 👍 to the first post to add your vote.

@SchweizS SchweizS mentioned this issue Apr 18, 2020
@YaniManster
Copy link

"CMake Tools provides the native developer a full-featured, convenient, and powerful workflow for CMake-based projects in Visual Studio Code."

@munsingh
Copy link

It would be great if this can be addressed. Visual Studio does it and so do many other editors. Its high time Visual Studio Code also does syntax highlighting for CMakeLists.txt files.

@bobbrow
Copy link
Member

bobbrow commented Jun 24, 2020

@munsingh there is an extension that does syntax highlighting for CMakeLists.txt files in VS Code. It just isn't bundled with this extension.

@FranciscoPombal
Copy link

FranciscoPombal commented Aug 14, 2020

@munsingh there is an extension that does syntax highlighting for CMakeLists.txt files in VS Code. It just isn't bundled with this extension.

That extension is missing several keywords, and looks like it's abandoned. Furthermore, I don't see why 2 CMake extensions should be required just to get syntax highlighting. "full-featured, convenient, and powerful workflow for CMake-based projects in Visual Studio Code." should also include "syntax highlighting". Alternatively, CMake syntax highlighting could come natively with VSCode.

Thanks for the feedback. This feature request is not yet on our roadmap. Please make sure you add a 👍 to the first post to add your vote.

This feature has been the most 👍'd for ages. Why is it still in the Backlog milestone, and not in the On deck one at least? Is not "ready to be looked into" yet?

@bobbrow
Copy link
Member

bobbrow commented Aug 14, 2020

Unfortunately, providing language services for CMake is currently out of scope for this extension because it's a significant investment that we haven't been able to justify funding while another extension exists that provides the feature already. We'd certainly accept a pull request with the implementation if anyone feels like tackling it.

If folks are upset with the use of the term "full-featured", I will remove that from the description. That was the previous maintainer's word choice and we didn't change it when we assumed maintainer responsibilities because it was part of the "legacy."

@bobbrow bobbrow added the help wanted we currently are not planning work on this and would like help from the open source community label Aug 14, 2020
@ghost
Copy link

ghost commented Jan 28, 2021

I image most other people will do exactly what I've just done.

  1. Open a cmake project
  2. Click to install the suggested extension with the prompt in the bottom right
  3. Be confused that there's no syntax highlighting
  4. Look at the other extensions in the marketplace
  5. Be confused as to whether they overlap with the suggested one I just installed
  6. Find this issue

Every other language I've tried in vscode will get highlighting after installing the suggested extension. Perhaps the twxs.cmake extension could also get suggested-status? That would give an actually full-featured experience.

@woodz-
Copy link

woodz- commented Jan 28, 2021

@johnmarkwayve same for me.
To the devs: how would you explain not taking into account highlighting from the early beginning, which is such a visual experience going all the way through the idea of vsc and its extensions leading to catch many people with less experience?

@melroy89
Copy link

So CMake tools notification pop-up told me to remove the CMake extension by twxs, however now I don't have syntax highlighting??

CMake Tools said in this message they implemented those features in this cmake tools extension by Microsoft. But where is my syntax highlighting???

And where is there no update on this issue after 4 years?

@bobbrow
Copy link
Member

bobbrow commented Jun 14, 2022

There are two extensions you can pick from right now. The CMake extension by twxs which you mentioned, and a new one CMake Language Support. We received complaints about this change and reverted our extension pack back to bundle the one by twxs. You can install either one. We believe the new one is better and recommend you install that one, but because of compatibility issues we decided to roll back the changes.

And where is there no update on this issue after 4 years?

There is no update here because acceptable extensions exist in the Marketplace to provide the language services. While it would be nice to add the support directly into our extension and we do eventually want to do it, the priority is currently lower than other issues that do not have a solution readily available.

@dsyx
Copy link

dsyx commented Dec 9, 2022

Recently, I was trying to migrate from legacy CMake to modern CMake. before that, I was using ms-vscode.cmake-tools and twxs.cmake. However, I now find that the code highlighting and hinting in twxs.cmake is inadequate to support modern CMake.

In the extension marketplace, I found josetr.cmake-language-support-vscode, which appears to be a replacement for twxs.cmake. However, when I went to the repository for josetr.cmake-language-support-vscode, I found that the repository was blank and it also asked me to install ms-dotnettools.vscode-dotnet-runtime.

I think it would be better if ms-vscode.cmake-tools provides code highlighting and hints if possible. I believe people prefer to use official extensions rather than personal, non-open source extensions.

@dantrag
Copy link

dantrag commented Feb 17, 2023

No syntax highlighting support (STILL) is ofc ridiculous. But do we at least get to know which highlighting extension do the developers use themselves? Must be a real shame using another tool for something your own tool was supposed to be doing.

@gcampbell-msft gcampbell-msft moved this from Triage Needed to To Do in CMake Tools Nov 29, 2023
@gcampbell-msft
Copy link
Collaborator

Hi everyone, we would like to update you all on our plans to improve the Language Services for CMake (scripts).

We do not have feature deliverables for language services in the upcoming CMakeTools 1.17 release, which is just around the corner (shipping on 2/13).

However, we do have language service capabilities in Visual Studio, and we would like to further improve them and bring them over to CMake Tools, planning for CMake Tools 1.18. We would like to do this in an iterative fashion, so we deliver what we have first, first. We will create dedicated work items to track each of the features and link them in this Github issue.

We hope to continuously improve on the CMake Tools Language Services story, eventually providing full support with for: hover (quick info), completions, find all references, etc.

FYI, @dantrag @dsyx @melroy89 @woodz- @FranciscoPombal @munsingh @YaniManster @oryandunn @soroshsabz @decimad @python152, and others!

@gcampbell-msft
Copy link
Collaborator

All, I removed the fixed (release pending) tag. This is due to the fact that we were not able to implement quick info in time for the 1.18 release and we don't want a drop in functionality from previous releases. We hope to merge these changes back into pre-release when available.

@H-G-Hristov
Copy link

@gcampbell-msft If this Feature replaces the twsx extension, which provides highlighting etc. and the twsx extension is installed on its own or via the MS C++ extension package. What will happen? Will the be a conflict of interest, will they be uninstalled or the user will be offered to uninstall them?

@gcampbell-msft
Copy link
Collaborator

@H-G-Hristov Only one syntax highlighting will be selected by VS Code, so there won't be bad behavior, but it may be indeterminate which extension will actually be being used.

As long as you haven't manually installed the twsx extension yourself, it will be uninstalled when we remove our dependency. Thanks.

@gcampbell-msft gcampbell-msft modified the milestones: 1.18, 1.19 Jun 6, 2024
@gcampbell-msft gcampbell-msft modified the milestones: 1.19, On Deck Jul 18, 2024
@gcampbell-msft gcampbell-msft closed this as completed by moving to Completed in CMake Tools Jul 24, 2024
@H-G-Hristov
Copy link

This was closed as completed but there are no sign in the change log. What is the deal with this original FR? I see it was split in sub-tasks above. Do we get something in 1.19?

@gcampbell-msft gcampbell-msft moved this from Completed to Pending Prioritization in CMake Tools Jul 31, 2024
@gcampbell-msft
Copy link
Collaborator

@H-G-Hristov Thank you for the notification. It got marked as completed, but we have not completed this work quite yet, re-opening to correctly reflect our status. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement an enhancement to the product that is either not present or an improvement to an existing feature Feature: language services help wanted we currently are not planning work on this and would like help from the open source community
Projects
Status: Completed
Development

Successfully merging a pull request may close this issue.