lsp-mode icon indicating copy to clipboard operation
lsp-mode copied to clipboard

Warning (lsp-mode): Unknown notification: workspace/semanticTokens/refresh

Open rieje opened this issue 3 years ago • 7 comments

Thank you for the bug report

  • [X] I am using the latest version of lsp-mode related packages.
  • [X] I checked FAQ and Troubleshooting sections

Bug description

Got warning message popup when lsp-mode and lua-language-server enabled:

Warning (lsp-mode): Unknown notification: workspace/semanticTokens/refresh

Steps to reproduce

Enable lua-language-server for lsp-mode.

Expected behavior

No warning popup.

Which Language Server did you use?

lsp-language-server (latest, 2.6.7)

OS

Linux

Anything else?

Probably related comment from closed issue.

rieje avatar Mar 28 '22 14:03 rieje

@ericdallo @sebastiansturm - any clue?

yyoncho avatar Mar 28 '22 15:03 yyoncho

Odd, we do implement support for that notification here , or do we need to handle a server request differently from a server notification @yyoncho ?

ericdallo avatar Mar 28 '22 15:03 ericdallo

@rieje as I requested in the original issue, can you test with the latest versions of everything, preferably with M-x lsp-start-plain?

yyoncho avatar Mar 28 '22 15:03 yyoncho

M-x lsp-start-plain then installed lua-mode and enabled on buffer for lua file, same issue.

rieje avatar Mar 28 '22 15:03 rieje

Odd, we do implement support for that notification here , or do we need to handle a server request differently from a server notification @yyoncho ?

@ericdallo this is registration for request, while the warning is for missing notification handler. They should be registered here - https://github.com/emacs-lsp/lsp-mode/blob/master/lsp-mode.el#L6208 .

At the same time token refresh is listed as a request, not notification: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#semanticTokens_refreshRequest so I believe that the issue should be fixed on the server unless we somehow mistake request with notification.

yyoncho avatar Mar 28 '22 15:03 yyoncho

At the same time token refresh is listed as a request, not notification: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#semanticTokens_refreshRequest so I believe that the issue should be fixed on the server unless we somehow mistake request with notification.

Agreed, it's something to be fixed on server indeed IMO

ericdallo avatar Mar 28 '22 15:03 ericdallo

thanks for resolving this so quickly @yyoncho and @ericdallo! I'll just add that the same issue came up previously (https://github.com/emacs-lsp/lsp-mode/issues/3029), in response to which a PR to the lua language server had been opened (https://github.com/sumneko/lua-language-server/pull/633) which seems to have been merged into the lua language server in August 2021

sebastiansturm avatar Mar 28 '22 21:03 sebastiansturm