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

Unexpected behaviour with C/C++ extension and typedef #425

Open
Jamen1993 opened this issue Jun 19, 2018 · 5 comments
Open

Unexpected behaviour with C/C++ extension and typedef #425

Jamen1993 opened this issue Jun 19, 2018 · 5 comments
Labels
blocked: language-server Caused by or dependent on a language server issue or feature blocked: vscode Caused by or dependent on a VS Code issue or feature blocked Blocked or caused by an upstream issue or feature

Comments

@Jamen1993
Copy link

  • GitLens Version: 8.4.0
  • VSCode Version: 1.24.1
  • OS Version: W10 1803

I use GitLens together with Microsofts C/C++ extension and it shows file edit information before each typedef. I'm not sure whether this is intended behaviour but I don't think so.

image

image

@eamodio
Copy link
Member

eamodio commented Jun 19, 2018

Can you try setting "gitlens.debug": true and then send a screen shot of those code lens again? That will give the type of symbol of that type and it can be turned off directly.

@eamodio eamodio added the needs-more-info Needs further information, steps, details, etc. label Jun 19, 2018
@Jamen1993
Copy link
Author

Hi eamodio,

please excuse that it took me so long to collect the requested screens.

first
second

Is this what you need?

@eamodio
Copy link
Member

eamodio commented Jul 9, 2018

Yes thank you. It seems a bit odd to me that the C++ language server is using SymbolKind.Class for all those (rather than SymbolKind.Enum and SymbolKind.Struct), but regardless the issue would be largely the same.

While it would affect more than just these typedefs you can turn off the code lens on the container scope by setting "gitlens.codeLens.scopes"= ["document"].

Or you add to the gitlens.codeLens.scopesByLanguage setting to only set the document scope for "language": "cpp"

{
    "language": "cpp",
    "scopes": [
        "document"
    ]
},

Or you add to the gitlens.codeLens.scopesByLanguage setting to only unset the Class symbol for "language": "cpp"

{
    "language": "cpp",
        "symbolScopes": [
            "!Class"
        ]
},

Maybe once microsoft/vscode#34968 lands and the language services provide more information I might be able to do more here to improve this behavior.

@eamodio eamodio added blocked: language-server Caused by or dependent on a language server issue or feature blocked: vscode Caused by or dependent on a VS Code issue or feature labels Jul 9, 2018
@eamodio eamodio removed the needs-more-info Needs further information, steps, details, etc. label Jul 29, 2018
@eamodio
Copy link
Member

eamodio commented Sep 5, 2018

Depends on: microsoft/vscode#57984

@gajop
Copy link

gajop commented Nov 30, 2018

I'm having a similar issue with using MyFunctionType = std::function<void()>;
I get author + date information above each such line.

@eamodio eamodio added the blocked Blocked or caused by an upstream issue or feature label Feb 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked: language-server Caused by or dependent on a language server issue or feature blocked: vscode Caused by or dependent on a VS Code issue or feature blocked Blocked or caused by an upstream issue or feature
Projects
None yet
Development

No branches or pull requests

3 participants