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

No diagnostics with nimlsp #1766

Closed
avahe-kellenberger opened this issue Apr 15, 2020 · 4 comments
Closed

No diagnostics with nimlsp #1766

avahe-kellenberger opened this issue Apr 15, 2020 · 4 comments

Comments

@avahe-kellenberger
Copy link

avahe-kellenberger commented Apr 15, 2020

Result from CocInfo

## versions

vim version: NVIM v0.4.3
node version: v13.12.0
coc.nvim version: 0.0.77-9d846734a2
term: st-256color
platform: linux

## Messages

## Output channel: languageserver.nim

[Trace - 3:37:12 PM] Sending request 'initialize - (0)'.
Params: {
    "processId": 145444,
    "rootPath": "/home/avahe/programming/nim/testing",
    "rootUri": "file:///home/avahe/programming/nim/testing",
    "capabilities": {
        "workspace": {
            "applyEdit": true,
            "workspaceEdit": {
                "documentChanges": true,
                "resourceOperations": [
                    "create",
                    "rename",
                    "delete"
                ],
                "failureHandling": "textOnlyTransactional"
            },
            "didChangeConfiguration": {
                "dynamicRegistration": true
            },
            "didChangeWatchedFiles": {
                "dynamicRegistration": true
            },
            "symbol": {
                "dynamicRegistration": true,
                "symbolKind": {
                    "valueSet": [
                        1,
                        2,
                        3,
                        4,
                        5,
                        6,
                        7,
                        8,
                        9,
                        10,
                        11,
                        12,
                        13,
                        14,
                        15,
                        16,
                        17,
                        18,
                        19,
                        20,
                        21,
                        22,
                        23,
                        24,
                        25,
                        26
                    ]
                }
            },
            "executeCommand": {
                "dynamicRegistration": true
            },
            "configuration": true,
            "workspaceFolders": true
        },
        "textDocument": {
            "publishDiagnostics": {
                "relatedInformation": true,
                "versionSupport": false
            },
            "synchronization": {
                "dynamicRegistration": true,
                "willSave": true,
                "willSaveWaitUntil": true,
                "didSave": true
            },
            "completion": {
                "dynamicRegistration": true,
                "contextSupport": true,
                "completionItem": {
                    "snippetSupport": true,
                    "commitCharactersSupport": true,
                    "documentationFormat": [
                        "markdown",
                        "plaintext"
                    ],
                    "deprecatedSupport": true,
                    "preselectSupport": true
                },
                "completionItemKind": {
                    "valueSet": [
                        1,
                        2,
                        3,
                        4,
                        5,
                        6,
                        7,
                        8,
                        9,
                        10,
                        11,
                        12,
                        13,
                        14,
                        15,
                        16,
                        17,
                        18,
                        19,
                        20,
                        21,
                        22,
                        23,
                        24,
                        25
                    ]
                }
            },
            "hover": {
                "dynamicRegistration": true,
                "contentFormat": [
                    "markdown",
                    "plaintext"
                ]
            },
            "signatureHelp": {
                "dynamicRegistration": true,
                "signatureInformation": {
                    "documentationFormat": [
                        "markdown",
                        "plaintext"
                    ],
                    "parameterInformation": {
                        "labelOffsetSupport": true
                    }
                }
            },
            "definition": {
                "dynamicRegistration": true
            },
            "references": {
                "dynamicRegistration": true
            },
            "documentHighlight": {
                "dynamicRegistration": true
            },
            "documentSymbol": {
                "dynamicRegistration": true,
                "symbolKind": {
                    "valueSet": [
                        1,
                        2,
                        3,
                        4,
                        5,
                        6,
                        7,
                        8,
                        9,
                        10,
                        11,
                        12,
                        13,
                        14,
                        15,
                        16,
                        17,
                        18,
                        19,
                        20,
                        21,
                        22,
                        23,
                        24,
                        25,
                        26
                    ]
                },
                "hierarchicalDocumentSymbolSupport": true
            },
            "codeAction": {
                "dynamicRegistration": true,
                "isPreferredSupport": true,
                "codeActionLiteralSupport": {
                    "codeActionKind": {
                        "valueSet": [
                            "",
                            "quickfix",
                            "refactor",
                            "refactor.extract",
                            "refactor.inline",
                            "refactor.rewrite",
                            "source",
                            "source.organizeImports"
                        ]
                    }
                }
            },
            "codeLens": {
                "dynamicRegistration": true
            },
            "formatting": {
                "dynamicRegistration": true
            },
            "rangeFormatting": {
                "dynamicRegistration": true
            },
            "onTypeFormatting": {
                "dynamicRegistration": true
            },
            "rename": {
                "dynamicRegistration": true,
                "prepareSupport": true
            },
            "documentLink": {
                "dynamicRegistration": true,
                "tooltipSupport": true
            },
            "typeDefinition": {
                "dynamicRegistration": true
            },
            "implementation": {
                "dynamicRegistration": true
            },
            "declaration": {
                "dynamicRegistration": true
            },
            "colorProvider": {
                "dynamicRegistration": true
            },
            "foldingRange": {
                "dynamicRegistration": true,
                "rangeLimit": 5000,
                "lineFoldingOnly": true
            },
            "selectionRange": {
                "dynamicRegistration": true
            }
        },
        "window": {
            "workDoneProgress": true
        }
    },
    "initializationOptions": {},
    "trace": "verbose",
    "workspaceFolders": [
        {
            "uri": "file:///home/avahe/programming/nim/testing",
            "name": "testing"
        }
    ]
}


[Trace - 3:37:12 PM] Received response 'initialize - (0)' in 12ms.
Result: {
    "capabilities": {
        "textDocumentSync": {
            "openClose": true,
            "change": 1,
            "willSave": false,
            "willSaveWaitUntil": false,
            "save": {
                "includeText": true
            }
        },
        "hoverProvider": true,
        "completionProvider": {
            "resolveProvider": true,
            "triggerCharacters": [
                ".",
                " "
            ]
        },
        "definitionProvider": true,
        "referencesProvider": true,
        "renameProvider": true
    }
}


[Trace - 3:37:12 PM] Sending notification 'initialized'.
Params: {}


[Trace - 3:37:12 PM] Sending notification 'textDocument/didOpen'.
Params: {
    "textDocument": {
        "uri": "file:///home/avahe/programming/nim/testing/test.nim",
        "languageId": "nim",
        "version": 1,
        "text": "let foo: string = 123\n\n"
    }
}


Hint: used config file '/home/avahe/.choosenim/toolchains/nim-1.2.0/config/nim.cfg' [Conf]

Describe the bug

No diagnostics seem to be reported, but the maintainer of nimlsp says it's working for other lsp clients.

Reproduce the bug

  • Create file mini.vim with:
call plug#begin(stdpath('data'))
Plug 'neoclide/coc.nvim', { 'branch': 'release' }
call plug#end()
autocmd BufNewFile,BufRead *.nim, set filetype=nim

coc-settings.json:

{
  "languageserver": {
    "nim": {
      "command": "nimlsp",
      "filetypes": ["nim"],
      "trace.server": "verbose"
    }
  }
}
  • Start (neo)vim with command: vim -u mini.vim

  • Edit a *.nim file with an invalid nim statement such as:

let foo: string = 123

This also requires having nim and nimlsp installed. Install nim with choosenim, then install nimlsp via: nimble install nimlsp

@avahe-kellenberger
Copy link
Author

Worked with the creator of nimlsp and found the solution - nimlsp was not allowing extra fields to be passed that weren't explicitly defined in the LSP. It's been fixed and will probably be released soon.

@susurri
Copy link

susurri commented Jan 25, 2021

it seems the issue still exists.

vim version: NVIM v0.4.4
node version: v14.15.4
coc.nvim version: 0.0.80-50544406f0
nim 1.4.2
nimlsp v0.2.6

@avahe-kellenberger
Copy link
Author

He reverted the change that fixed this, because it was apparently causing other issues. Going to try getting a hold of him, soon.

@avahe-kellenberger
Copy link
Author

@susurri It was just fixed now (see PMunch/nimlsp#71)

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

No branches or pull requests

2 participants