Skip to content

Conversation

@SebasF1349
Copy link

Expose diagnostic.code in from_json and from_regex for better customizability

closes #243

@xiaoshihou514
Copy link
Member

I think this is not backwards compatible, best to keep the defaults.

@SebasF1349
Copy link
Author

Sorry, yesterday I had to go and forgot to mention that I didn't fix the tests yet.

It is not backwards compatible in the sense that now the message won't include the error code by default, as seen in the failing test:

Passed in:
(string) 'Very important error message'
Expected:
(string) 'Very important error message[error code 114514]'

Configuration doesn't (shouldn't) need to be changed and the code can be readded by using vim.diagnostic.config if the user prefers. Maybe a note on how to do it should be added to the docs with a simple example.

@xiaoshihou514
Copy link
Member

Good point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing diagnostic.code

2 participants