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

Add "Switch to using C/C++ Editor (LSP)" to quick fix of Codan/parser #379

Open
jonahgraham opened this issue Oct 9, 2024 · 3 comments
Open

Comments

@jonahgraham
Copy link
Member

When codan or parser finds an error one of the quick-fixes should be to switch the project or workspace to using the C/C++ Editor (LSP) so that users can discover that the CDT LSP implementation resolves their problem.

PR incoming for this.

@ghentschke
Copy link
Contributor

ghentschke commented Oct 9, 2024

How would a possible use case look like?
A user opens a C/C++ source file in the old C/C++ editor. Codan/parser finds an error and creates a marker. One quick-fix would be to switch on the Set C/C++ (LSP) Editor as default flag only. But this would imply that all files for the given project/workspace opened in the old editor has to be closed and re-opened in the LSP based editor? Then clangd (maybe) offers a quick-fix for the problem?

Or is the use case that the "LSP quick-fix" should be displayed only when there are no other quick-fixes available?

@jonahgraham
Copy link
Member Author

The idea is that we have lots of markers being created because of parse errors in "old" cdt. I want to provide visibility to those users that lsp is available. And yes, the quick fix (which will start a short wizard) will reopen editors.

Does that sound reasonable to you?

@ghentschke
Copy link
Contributor

Does that sound reasonable to you?

yepp, but I would suggest that vendors can disable this quick-fix. This would be necessary when the new editor should be used by customers only for certain C/C++ project types (e.g. not for old managed build projects without compile_commands.json file available).
Maybe we can introduce a check via extension point which asks if a given project supports the new editor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants