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: offset_encoding is required now in make_position_params #721

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rockyzhang24
Copy link

@rockyzhang24 rockyzhang24 commented Nov 23, 2024

Adapt to the upstream change neovim/neovim@629483e to get rid of the warning message "warning: offset_encoding is required, using the offset_encoding from the first client".

Since the commit neovim/neovim@2dcbfe7, params in buf_request can accept a function that takes the client as a parameter. So instead of sending the same params to all servers, the params with correct offset_encoding will send to each single server.

@rockyzhang24
Copy link
Author

rockyzhang24 commented Nov 23, 2024

@clason Sorry to ping you but I got an email saying I have a comment from you "That is an LSP change; why should this affect a treesitter plugin?" But, I didn't see this comment here.

To answer it: Now offset_encoding is required in make_position_params after that commit; otherwise a warning will be shown. Thank you.

@rockyzhang24 rockyzhang24 changed the title fix: offset_encoding is required now fix: offset_encoding is required now in make_position_params Nov 23, 2024
@rockyzhang24 rockyzhang24 force-pushed the fix-encoding branch 2 times, most recently from 42f7892 to f0f796e Compare November 24, 2024 20:38
@rockyzhang24
Copy link
Author

I formatted the code conforming to stylua. Now I think it's ready to be previewed and merged. Thank you very much.

@rockyzhang24
Copy link
Author

I just realized that the has function for checking version numbers returns 0 or 1 instead of a boolean. I’ve fixed it, and everything should be fine now.

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