Skip to content

errors from language server do not appear #338

Closed

Description

@DetachHead

i can't seem to get the LSP to work at all:

server config

image

mappings

not really sure how to use this. what is a language ID? tried the same thing in the "File type" tab with no luck.
image

i also tried setting file name patterns, but i'm not sure if this is correct either. does it use glob syntax?
image

logs

it seems to have started the server:

image

but it does not seem to be reporting any errors:

expected result

(screenshot from the basedpyright vscode extension, which uses the LSP)
image

actual result

(this error is from pycharm's native python type checking, not the language server)
image

Activity

  1. angelozerr commented on Jun 10, 2024

    @angelozerr
    Contributor

    but it does not seem to be reporting any errors:

    The log tab is filled with lsp window/logMessage

    You need to go to traces tab to see lsp traces and you should see some textDocument/publishDiagnostic if your ls reports some validation error

  2. angelozerr commented on Jun 10, 2024

    @angelozerr
    Contributor

    @DetachHead for your questions about language id, file type pattern etc please read https://github.com/redhat-developer/lsp4ij/blob/main/docs%2FUserDefinedLanguageServer.md

    If it is not clear please tell me to omprove the documentation

  3. fbricon commented on Jun 10, 2024

    @fbricon
    Contributor

    I tried it on Intellij IDEA and didn't get any validation at first, but then I added an empty configuration object {} and it just worked:
    Screenshot 2024-06-10 at 10 54 32

    Screenshot 2024-06-10 at 10 54 11 Screenshot 2024-06-10 at 10 56 58
  4. angelozerr commented on Jun 10, 2024

    @angelozerr
    Contributor

    That's very strange, because this didChangeConfiguration is used only when you save it, not when you start the ls.

    I wonder if it isworking if you restart the ls?

    If not I think we should add a new checkbox send didChangeConfiguration when ls is started to do that.

  5. DetachHead commented on Jun 10, 2024

    @DetachHead
    Author

    for your questions about language id, file type pattern etc please read https://github.com/redhat-developer/lsp4ij/blob/main/docs%2FUserDefinedLanguageServer.md

    If it is not clear please tell me to omprove the documentation

    my bad, looking into it further i realize language ID is an LSP feature: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocumentItem

    perhaps the documentation could be updated to clarify this. i imagine many people attempting to use this plugin may be unfamiliar with the LSP protocol itself and are just trying to get their IDE to work well with the language they're using.

    I tried it on Intellij IDEA and didn't get any validation at first, but then I added an empty configuration object {} and it just worked

    setting the empty config object works, thanks! should that field default to an empty object when it's not set? or maybe this is a bug with pyright's language server rather than this plugin?

  6. fbricon commented on Jun 10, 2024

    @fbricon
    Contributor

    languageId should be a combobox with a list of preset languages eventually

  7. fbricon commented on Jun 11, 2024

    @fbricon
    Contributor

    Fixed with #339. An empty configuration object is now always sent in workspace/didChangeConfiguration events on startup.

  8. fbricon commented on Jun 11, 2024

    @fbricon
    Contributor

    @DetachHead in any case, I suggest pyright handles null configuration values, possibly sent by other clients.

  9. added this to the 0.0.2 milestone on Jun 11, 2024
  10. added
    bug
    on Jun 11, 2024
  11. angelozerr commented on Jun 11, 2024

    @angelozerr
    Contributor

    my bad, looking into it further i realize language ID is an LSP feature: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocumentItem

    perhaps the documentation could be updated to clarify this. i imagine many people attempting to use this plugin may be unfamiliar with the LSP protocol itself and are just trying to get their IDE to work well with the language they're using.

    See doc at https://github.com/redhat-developer/lsp4ij/blob/main/docs/UserDefinedLanguageServer.md#language-id

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions