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

Signature help, document hover, diagnostics don't show up #1302

Closed
duydang2311 opened this issue Dec 19, 2021 · 9 comments
Closed

Signature help, document hover, diagnostics don't show up #1302

duydang2311 opened this issue Dec 19, 2021 · 9 comments
Labels
A-language-server Area: Language server client C-bug Category: This is a bug

Comments

@duydang2311
Copy link

duydang2311 commented Dec 19, 2021

Hello, I finally get typescript-language-server to work after following the guide in Troubleshooting.
Auto-completion works as expected but not for signature help, document hover or even diagnostics.

  1. Triggering signature_help does not show signature popup or any errors in the log, but hover does have an error in the log.
  2. I'm assuming that diagnostics is shown in the gutter automatically? If my assumption was correct, I had a wrong syntax error in my code but the hint wasn't displayed for me.

Reproduction steps

Create a keybinding for signature_help only, hover already has space-k.

[keys.insert]
"C-k" = "signature_help"

Triggering signature_help or hover, and none of them shows anything.

chat.registerCmd('v', onV);
     ^^^^^^^^^^^
     cursor position where i trigger signature_help, hover

Only hover prints an error as in the log below.

Environment

  • Platform: Windows
  • Helix version: helix 0.5.0
~/.cache/helix/helix.log
2021-12-19T20:31:22.080 helix_term::commands [ERROR] hover contents [LanguageString(LanguageString { language: "typescript", value: "function registerCmd(cmd: string, callback: Callback): void" }), String("")]
@duydang2311 duydang2311 added the C-bug Category: This is a bug label Dec 19, 2021
@kirawi kirawi added the A-language-server Area: Language server client label Dec 19, 2021
@sudormrfbin
Copy link
Member

Signature help is not yet fully implemented, see #1331.

@duydang2311
Copy link
Author

Oh, I see.
Same for document hover and diagnostics, is it?

@sudormrfbin
Copy link
Member

Hover and diagnostica should work properly though. Can you try with another typescript project ?

@archseer
Copy link
Member

The documentation popups are fixed in master, but not in 0.5. The typescript server uses MarkedString e128a87

@archseer
Copy link
Member

Diagnostics should work. You can see if the LSP is working by running helix with the -v flag and checking the logs for LSP traffic

@duydang2311
Copy link
Author

duydang2311 commented Dec 24, 2021

This is the log when I run with -v flag, LSP seems like working but there's no diagnostics.

2021-12-24T17:26:01.195 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"initialize","params":{"capabilities":{"textDocument":{"codeAction":{"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}}},"completion":{"completionItem":{"snippetSupport":false},"completionItemKind":{}},"hover":{"contentFormat":["markdown"]}},"window":{"workDoneProgress":true}},"processId":3916,"rootUri":"file:///F:/coding/sunday-altv"},"id":0}
2021-12-24T17:26:01.408 helix_lsp::transport [INFO] <- {"jsonrpc":"2.0","id":0,"result":{"capabilities":{"textDocumentSync":2,"completionProvider":{"triggerCharacters":[".","\"","'","/","@","<"],"resolveProvider":true},"codeActionProvider":true,"definitionProvider":true,"documentFormattingProvider":true,"documentRangeFormattingProvider":true,"documentHighlightProvider":true,"documentSymbolProvider":true,"executeCommandProvider":{"commands":["_typescript.applyWorkspaceEdit","_typescript.applyCodeAction","_typescript.applyRefactoring","_typescript.organizeImports","_typescript.applyRenameFile"]},"hoverProvider":true,"renameProvider":true,"referencesProvider":true,"signatureHelpProvider":{"triggerCharacters":["(",",","<"]},"workspaceSymbolProvider":true,"implementationProvider":true,"typeDefinitionProvider":true,"foldingRangeProvider":true,"callsProvider":true}}}
2021-12-24T17:26:01.408 helix_lsp::transport [INFO] <- {"capabilities":{"callsProvider":true,"codeActionProvider":true,"completionProvider":{"resolveProvider":true,"triggerCharacters":[".","\"","'","/","@","<"]},"definitionProvider":true,"documentFormattingProvider":true,"documentHighlightProvider":true,"documentRangeFormattingProvider":true,"documentSymbolProvider":true,"executeCommandProvider":{"commands":["_typescript.applyWorkspaceEdit","_typescript.applyCodeAction","_typescript.applyRefactoring","_typescript.organizeImports","_typescript.applyRenameFile"]},"foldingRangeProvider":true,"hoverProvider":true,"implementationProvider":true,"referencesProvider":true,"renameProvider":true,"signatureHelpProvider":{"triggerCharacters":["(",",","<"]},"textDocumentSync":2,"typeDefinitionProvider":true,"workspaceSymbolProvider":true}}
2021-12-24T17:26:01.408 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"initialized","params":{}}
2021-12-24T17:26:01.408 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"languageId":"ts","text":"export {\r\n    Data\r\n};\r\n\r\ntype Data = { component: number, items: number[] };","uri":"file:///F:/coding/sunday-altv/src/shared/player/component-item/index.ts","version":0}}}
2021-12-24T17:26:03.158 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"textDocument/didChange","params":{"contentChanges":[{"range":{"end":{"character":2,"line":2},"start":{"character":2,"line":2}},"text":"\r\n"}],"textDocument":{"uri":"file:///F:/coding/sunday-altv/src/shared/player/component-item/index.ts","version":1}}}
2021-12-24T17:26:03.388 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"textDocument/didChange","params":{"contentChanges":[{"range":{"end":{"character":0,"line":3},"start":{"character":0,"line":3}},"text":"\r\n"}],"textDocument":{"uri":"file:///F:/coding/sunday-altv/src/shared/player/component-item/index.ts","version":2}}}
2021-12-24T17:26:03.517 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"textDocument/didChange","params":{"contentChanges":[{"range":{"end":{"character":0,"line":4},"start":{"character":0,"line":4}},"text":"d"}],"textDocument":{"uri":"file:///F:/coding/sunday-altv/src/shared/player/component-item/index.ts","version":3}}}
2021-12-24T17:26:03.712 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"textDocument/didChange","params":{"contentChanges":[{"range":{"end":{"character":1,"line":4},"start":{"character":1,"line":4}},"text":"t"}],"textDocument":{"uri":"file:///F:/coding/sunday-altv/src/shared/player/component-item/index.ts","version":4}}}
2021-12-24T17:26:03.803 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"textDocument/didChange","params":{"contentChanges":[{"range":{"end":{"character":2,"line":4},"start":{"character":2,"line":4}},"text":"a"}],"textDocument":{"uri":"file:///F:/coding/sunday-altv/src/shared/player/component-item/index.ts","version":5}}}
2021-12-24T17:26:03.947 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"textDocument/didChange","params":{"contentChanges":[{"range":{"end":{"character":3,"line":4},"start":{"character":3,"line":4}},"text":"."}],"textDocument":{"uri":"file:///F:/coding/sunday-altv/src/shared/player/component-item/index.ts","version":6}}}
2021-12-24T17:26:03.948 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"textDocument/completion","params":{"position":{"character":4,"line":4},"textDocument":{"uri":"file:///F:/coding/sunday-altv/src/shared/player/component-item/index.ts"}},"id":1}
2021-12-24T17:26:04.108 helix_lsp::transport [INFO] <- {"jsonrpc":"2.0","id":1,"result":null}
2021-12-24T17:26:04.108 helix_lsp::transport [INFO] <- null
2021-12-24T17:26:04.309 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"textDocument/didChange","params":{"contentChanges":[{"range":{"end":{"character":4,"line":4},"start":{"character":3,"line":4}},"text":""}],"textDocument":{"uri":"file:///F:/coding/sunday-altv/src/shared/player/component-item/index.ts","version":7}}}
2021-12-24T17:26:04.438 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"textDocument/didChange","params":{"contentChanges":[{"range":{"end":{"character":3,"line":4},"start":{"character":2,"line":4}},"text":""}],"textDocument":{"uri":"file:///F:/coding/sunday-altv/src/shared/player/component-item/index.ts","version":8}}}
2021-12-24T17:26:04.576 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"textDocument/didChange","params":{"contentChanges":[{"range":{"end":{"character":2,"line":4},"start":{"character":1,"line":4}},"text":""}],"textDocument":{"uri":"file:///F:/coding/sunday-altv/src/shared/player/component-item/index.ts","version":9}}}
2021-12-24T17:26:04.722 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"textDocument/didChange","params":{"contentChanges":[{"range":{"end":{"character":1,"line":4},"start":{"character":0,"line":4}},"text":""}],"textDocument":{"uri":"file:///F:/coding/sunday-altv/src/shared/player/component-item/index.ts","version":10}}}
2021-12-24T17:26:05.542 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"textDocument/didChange","params":{"contentChanges":[{"range":{"end":{"character":0,"line":4},"start":{"character":0,"line":4}},"text":"c"}],"textDocument":{"uri":"file:///F:/coding/sunday-altv/src/shared/player/component-item/index.ts","version":11}}}
2021-12-24T17:26:05.602 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"textDocument/didChange","params":{"contentChanges":[{"range":{"end":{"character":1,"line":4},"start":{"character":1,"line":4}},"text":"o"}],"textDocument":{"uri":"file:///F:/coding/sunday-altv/src/shared/player/component-item/index.ts","version":12}}}
2021-12-24T17:26:05.717 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"textDocument/didChange","params":{"contentChanges":[{"range":{"end":{"character":2,"line":4},"start":{"character":2,"line":4}},"text":"n"}],"textDocument":{"uri":"file:///F:/coding/sunday-altv/src/shared/player/component-item/index.ts","version":13}}}
2021-12-24T17:26:05.755 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"textDocument/didChange","params":{"contentChanges":[{"range":{"end":{"character":3,"line":4},"start":{"character":3,"line":4}},"text":"s"}],"textDocument":{"uri":"file:///F:/coding/sunday-altv/src/shared/player/component-item/index.ts","version":14}}}
2021-12-24T17:26:05.789 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"textDocument/didChange","params":{"contentChanges":[{"range":{"end":{"character":4,"line":4},"start":{"character":4,"line":4}},"text":"o"}],"textDocument":{"uri":"file:///F:/coding/sunday-altv/src/shared/player/component-item/index.ts","version":15}}}
2021-12-24T17:26:05.924 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"textDocument/didChange","params":{"contentChanges":[{"range":{"end":{"character":5,"line":4},"start":{"character":5,"line":4}},"text":"l"}],"textDocument":{"uri":"file:///F:/coding/sunday-altv/src/shared/player/component-item/index.ts","version":16}}}
2021-12-24T17:26:05.990 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"textDocument/didChange","params":{"contentChanges":[{"range":{"end":{"character":6,"line":4},"start":{"character":6,"line":4}},"text":"e"}],"textDocument":{"uri":"file:///F:/coding/sunday-altv/src/shared/player/component-item/index.ts","version":17}}}
2021-12-24T17:26:06.077 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"textDocument/didChange","params":{"contentChanges":[{"range":{"end":{"character":7,"line":4},"start":{"character":7,"line":4}},"text":"."}],"textDocument":{"uri":"file:///F:/coding/sunday-altv/src/shared/player/component-item/index.ts","version":18}}}
2021-12-24T17:26:06.078 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"textDocument/completion","params":{"position":{"character":8,"line":4},"textDocument":{"uri":"file:///F:/coding/sunday-altv/src/shared/player/component-item/index.ts"}},"id":2}
2021-12-24T17:26:06.109 helix_lsp::transport [INFO] <- {"jsonrpc":"2.0","id":2,"result":{"items":[{"label":"assert","kind":2,"sortText":"1","commitCharacters":[".",",","("],"data":{"file":"f:\\coding\\sunday-altv\\src\\shared\\player\\component-item\\index.ts","line":5,"offset":9,"entryNames":["assert"]},"insertTextFormat":2},{"label":"clear","kind":2,"sortText":"1","commitCharacters":[".",",","("],"data":{"file":"f:\\coding\\sunday-altv\\src\\shared\\player\\component-item\\index.ts","line":5,"offset":9,"entryNames":["clear"]},"insertTextFormat":2},{"label":"Console","kind":5,"sortText":"1","commitCharacters":[".",",","("],"data":{"file":"f:\\coding\\sunday-altv\\src\\shared\\player\\component-item\\index.ts","line":5,"offset":9,"entryNames":["Console"]}},{"label":"count","kind":2,"sortText":"1","commitCharacters":[".",",","("],"data":{"file":"f:\\coding\\sunday-altv\\src\\shared\\player\\component-item\\index.ts","line":5,"offset":9,"entryNames":["count"]},"insertTextFormat":2},{"label":"countReset","kind":2,"sortText":"1","commitCharacters":[".",",","("],"data":{"file":"f:\\coding\\sunday-altv\\src\\shared\\player\\component-item\\index.ts","line":5,"offset":9,"entryNames":["countReset"]},"insertTextFormat":2},{"label":"debug","kind":2,"sortText":"1","commitCharacters":[".",",","("],"data":{"file":"f:\\coding\\sunday-altv\\src\\shared\\player\\component-item\\index.ts","line":5,"offset":9,"entryNames":["debug"]},"insertTextFormat":2},{"label":"dir","kind":2,"sortText":"1","commitCharacters":[".",",","("],"data":{"file":"f:\\coding\\sunday-altv\\src\\shared\\player\\component-item\\index.ts","line":5,"offset":9,"entryNames":["dir"]},"insertTextFormat":2},{"label":"dirxml","kind":2,"sortText":"1","commitCharacters":[".",",","("],"data":{"file":"f:\\coding\\sunday-altv\\src\\shared\\player\\component-item\\index.ts","line":5,"offset":9,"entryNames":["dirxml"]},"insertTextFormat":2},{"label":"error","kind":2,"sortText":"1","commitCharacters":[".",",","("],"data":{"file":"f:\\coding\\sunday-altv\\src\\shared\\player\\component-item\\index.ts","line":5,"offset":9,"entryNames":["error"]},"insertTextFormat":2},{"label":"exception","kind":2,"sortText":"1","commitCharacters":[".",",","("],"data":{"file":"f:\\coding\\sunday-altv\\src\\shared\\player\\component-item\\index.ts","line":5,"offset":9,"entryNames":["exception"]},"insertTextFormat":2},{"label":"group","kind":2,"sortText":"1","commitCharacters":[".",",","("],"data":{"file":"f:\\coding\\sunday-altv\\src\\shared\\player\\component-item\\index.ts","line":5,"offset":9,"entryNames":["group"]},"insertTextFormat":2},{"label":"groupCollapsed","kind":2,"sortText":"1","commitCharacters":[".",",","("],"data":{"file":"f:\\coding\\sunday-altv\\src\\shared\\player\\component-item\\index.ts","line":5,"offset":9,"entryNames":["groupCollapsed"]},"insertTextFormat":2},{"label":"groupEnd","kind":2,"sortText":"1","commitCharacters":[".",",","("],"data":{"file":"f:\\coding\\sunday-altv\\src\\shared\\player\\component-item\\index.ts","line":5,"offset":9,"entryNames":["groupEnd"]},"insertTextFormat":2},{"label":"info","kind":2,"sortText":"1","commitCharacters":[".",",","("],"data":{"file":"f:\\coding\\sunday-altv\\src\\shared\\player\\component-item\\index.ts","line":5,"offset":9,"entryNames":["info"]},"insertTextFormat":2},{"label":"log","kind":2,"sortText":"1","commitCharacters":[".",",","("],"data":{"file":"f:\\coding\\sunday-altv\\src\\shared\\player\\component-item\\index.ts","line":5,"offset":9,"entryNames":["log"]},"insertTextFormat":2},{"label":"memory","kind":5,"sortText":"1","commitCharacters":[".",",","("],"data":{"file":"f:\\coding\\sunday-altv\\src\\shared\\player\\component-item\\index.ts","line":5,"offset":9,"entryNames":["memory"]}},{"label":"profile","kind":2,"sortText":"1","commitCharacters":[".",",","("],"data":{"file":"f:\\coding\\sunday-altv\\src\\shared\\player\\component-item\\index.ts","line":5,"offset":9,"entryNames":["profile"]},"insertTextFormat":2},{"label":"profileEnd","kind":2,"sortText":"1","commitCharacters":[".",",","("],"data":{"file":"f:\\coding\\sunday-altv\\src\\shared\\player\\component-item\\index.ts","line":5,"offset":9,"entryNames":["profileEnd"]},"insertTextFormat":2},{"label":"table","kind":2,"sortText":"1","commitCharacters":[".",",","("],"data":{"file":"f:\\coding\\sunday-altv\\src\\shared\\player\\component-item\\index.ts","line":5,"offset":9,"entryNames":["table"]},"insertTextFormat":2},{"label":"time","kind":2,"sortText":"1","commitCharacters":[".",",","("],"data":{"file":"f:\\coding\\sunday-altv\\src\\shared\\player\\component-item\\index.ts","line":5,"offset":9,"entryNames":["time"]},"insertTextFormat":2},{"label":"timeEnd","kind":2,"sortText":"1","commitCharacters":[".",",","("],"data":{"file":"f:\\coding\\sunday-altv\\src\\shared\\player\\component-item\\index.ts","line":5,"offset":9,"entryNames":["timeEnd"]},"insertTextFormat":2},{"label":"timeLog","kind":2,"sortText":"1","commitCharacters":[".",",","("],"data":{"file":"f:\\coding\\sunday-altv\\src\\shared\\player\\component-item\\index.ts","line":5,"offset":9,"entryNames":["timeLog"]},"insertTextFormat":2},{"label":"timeStamp","kind":2,"sortText":"1","commitCharacters":[".",",","("],"data":{"file":"f:\\coding\\sunday-altv\\src\\shared\\player\\component-item\\index.ts","line":5,"offset":9,"entryNames":["timeStamp"]},"insertTextFormat":2},{"label":"trace","kind":2,"sortText":"1","commitCharacters":[".",",","("],"data":{"file":"f:\\coding\\sunday-altv\\src\\shared\\player\\component-item\\index.ts","line":5,"offset":9,"entryNames":["trace"]},"insertTextFormat":2},{"label":"warn","kind":2,"sortText":"1","commitCharacters":[".",",","("],"data":{"file":"f:\\coding\\sunday-altv\\src\\shared\\player\\component-item\\index.ts","line":5,"offset":9,"entryNames":["warn"]},"insertTextFormat":2}],"isIncomplete":false}}
2021-12-24T17:26:06.109 helix_lsp::transport [INFO] <- {"isIncomplete":false,"items":[{"commitCharacters":[".",",","("],"data":{"entryNames":["assert"],"file":"f:\\coding\\sunday-altv\\src\\shared\\player\\component-item\\index.ts","line":5,"offset":9},"insertTextFormat":2,"kind":2,"label":"assert","sortText":"1"},{"commitCharacters":[".",",","("],"data":{"entryNames":["clear"],"file":"f:\\coding\\sunday-altv\\src\\shared\\player\\component-item\\index.ts","line":5,"offset":9},"insertTextFormat":2,"kind":2,"label":"clear","sortText":"1"},{"commitCharacters":[".",",","("],"data":{"entryNames":["Console"],"file":"f:\\coding\\sunday-altv\\src\\shared\\player\\component-item\\index.ts","line":5,"offset":9},"kind":5,"label":"Console","sortText":"1"},{"commitCharacters":[".",",","("],"data":{"entryNames":["count"],"file":"f:\\coding\\sunday-altv\\src\\shared\\player\\component-item\\index.ts","line":5,"offset":9},"insertTextFormat":2,"kind":2,"label":"count","sortText":"1"},{"commitCharacters":[".",",","("],"data":{"entryNames":["countReset"],"file":"f:\\coding\\sunday-altv\\src\\shared\\player\\component-item\\index.ts","line":5,"offset":9},"insertTextFormat":2,"kind":2,"label":"countReset","sortText":"1"},{"commitCharacters":[".",",","("],"data":{"entryNames":["debug"],"file":"f:\\coding\\sunday-altv\\src\\shared\\player\\component-item\\index.ts","line":5,"offset":9},"insertTextFormat":2,"kind":2,"label":"debug","sortText":"1"},{"commitCharacters":[".",",","("],"data":{"entryNames":["dir"],"file":"f:\\coding\\sunday-altv\\src\\shared\\player\\component-item\\index.ts","line":5,"offset":9},"insertTextFormat":2,"kind":2,"label":"dir","sortText":"1"},{"commitCharacters":[".",",","("],"data":{"entryNames":["dirxml"],"file":"f:\\coding\\sunday-altv\\src\\shared\\player\\component-item\\index.ts","line":5,"offset":9},"insertTextFormat":2,"kind":2,"label":"dirxml","sortText":"1"},{"commitCharacters":[".",",","("],"data":{"entryNames":["error"],"file":"f:\\coding\\sunday-altv\\src\\shared\\player\\component-item\\index.ts","line":5,"offset":9},"insertTextFormat":2,"kind":2,"label":"error","sortText":"1"},{"commitCharacters":[".",",","("],"data":{"entryNames":["exception"],"file":"f:\\coding\\sunday-altv\\src\\shared\\player\\component-item\\index.ts","line":5,"offset":9},"insertTextFormat":2,"kind":2,"label":"exception","sortText":"1"},{"commitCharacters":[".",",","("],"data":{"entryNames":["group"],"file":"f:\\coding\\sunday-altv\\src\\shared\\player\\component-item\\index.ts","line":5,"offset":9},"insertTextFormat":2,"kind":2,"label":"group","sortText":"1"},{"commitCharacters":[".",",","("],"data":{"entryNames":["groupCollapsed"],"file":"f:\\coding\\sunday-altv\\src\\shared\\player\\component-item\\index.ts","line":5,"offset":9},"insertTextFormat":2,"kind":2,"label":"groupCollapsed","sortText":"1"},{"commitCharacters":[".",",","("],"data":{"entryNames":["groupEnd"],"file":"f:\\coding\\sunday-altv\\src\\shared\\player\\component-item\\index.ts","line":5,"offset":9},"insertTextFormat":2,"kind":2,"label":"groupEnd","sortText":"1"},{"commitCharacters":[".",",","("],"data":{"entryNames":["info"],"file":"f:\\coding\\sunday-altv\\src\\shared\\player\\component-item\\index.ts","line":5,"offset":9},"insertTextFormat":2,"kind":2,"label":"info","sortText":"1"},{"commitCharacters":[".",",","("],"data":{"entryNames":["log"],"file":"f:\\coding\\sunday-altv\\src\\shared\\player\\component-item\\index.ts","line":5,"offset":9},"insertTextFormat":2,"kind":2,"label":"log","sortText":"1"},{"commitCharacters":[".",",","("],"data":{"entryNames":["memory"],"file":"f:\\coding\\sunday-altv\\src\\shared\\player\\component-item\\index.ts","line":5,"offset":9},"kind":5,"label":"memory","sortText":"1"},{"commitCharacters":[".",",","("],"data":{"entryNames":["profile"],"file":"f:\\coding\\sunday-altv\\src\\shared\\player\\component-item\\index.ts","line":5,"offset":9},"insertTextFormat":2,"kind":2,"label":"profile","sortText":"1"},{"commitCharacters":[".",",","("],"data":{"entryNames":["profileEnd"],"file":"f:\\coding\\sunday-altv\\src\\shared\\player\\component-item\\index.ts","line":5,"offset":9},"insertTextFormat":2,"kind":2,"label":"profileEnd","sortText":"1"},{"commitCharacters":[".",",","("],"data":{"entryNames":["table"],"file":"f:\\coding\\sunday-altv\\src\\shared\\player\\component-item\\index.ts","line":5,"offset":9},"insertTextFormat":2,"kind":2,"label":"table","sortText":"1"},{"commitCharacters":[".",",","("],"data":{"entryNames":["time"],"file":"f:\\coding\\sunday-altv\\src\\shared\\player\\component-item\\index.ts","line":5,"offset":9},"insertTextFormat":2,"kind":2,"label":"time","sortText":"1"},{"commitCharacters":[".",",","("],"data":{"entryNames":["timeEnd"],"file":"f:\\coding\\sunday-altv\\src\\shared\\player\\component-item\\index.ts","line":5,"offset":9},"insertTextFormat":2,"kind":2,"label":"timeEnd","sortText":"1"},{"commitCharacters":[".",",","("],"data":{"entryNames":["timeLog"],"file":"f:\\coding\\sunday-altv\\src\\shared\\player\\component-item\\index.ts","line":5,"offset":9},"insertTextFormat":2,"kind":2,"label":"timeLog","sortText":"1"},{"commitCharacters":[".",",","("],"data":{"entryNames":["timeStamp"],"file":"f:\\coding\\sunday-altv\\src\\shared\\player\\component-item\\index.ts","line":5,"offset":9},"insertTextFormat":2,"kind":2,"label":"timeStamp","sortText":"1"},{"commitCharacters":[".",",","("],"data":{"entryNames":["trace"],"file":"f:\\coding\\sunday-altv\\src\\shared\\player\\component-item\\index.ts","line":5,"offset":9},"insertTextFormat":2,"kind":2,"label":"trace","sortText":"1"},{"commitCharacters":[".",",","("],"data":{"entryNames":["warn"],"file":"f:\\coding\\sunday-altv\\src\\shared\\player\\component-item\\index.ts","line":5,"offset":9},"insertTextFormat":2,"kind":2,"label":"warn","sortText":"1"}]}
2021-12-24T17:26:06.779 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"textDocument/didChange","params":{"contentChanges":[{"range":{"end":{"character":8,"line":4},"start":{"character":8,"line":4}},"text":"l"}],"textDocument":{"uri":"file:///F:/coding/sunday-altv/src/shared/player/component-item/index.ts","version":19}}}
2021-12-24T17:26:06.988 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"textDocument/didChange","params":{"contentChanges":[{"range":{"end":{"character":9,"line":4},"start":{"character":9,"line":4}},"text":"o"}],"textDocument":{"uri":"file:///F:/coding/sunday-altv/src/shared/player/component-item/index.ts","version":20}}}
2021-12-24T17:26:07.154 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"textDocument/didChange","params":{"contentChanges":[{"range":{"end":{"character":10,"line":4},"start":{"character":10,"line":4}},"text":"g"}],"textDocument":{"uri":"file:///F:/coding/sunday-altv/src/shared/player/component-item/index.ts","version":21}}}
2021-12-24T17:26:07.397 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"textDocument/didChange","params":{"contentChanges":[{"range":{"end":{"character":11,"line":4},"start":{"character":11,"line":4}},"text":"()"}],"textDocument":{"uri":"file:///F:/coding/sunday-altv/src/shared/player/component-item/index.ts","version":22}}}
2021-12-24T17:26:07.398 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"textDocument/signatureHelp","params":{"position":{"character":12,"line":4},"textDocument":{"uri":"file:///F:/coding/sunday-altv/src/shared/player/component-item/index.ts"}},"id":3}
2021-12-24T17:26:07.417 helix_lsp::transport [INFO] <- {"jsonrpc":"2.0","id":3,"result":{"activeSignature":0,"activeParameter":0,"signatures":[{"label":"log(message?: any, ...optionalParams: any[]): void","documentation":{"kind":"markdown","value":"Prints to `stdout` with newline."},"parameters":[{"label":"message?: any"},{"label":"...optionalParams: any[]"}]},{"label":"log(...data: any[]): void","parameters":[{"label":"...data: any[]"}]}]}}
2021-12-24T17:26:07.418 helix_lsp::transport [INFO] <- {"activeParameter":0,"activeSignature":0,"signatures":[{"documentation":{"kind":"markdown","value":"Prints to `stdout` with newline."},"label":"log(message?: any, ...optionalParams: any[]): void","parameters":[{"label":"message?: any"},{"label":"...optionalParams: any[]"}]},{"label":"log(...data: any[]): void","parameters":[{"label":"...data: any[]"}]}]}
2021-12-24T17:26:07.418 helix_term::commands [INFO] SignatureHelp { signatures: [SignatureInformation { label: "log(message?: any, ...optionalParams: any[]): void", documentation: Some(MarkupContent(MarkupContent { kind: Markdown, value: "Prints to `stdout` with newline." })), parameters: Some([ParameterInformation { label: Simple("message?: any"), documentation: None }, ParameterInformation { label: Simple("...optionalParams: any[]"), documentation: None }]), active_parameter: None }, SignatureInformation { label: "log(...data: any[]): void", documentation: None, parameters: Some([ParameterInformation { label: Simple("...data: any[]"), documentation: None }]), active_parameter: None }], active_signature: Some(0), active_parameter: Some(0) }
2021-12-24T17:26:07.764 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"textDocument/signatureHelp","params":{"position":{"character":12,"line":4},"textDocument":{"uri":"file:///F:/coding/sunday-altv/src/shared/player/component-item/index.ts"}},"id":4}
2021-12-24T17:26:07.766 helix_lsp::transport [INFO] <- {"jsonrpc":"2.0","id":4,"result":{"activeSignature":0,"activeParameter":0,"signatures":[{"label":"log(message?: any, ...optionalParams: any[]): void","documentation":{"kind":"markdown","value":"Prints to `stdout` with newline."},"parameters":[{"label":"message?: any"},{"label":"...optionalParams: any[]"}]},{"label":"log(...data: any[]): void","parameters":[{"label":"...data: any[]"}]}]}}
2021-12-24T17:26:07.766 helix_lsp::transport [INFO] <- {"activeParameter":0,"activeSignature":0,"signatures":[{"documentation":{"kind":"markdown","value":"Prints to `stdout` with newline."},"label":"log(message?: any, ...optionalParams: any[]): void","parameters":[{"label":"message?: any"},{"label":"...optionalParams: any[]"}]},{"label":"log(...data: any[]): void","parameters":[{"label":"...data: any[]"}]}]}
2021-12-24T17:26:07.766 helix_term::commands [INFO] SignatureHelp { signatures: [SignatureInformation { label: "log(message?: any, ...optionalParams: any[]): void", documentation: Some(MarkupContent(MarkupContent { kind: Markdown, value: "Prints to `stdout` with newline." })), parameters: Some([ParameterInformation { label: Simple("message?: any"), documentation: None }, ParameterInformation { label: Simple("...optionalParams: any[]"), documentation: None }]), active_parameter: None }, SignatureInformation { label: "log(...data: any[]): void", documentation: None, parameters: Some([ParameterInformation { label: Simple("...data: any[]"), documentation: None }]), active_parameter: None }], active_signature: Some(0), active_parameter: Some(0) }

@duydang2311
Copy link
Author

Hover and diagnostica should work properly though. Can you try with another typescript project ?

There's an initialization error when I try with a new typescript project.

Reproduction steps

  • Create a directory for the new project.
  • npm install typescript --save-dev.
  • npx tsc --init.
  • Create index.ts.
  • Open helix with the current working directory is the project directory, then open index.ts with file picker.

Here's how the project looks:

    Directory: F:\coding\ts-project

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d----          12/24/2021  5:37 PM                node_modules
-a---          12/24/2021  5:41 PM             13 index.ts
-a---          12/24/2021  5:37 PM            892 package-lock.json
-a---          12/24/2021  5:37 PM             58 package.json
-a---          12/24/2021  5:37 PM          11101 tsconfig.json
~/.cache/helix/helix.log
2021-12-24T17:40:30.846 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"initialize","params":{"capabilities":{"textDocument":{"codeAction":{"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}}},"completion":{"completionItem":{"snippetSupport":false},"completionItemKind":{}},"hover":{"contentFormat":["markdown"]}},"window":{"workDoneProgress":true}},"processId":22132,"rootUri":null},"id":0}
2021-12-24T17:40:31.056 helix_lsp::transport [INFO] <- {"jsonrpc":"2.0","id":0,"error":{"code":-32603,"message":"Request initialize failed with message: The \"path\" argument must be of type string or an instance of Buffer or URL. Received undefined"}}
2021-12-24T17:40:31.056 helix_lsp::transport [ERROR] <- Internal error: Request initialize failed with message: The "path" argument must be of type string or an instance of Buffer or URL. Received undefined

@archseer
Copy link
Member

Looks like we can't find the workspace root. It currently uses .git to find the root, and since you're not using version control it can't find it.

There's some glue code to also consider marker files (e.g. package.json) but it's not currently hooked up

@archseer
Copy link
Member

archseer commented Apr 4, 2022

Should be resolved by now

@archseer archseer closed this as completed Apr 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-language-server Area: Language server client C-bug Category: This is a bug
Projects
None yet
Development

No branches or pull requests

4 participants