Skip to content

fix(lsp): support mixed encoding for lsp clients#1004

Merged
folke merged 1 commit into
folke:mainfrom
tris203:mixed_encodings
Nov 26, 2024
Merged

fix(lsp): support mixed encoding for lsp clients#1004
folke merged 1 commit into
folke:mainfrom
tris203:mixed_encodings

Conversation

@tris203
Copy link
Copy Markdown
Contributor

@tris203 tris203 commented Nov 25, 2024

Description

Fixes a warning notification for the first hover/signature help notification on nightly now that offset_encoding is required for make_position_params

Copy link
Copy Markdown
Owner

@folke folke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apart from the availability of vim.lsp.protocol, I also don't think passing a function as params works on Neovim <= 0.9?

Comment thread lua/noice/lsp/init.lua Outdated
@tris203
Copy link
Copy Markdown
Contributor Author

tris203 commented Nov 26, 2024

I didn't read the README properly

I had always assumed noice was nightly only, not nightly recommended

I can add a shim for back compat this evening

@tris203
Copy link
Copy Markdown
Contributor Author

tris203 commented Nov 26, 2024

Added a shim, and removed the reference to vim.lsp.protocol.Methods

@tris203 tris203 requested a review from folke November 26, 2024 18:50
@folke folke merged commit c6f6fb1 into folke:main Nov 26, 2024
@folke
Copy link
Copy Markdown
Owner

folke commented Nov 26, 2024

ty!

@will
Copy link
Copy Markdown

will commented Nov 29, 2024

Thanks @tris203 for figuring this out, looking forward to the 4.8.0 release in order to get rid of the warning: position_encoding is required, using the offset_encoding from the first client notification. Just posting the full error message in case people search for it.

folke pushed a commit that referenced this pull request Dec 7, 2024
🤖 I have created a release *beep* *boop*
---


## [4.8.0](v4.7.2...v4.8.0)
(2024-12-06)


### Features

* **msg:** added support for msg_show list_cmd and input_prompt kinds
([21fe733](21fe733))


### Bug Fixes

* **cmdline:** dont restore cursor after render. Fixes
[#959](#959)
([c49a4b0](c49a4b0))
* **health:** better health checks
([0f5f8c9](0f5f8c9))
* **lsp:** support mixed encoding for lsp clients
([#1004](#1004))
([c6f6fb1](c6f6fb1))
* **msg:** add new msg_show.lua_print to default routes for messages
([0e9853b](0e9853b))
* **notify:** always convert msg to string if not nil and not string
([3efadda](3efadda))
* **nui:** set max size to editor cols
([d9991ca](d9991ca))
* **router:** prevent overriding current tick
([e0fd746](e0fd746))
* **ui:** always queue incoming events when already processing
([6c7545a](6c7545a))


### Performance Improvements

* **hacks:** disable redraw hack. Should not be needed. If it breaks a
plugin, then it should be fixed there.
([956e3ac](956e3ac))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.

3 participants