GithubHelp home page GithubHelp logo

Comments (11)

eamodio avatar eamodio commented on May 18, 2024 1

@beeplin great -- look for that to be in the defaults of the next release and you'll be able to remove those explicit settings

from vscode-gitlens.

octref avatar octref commented on May 18, 2024 1

Thanks a lot. gitlens looks pretty useful. I'll give it a try this weekend.

from vscode-gitlens.

eamodio avatar eamodio commented on May 18, 2024

@beeplin this is by design -- GitLens uses the symbol information provided by vscode to add its CodeLens (and extensions can extend/provide this symbol information). So the Vue extension must be providing a symbol for those classes.

You can control the behavior of the CodeLens via a few GitLens configuration settings (you can find the documentation for each setting here: https://github.com/eamodio/vscode-gitlens#extension-settings):

gitlens.codeLens.location
gitlens.codeLens.locationCustomSymbols
gitlens.codeLens.languageLocations

If you have any of the above set, please let me know how you have them configured.

Also if you upgrade to v2.12.1, you can also set "gitlens.advanced.codeLens.debug" = true which will add debug information into the CodeLens themselves (symbol name, line range, etc). If you turn that on, and send a screenshot I can help you configure your settings appropriately.

from vscode-gitlens.

beeplin avatar beeplin commented on May 18, 2024

thanks. I will feedback to the author of vetur.

from vscode-gitlens.

octref avatar octref commented on May 18, 2024

Hey I'm working on vetur.

VSCode added symbols for html/css in Feb release:

https://code.visualstudio.com/updates/v1_10#_html

image

If this breaks for vetur, it must be breaking for html too.

@beeplin Would you mind setting gitlens.codeLens.locationCustomSymbols? Seems this would fix the problem as @eamodio suggested.

from vscode-gitlens.

eamodio avatar eamodio commented on May 18, 2024

@octref sorry -- I definitely wasn't suggesting anything was wrong in vetur -- nor do I consider this something "broken" in GitLens. GitLens allows you to configure the CodeLens how ever you want given enough provided symbols from vscode/extensions.

But since css in html now add a symbol of class (which I consider to be a container type symbol) it will render with CodeLens by default (since the default is to render CodeLens at the document and "container" level). I've already added specific default overrides for json, css, scss, less to only render at the document level. I probably should just add html and vue to that.

@octref what is the language type for vue?

from vscode-gitlens.

octref avatar octref commented on May 18, 2024

No worries! Thanks for fast response.

The whole document is language type vue. Each embedded region has embedded language type such as vue-html, css, scss, less, javascript, etc.

lang

from vscode-gitlens.

eamodio avatar eamodio commented on May 18, 2024

@beeplin can you try the following setting:

"gitlens.codeLens.languageLocations": [
                        {
                            "language": "html",
                            "location": "document"
                        },
                        {
                            "language": "vue",
                            "location": "document"
                        },
                        {
                            "language": "json",
                            "location": "document"
                        },
                        {
                            "language": "css",
                            "location": "document"
                        },
                        {
                            "language": "scss",
                            "location": "document"
                        },
                        {
                            "language": "less",
                            "location": "document"
                        }
                    ];

And let me know if that resolves the issue for you? If so, then I will add those into the defaults for the next release.

from vscode-gitlens.

beeplin avatar beeplin commented on May 18, 2024

@eamodio thanks for the quick response! Yes, this setting resolve my issue perfectly.

from vscode-gitlens.

eamodio avatar eamodio commented on May 18, 2024

@beeplin it's now in 2.12.2

from vscode-gitlens.

github-actions avatar github-actions commented on May 18, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

from vscode-gitlens.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.