Skip to content
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

fix: handle lines with Unicode characters #33

Merged
merged 1 commit into from
Nov 17, 2023

Conversation

davidmh
Copy link
Owner

@davidmh davidmh commented Nov 17, 2023

The null-ls diagnostic reports the wrong range for the CSpell error if the line contains a Unicode character.

As a workaround, we read the misspelled word from the diagnostic's user_data. And only use the word from the range to trigger a new diagnostic.

That means that we will still see the wrong range in the diagnostic, but the code actions will work as expected.

See: jose-elias-alvarez/null-ls.nvim#1630

The null-ls diagnostic reports the wrong range for the CSpell error if
the line contains a Unicode character.

As a workaround, we read the misspelled word from the diagnostic's
user_data. And only use the word from the range to trigger a new
diagnostic.

That means that we will still see the wrong range in the diagnostic, but
the code actions will work as expected.

See: jose-elias-alvarez/null-ls.nvim#1630
@davidmh
Copy link
Owner Author

davidmh commented Nov 17, 2023

Closes #32

@davidmh davidmh merged commit 0663859 into main Nov 17, 2023
5 checks passed
@davidmh davidmh deleted the fix/handle-misleading-diagnostic-range branch November 17, 2023 04:30
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.

1 participant