-
-
Notifications
You must be signed in to change notification settings - Fork 19
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 crossed out modifier for deprecated diagnostics #65
base: main
Are you sure you want to change the base?
Conversation
I am personally against this idea, since it can make the text harder to read if its crossed out. Many codebases may have deprecated functions still being used, and it may not be possible to instantly upgrade them. Your compiler / IDE should give you warnings about deprecated methods, not syntax highlighting. I can understand this change for intellisense suggestions, but if deprecated methods are always crossed out it makes code harder to read |
That's true, but I'd argue it's good to see at a glance when some symbols are deprecated. Not sure I completely understood the argument on why we shouldn't have this visual indication on deprecated symbols. Could you elaborate on it?
Hmm, what do you mean by intellisense suggestions ? The language server informs editor which symbols are deprecated as part of diagnostics response. Then the editor decides how to act on this information. VS code and IntelliJ for example seem to use strikethrough. Other themes in Helix seem to systematically have deprecated symbols crossed out. If one doesn't like this, maybe there could be some configuration option in Helix or you could use custom theme? |
b22a823
to
09f58ea
Compare
i'm also a little unsure. i personally find on the other hand, as you've pointed out this is seemingly common to most (though not all) of the bundled helix themes, so users are presumably already used to seeing it. as far as i know there's no way to set options for a theme, so we'd have to distribute another set of theme files like we do for the i don't know yet which way to go. i'm gonna use it for a while and see how i feel, in the meantime please do continue to provide your perspectives! i find it valuable to hear from both sides. |
intellisense is another word for the autocompletion you get from the language server What I mean is that with these autocompletions, it's fine to have the specific autocompletions crossed out. For instance the why its fine: New code written shouldn't use deprecated methods. It's a handy indicator that despite this being a valid API, you shouldn't use it
You should be able to achieve that with the LSP warning. For instance here, the method generates a warning for being deprecated But if you cross out the |
Render deprecated symbols as crossed out.
Before:
![image](https://private-user-images.githubusercontent.com/36770267/410975527-097037df-63b6-4028-9aee-236ec9e76e18.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1NjUxNDYsIm5iZiI6MTczOTU2NDg0NiwicGF0aCI6Ii8zNjc3MDI2Ny80MTA5NzU1MjctMDk3MDM3ZGYtNjNiNi00MDI4LTlhZWUtMjM2ZWM5ZTc2ZTE4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE0VDIwMjcyNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTNjNzczYmExYjhjNjZiZTA2MTU0Y2RjZTBlNGFkZTFkZjQ3YzlkODY2ZGNiOTFjZmQ5OGI0YmJlOGNmYjAxMWQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.ps9BTISXoHIN9hugzvMtCh_z_anRxTqdxIIiJsWY3N0)
After:
![image](https://private-user-images.githubusercontent.com/36770267/410975726-a22d1089-c57e-426b-9c47-83d840cbad34.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1NjUxNDYsIm5iZiI6MTczOTU2NDg0NiwicGF0aCI6Ii8zNjc3MDI2Ny80MTA5NzU3MjYtYTIyZDEwODktYzU3ZS00MjZiLTljNDctODNkODQwY2JhZDM0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE0VDIwMjcyNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTI1M2NjYmRiNGMyODM3Y2Y3ODBkZDI3ZTIyZDM3ODEyNzA0ZTVjMTM1NjJkYWUxMzEwMzNkYjc1NGQ4ZjU3MzAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.t551qWWlDefB25OyHYaDo8U3ZLpf0dqvHlmq1gHw7z4)