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 option to turn off language server features #785

Closed
bobbrow opened this issue May 30, 2017 · 14 comments
Closed

Add option to turn off language server features #785

bobbrow opened this issue May 30, 2017 · 14 comments
Labels
Feature Request fixed Check the Milestone for the release in which the fix is or will be available. Language Service
Milestone

Comments

@bobbrow
Copy link
Member

bobbrow commented May 30, 2017

Some users of the extension may only wish to use the debugger features and don't want to be bothered with any error notifications from the language server.

moving request out of closed issue #755

@vscpp
Copy link

vscpp commented Jun 1, 2017

@bobbrow, actually, I really want to disable debugger feature of cpp extension. VS code should be a code editor rather than debugger. We have more professional IDE or debug tool. I wonder that why a code editor adding a debugger function. Till now, the intelliSense is not full functionality.

@bobbrow
Copy link
Member Author

bobbrow commented Jun 1, 2017

The debugger feature doesn't get in the way of the editor for you, does it? There's really nothing to disable if you don't try to use it. The language server features, on the other hand, will consume CPU and memory resources by simply opening a file.

@pieandcakes
Copy link
Contributor

pieandcakes commented Jun 1, 2017

@vscpp Can you explain what you mean by:

I really want to disable debugger feature of cpp extension.

What specifically do you want disabled? Like @bobbrow mentioned, unless you configure for debugging, the debug extension doesn't do any work at all.

@vscpp
Copy link

vscpp commented Jun 2, 2017

@bobbrow, @pieandcakes, I using VS code for C coding, searching and reading, and I debug my code by other tools. It means vs code is a source editor like Source Insight. I hope CPP extension have more function like Source Insight.
But currently, seems MSFT take more effort on Debugger feature, not basic code editor improving. If you use VS code for C coding that you will find there is a big gap with Source Insight.
e.g. for a data struct, if you type . or -> , there is no correct struct member display.

@bobbrow
Copy link
Member Author

bobbrow commented Jun 2, 2017

@vscpp, semantic auto-complete is something I am working on currently (tracked by issue #13). We are a small team and appreciate your patience as we try to simultaneously address the incoming issues reported here.

@zajo
Copy link

zajo commented Jun 15, 2017

@bobbrow Thank you for creating this issue -- in the meantime, what are my options for preventing intellisense from spawning 10 threads and using 100% of the CPU power for 15 minutes every time I open a C++ project in vscode (the end result for me being a whole lots of bogus red squiggles) without disabling the debugger as well?

@bobbrow
Copy link
Member Author

bobbrow commented Jun 15, 2017

Until this issue is addressed the way to consume the least amount of power is to use the following settings:

In settings.json:

"C_Cpp.intelliSenseEngine": "Tag Parser"

In c_cpp_properties.json

        {
            "name": "whatever",
            "includePath": [],
            "defines": [],
            "browse": {
                "limitSymbolsToIncludedHeaders": true,
                "databaseFilename": "",
                "path": []
            },
            "compilerPath": ""
        }

By emptying the browse.path array, the extension should stop indexing your project folder which will effectively neutralize the language service features, however the side effect is that you will get squiggles on most, if not all, of your #include lines in your files.

@summivox
Copy link

summivox commented Dec 6, 2017

What I currently do is to manually patch the source. Seems to work without config file.

Go to $extension_root/out/src/main.js and comment out the following lines

LanguageServer.activate(delayedCommandsToExecute);
return LanguageServer.deactivate();

@sean-mcmanus sean-mcmanus added help wanted Can be fixed in the public (open source) repo. and removed extension labels Dec 29, 2017
@ioeric
Copy link

ioeric commented Mar 5, 2018

+1. This would also allow users to use other C++ language servers without sacrificing the debugger.

@yunxing
Copy link

yunxing commented Mar 5, 2018

+1. This makes it much easier to use vscode + clangd.

@dprandle
Copy link

As long as multi-translation unit intellisense is not a near-future item, this should be high priority. It is very unfortunate that I have to manually go in and edit out.js again after every update is released in order to have cquery run the show and cpptools as a debugger extension only

@sean-mcmanus
Copy link
Collaborator

@dprandle The typescript code that would implement this disabling is open source, so we could accept a pull request to add some disableLanguageServer option. I understand why this is important to you and others, but the number of requests haven't been particularly high.

@YuvalFatael
Copy link

+1.

@bobbrow bobbrow added this to the On Deck milestone Jul 24, 2018
@sean-mcmanus sean-mcmanus added fixed Check the Milestone for the release in which the fix is or will be available. and removed help wanted Can be fixed in the public (open source) repo. labels Aug 13, 2018
@sean-mcmanus sean-mcmanus modified the milestones: On Deck, August 2018 Aug 13, 2018
@sean-mcmanus
Copy link
Collaborator

Fixed with 0.18.0.

@github-actions github-actions bot locked and limited conversation to collaborators Oct 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Feature Request fixed Check the Milestone for the release in which the fix is or will be available. Language Service
Projects
None yet
Development

No branches or pull requests

10 participants