Disable SourceKit-LSP for C files

Is there a way to disable the VS Code extension for non-Swift files?

I'm using a different extension for C files, and have to disable SourceKit-LSP every time I edit a C file, otherwise it takes over and pops up the output window to show errors.

2 Likes

I'm not sure what the best way to do this is. Our extension gets an activation event based on this static list of languages and then we say again what documents we support when we create the language client. In theory we could probably add configuration options for this, but maybe vscode has a better global way to configure this? It seems like you don't even really want to activate our extension in this case.

For anyone else encountering this with vknabel's SDE extension, try navigating to your vscode extension folder (e.g. ~/.vscode or ~/.vscode-server for remote environments), and opening vknabel.vscode-swift-development-environment-2.10.1/out/src/clientMain.js. Search for documentSelector and remove c and cpp from that array. That should stop it from dumping debug output when you are editing a C or C++ file

1 Like

Hey @ishantheperson! The latest release 2.11.1 of my SDE extension now includes your requested change!

2 Likes