Code lens freaks out in .styl files, same problem is not present i CSS files.
Steps to Reproduce:
.styl file@lindskogen sorry for the delay on getting back to you (I'm currently on vacation). Is this still an issue with vscode 1.14?
Yes!
@lindskogen do you have a public repo, or an example file I could use to see this in action? Also are you using any other extensions? (probably specifically for Stylus?)
@lindskogen if I can get a reproducible case I'm hopeful that I could fix the issue
@lindskogen sorry to bug you, but I'd love to get this fixed. :)
Been unable to reproduce it on my non-work computer, only had this issue on my laptop from a previous job. Maybe it is fixed now, since I cannot reproduce it anymore :)
@lindskogen ok thanks! I'm going to close this then -- please feel free to reopen it if it comes back.
This is actually happening to me as well. Here's how it looks. (Edit: the gif appears to be running half-speed or less. The jumping around is much more prominent in real-time 馃槃 )
I have the language-stylus extension installed (version 1.7.3).
Typically what happens is that each block of styles (nested or top-level) each gets its own Code Lens annotation (whether it's "Cannot determine recent change or authors (unsaved changes)" or the actual author/change information). When you make changes to the file, all of those annotations appear and disappear frequently, which makes the file jump around.
This happens with every stylus file, but here's a sample of a file where I've been working on recently:
.promo-code__button--delete
&:hover
border-color bootstrap-color("danger", "hover")
background-color bootstrap-color("danger", "hover")
.promo-code__button--edit
&:hover
border-color bootstrap-color("primary", "hover")
background-color bootstrap-color("primary", "hover")
.promo-code__button--confirm
&:hover
border-color bootstrap-color("success", "hover")
background-color bootstrap-color("success", "hover")
&:disabled
cursor not-allowed
background-color brand-color("grey", "darker")
border-color brand-color("grey", "darker")
.add-employer-form
display flex
button
margin-left 5px
@cwhenderson20 Thank you for the GIF, I think I see what is happening. Can you try adding the following setting:
"gitlens.codeLens.perLanguageLocations": [
{
"language": "css",
"locations": [
"document"
]
},
{
"language": "html",
"locations": [
"document"
]
},
{
"language": "json",
"locations": [
"document"
]
},
{
"language": "less",
"locations": [
"document"
]
},
{
"language": "scss",
"locations": [
"document"
]
},
{
"language": "vue",
"locations": [
"document"
]
},
{
"language": "styl",
"locations": [
"document"
]
}
]
If that resolves the issue, I will add the styl section into the GitLens defaults.
Sure thing! Just added it and restarted VSCode (just to be sure). Same behavior, unfortunately.
As in the gif do you still see the codelens at the top of every class definition?
Yes, I do
Hrm, now I'm a bit confused :) -- Do you have a public repo that I can try this on myself?
Maybe the language server uses the full name stylus rather than the extension -- Can you try changing the setting to use "language": "stylus"?
Yep, that fixed it!
So does this setting have to stay in the settings.json file or is this a bug?
Great! I'll get a release together that adds that to the GitLens defaults. Thank you for your time and patience!
Once I get the update out, you'll be able to remove the setting.
Great! Thank you for your quick response time and excellent extension!
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.
Most helpful comment
Great! Thank you for your quick response time and excellent extension!