-
Notifications
You must be signed in to change notification settings - Fork 39
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
suggest: refactor Suggest
stringify procedure
#887
Conversation
This is a breaking change, and I don't think is a good idea. If you run the var x = 0 You'll now get |
like said, it's not used in anywhere, instead it will lead problem, luckily it only used for tester, this field expect stringified |
Something not being used anywhere is not a reason to remove something, rather it's a data point on what the impact of the removal would be. For example, there exist compiler error messages (and maybe even language features) that are never tested for, but that doesn't imply that they should be removed. In any way, Did you check why this feature ( |
just found it used in vim related extension, |
@alaviss you're the vimmer, thoughts on this? |
I think part of the issue might be the expectation that it should be a stringified |
My plugin allows for it to be used to differentiate in syntax coloring. Though that has to be configured by the user (or a colorscheme). While I won't mind its removal, I don't think there's a lot of reason to do it either. |
I don't think we should make this change as it's useful information for editors. @bung87 if you think it still makes sense to make the change, could you note down in the PR body some more context, such as: "why expect a |
updated |
That clarified things a fair bit. For others who might not be familiar with LSP, there is a concept of @alaviss if it was tagged, I'm guessing that would suffice? |
The stringification proc that this PR changes is mainly used for communicating via the nimsuggest protocol. If you intend to generalize
That'd break the protocol and if you intend to go that path, I'd recommend just drop nimsuggest and go for LSP. Removing the special values is safe enough that it won't break any currently used code. |
Suggest.isGlobal
Suggest.isGlobal
Suggest.isGlobal
9145e30
to
83b5ab1
Compare
Suggest.isGlobal
Suggest
stringify procedure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a much better and simpler change, it's clear what's going on and it reduces cross-module dependence.
/merge |
Merge requested by: @saem Contents after the first section break of the PR description has been removed and preserved below:
|
Summary
Move
nimsuggest
specific string serialization forSuggest
into thenimsuggest
module itself. This is an internal refactoring, nofunctional change.
Details
Creating string representations of a
Suggest
via$
wasnimsuggest
focused,this has been moved into the
nimsuggest
module and renamedtoSuggestMsg
.As part of this change,
Suggest.isGlobal
was removed, and global anddeprecation is now tracked via the
flags
field, backed by the newlyintroduced
SuggestFlag
enum.