-
Notifications
You must be signed in to change notification settings - Fork 28.7k
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
Stick Scroll sticks python function's decorator line instead of the declaration line #157180
Comments
Thank you for creating this topic. I have the same problem with all kinds of Spring Boot annotations. One function is sometimes also annotated with multiple annotations, which should also be taken into account. |
I don't have any issues with docblocks in JS. But apparently a lot of other langauges. |
This also happens with rust doc blocks, either with the triple slash ( /// All elements of the vector are set to a random number from 0 to the length of the vector (Exclusive)
/// # Example
/// ```
/// vec = shuffle(&mut vec).to_vec();
/// ```
fn shuffle(v: &mut Vec<i32>) -> Vec<i32>{
let test = v.len() as i32;
for i in 0..v.len() as i32 {
v[i as usize] = rand::thread_rng().gen_range(0..test);
}
return v.to_vec();
} What is interesting to note is that C++ (and very likely C) is not affected by this. /**
* @brief Returns an int based on user input
*
* @param prompt
* @return int
*/
int readI32(std::string prompt) {
int x;
std::cout << prompt;
try {
std::cin >> x;
} catch(std::exception e) {
std::cout << "Invalid input" << std::endl;
return readI32(prompt);
}
return x;
} |
Hi thanks for all your feedback. I will be looking into all these issues. |
I am seeing this with TypeScript decorators as well, so it looks like it is most/all languages. |
This might be improved if we would have a custom sticky ranges provider. A language server might tweak the results it would return from a sticky ranges provider to exclude decorators/comments/etc. Also related #157165 |
Another example for C# from #157293
|
Thank you for all the feedback. This should be fixed by #157466 with @DingWeizhe's contribution New behavior: |
@aiday-mar This seems not to be fixed for AL as posted by @paulojcdev in #157180 (comment) some comments before you commited the fix. |
Hi thanks for the feedback. Are you using the Insiders VSCode version? If you are on the stable version (which comes out once per month) you will not yet see the change until the next release. If you are on the Insiders version, are you using an extension which provides a language server for AL? The sticky scroll depends on this. If you are, what extension are you using? I will test on my computer. |
I’m on insiders. AL comes from MS and uses a language server. https://marketplace.visualstudio.com/items?itemName=ms-dynamics-smb.al |
Verified, however I now run into another issue, not sure if its related though #159118 |
Does this issue occur when all extensions are disabled?: Yes/No
Steps to Reproduce:
The function:
When the view is scrolled, sticky line should show the definition instead of the decorator. This is what it's like currently:
The text was updated successfully, but these errors were encountered: