pappasam / nginx-language-server

Language server for nginx.conf
GNU General Public License v3.0
60 stars 2 forks source link

There is an error in the channel log when saving the file #6

Closed yaegassy closed 3 years ago

yaegassy commented 3 years ago

Reproduction Procedure

  1. Open the file (nginx.conf).
  2. Save the file in :w.
  3. :CocCommand workspace.showOutput -> Choose by number: -> Enter the number of languageserver.nginx-language-server

Error description

Failed to handle notification textDocument/didSave: Object(textDocument=Object(uri='file:///Users/yaegassy/_Dev/server/nginx-ls-check/nginx.conf', version=1))
Traceback (most recent call last):
  File "/Users/yaegassy/_Dev/server/nginx-ls-check/venv/lib/python3.9/site-packages/pygls/protocol.py", line 279, in _get_handler
    return self.fm.builtin_features[feature_name]
KeyError: 'textDocument/didSave'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/yaegassy/_Dev/server/nginx-ls-check/venv/lib/python3.9/site-packages/pygls/protocol.py", line 282, in _get_handler
    return self.fm.features[feature_name]
KeyError: 'textDocument/didSave'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/yaegassy/_Dev/server/nginx-ls-check/venv/lib/python3.9/site-packages/pygls/protocol.py", line 306, in _handle_notification
    handler = self._get_handler(method_name)
  File "/Users/yaegassy/_Dev/server/nginx-ls-check/venv/lib/python3.9/site-packages/pygls/protocol.py", line 284, in _get_handler
    raise JsonRpcMethodNotFound.of(feature_name)
pygls.exceptions.JsonRpcMethodNotFound

DEMO

nginx-ls-error-issue

pappasam commented 3 years ago

Hmm, I need to manually set this for the latest version of pygls. See: https://github.com/pappasam/jedi-language-server/blob/main/jedi_language_server/server.py#L100.

I'll address as part of a major refactoring in the near future, but just to make sure, this doesn't prevent the tool from being usable for you, right?

yaegassy commented 3 years ago

Thanks for the reply.

There is no problem with the behavior, but I noticed this issue and registered it as an issue. 😇

yaegassy commented 3 years ago

This is the issue here, but it was a problem on my client side. I apologize for that. 🙇

Close the issue.