-
-
Notifications
You must be signed in to change notification settings - Fork 961
Open
Labels
Description
Thank you for the bug report
- I am using the latest version of
lsp-moderelated packages. - I checked FAQ and Troubleshooting sections
- You may also try reproduce the issue using clean environment using the following command:
M-x lsp-start-plain
Bug description
lsp mode does not work when using server ty-ls (python ty) and raises the error mentioned in the title.
Steps to reproduce
- install
lsp-mode - install ty with
uv tool install ty@latest - open a python file
Expected behavior
lsp mode runs correctly
Which Language Server did you use?
ty-ls
OS
Linux
Error callstack
*Backtrace*
Debugger entered--Lisp error: (wrong-type-argument hash-table-p nil)
gethash("range" nil)
#f(compiled-function (input0) #<bytecode -0x1d0cb719c9e36d2b>)(#<hash-table equal 5/5 0x102e9c86c68f ...>)
-keep(#f(compiled-function (input0) #<bytecode -0x1d0cb719c9e36d2b>) (#<hash-table equal 4/4 0x102e9fb1f6fe ...> #<hash-table equal 4/4 0x102e9ca8b112 ...> #<hash-table equal 4/4 0x102e9ca8b16d ...> #<hash-table equal 4/4 0x102e9ca8b1f9 ...> #<hash-table equal 4/4 0x102e9cb950e0 ...> #<hash-table equal 4/4 0x102e9cb95164 ...> #<hash-table equal 4/4 0x102e9ca8c8f0 ...> #<hash-table equal 4/4 0x102e9ca8c894 ...> #<hash-table equal 4/4 0x102e9ca8cbdb ...> #<hash-table equal 4/4 0x102e9cbb2649 ...> #<hash-table equal 4/4 0x102e9cbb2605 ...> #<hash-table equal 4/4 0x102e9cbb2a40 ...> #<hash-table equal 4/4 0x102e9c86fff8 ...> #<hash-table equal 4/4 0x102e9c86ff6c ...> #<hash-table equal 4/4 0x102e9c86ff13 ...> #<hash-table equal 4/4 0x102e9c86f953 ...> #<hash-table equal 4/4 0x102e9c867609 ...> #<hash-table equal 4/4 0x102e9c867645 ...> #<hash-table equal 4/4 0x102e9c867780 ...> #<hash-table equal 4/4 0x102e9c867744 ...> #<hash-table equal 4/4 0x102e9c8b9512 ...> #<hash-table equal 4/4 0x102e9c8b94d2 ...> #<hash-table equal 4/4 0x102e9c8b94ad ...> #<hash-table equal 4/4 0x102e9c8b9439 ...> #<hash-table equal 4/4 0x102e9c8611a2 ...> #<hash-table equal 5/5 0x102e9c86c68f ...> #<hash-table equal 5/5 0x102e9c86ca4f ...>))
lsp--symbols-informations->document-symbols-hierarchy((#<hash-table equal 4/4 0x102e9fb1f6fe ...> #<hash-table equal 4/4 0x102e9ca8b112 ...> #<hash-table equal 4/4 0x102e9ca8b16d ...> #<hash-table equal 4/4 0x102e9ca8b1f9 ...> #<hash-table equal 4/4 0x102e9cb950e0 ...> #<hash-table equal 4/4 0x102e9cb95164 ...> #<hash-table equal 4/4 0x102e9ca8c8f0 ...> #<hash-table equal 4/4 0x102e9ca8c894 ...> #<hash-table equal 4/4 0x102e9ca8cbdb ...> #<hash-table equal 4/4 0x102e9cbb2649 ...> #<hash-table equal 4/4 0x102e9cbb2605 ...> #<hash-table equal 4/4 0x102e9cbb2a40 ...> #<hash-table equal 4/4 0x102e9c86fff8 ...> #<hash-table equal 4/4 0x102e9c86ff6c ...> #<hash-table equal 4/4 0x102e9c86ff13 ...> #<hash-table equal 4/4 0x102e9c86f953 ...> #<hash-table equal 4/4 0x102e9c867609 ...> #<hash-table equal 4/4 0x102e9c867645 ...> #<hash-table equal 4/4 0x102e9c867780 ...> #<hash-table equal 4/4 0x102e9c867744 ...> #<hash-table equal 4/4 0x102e9c8b9512 ...> #<hash-table equal 4/4 0x102e9c8b94d2 ...> #<hash-table equal 4/4 0x102e9c8b94ad ...> #<hash-table equal 4/4 0x102e9c8b9439 ...> #<hash-table equal 4/4 0x102e9c8611a2 ...> #<hash-table equal 5/5 0x102e9c86c68f ...> #<hash-table equal 5/5 0x102e9c86ca4f ...>) #<hash-table equal 2/6 0x102e9cbb9c42 ...>)
lsp--symbols->document-symbols-hierarchy((#<hash-table equal 4/4 0x102e9fb1f6fe ...> #<hash-table equal 4/4 0x102e9ca8b112 ...> #<hash-table equal 4/4 0x102e9ca8b16d ...> #<hash-table equal 4/4 0x102e9ca8b1f9 ...> #<hash-table equal 4/4 0x102e9cb950e0 ...> #<hash-table equal 4/4 0x102e9cb95164 ...> #<hash-table equal 4/4 0x102e9ca8c8f0 ...> #<hash-table equal 4/4 0x102e9ca8c894 ...> #<hash-table equal 4/4 0x102e9ca8cbdb ...> #<hash-table equal 4/4 0x102e9cbb2649 ...> #<hash-table equal 4/4 0x102e9cbb2605 ...> #<hash-table equal 4/4 0x102e9cbb2a40 ...> #<hash-table equal 4/4 0x102e9c86fff8 ...> #<hash-table equal 4/4 0x102e9c86ff6c ...> #<hash-table equal 4/4 0x102e9c86ff13 ...> #<hash-table equal 4/4 0x102e9c86f953 ...> #<hash-table equal 4/4 0x102e9c867609 ...> #<hash-table equal 4/4 0x102e9c867645 ...> #<hash-table equal 4/4 0x102e9c867780 ...> #<hash-table equal 4/4 0x102e9c867744 ...> #<hash-table equal 4/4 0x102e9c8b9512 ...> #<hash-table equal 4/4 0x102e9c8b94d2 ...> #<hash-table equal 4/4 0x102e9c8b94ad ...> #<hash-table equal 4/4 0x102e9c8b9439 ...> #<hash-table equal 4/4 0x102e9c8611a2 ...> #<hash-table equal 5/5 0x102e9c86c68f ...> #<hash-table equal 5/5 0x102e9c86ca4f ...>))
lsp-headerline--build-symbol-string()
#<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_25>(symbols)
lsp-headerline--build-string()
lsp-headerline-check-breadcrumb()
lsp--on-idle(#<buffer api_base.py>)
apply(lsp--on-idle #<buffer api_base.py>)
timer-event-handler([t 0 0 500000 nil lsp--on-idle (#<buffer api_base.py>) idle 0 nil])
*lsp-log*
Command "semgrep lsp" is not present on the path.
Command "ruff server" is present on the path.
Command "ty server" is present on the path.
Command "pylsp" is present on the path.
Command "pyls" is not present on the path.
Command "semgrep lsp" is not present on the path.
Command "ruff server" is present on the path.
Command "ty server" is present on the path.
Command "pylsp" is present on the path.
Command "pyls" is not present on the path.
Found the following clients for <path/to/file>.py: (server-id ruff, priority -2), (server-id ty-ls, priority -1), (server-id pylsp, priority -1)
The following clients were selected based on priority: (server-id pylsp, priority -1), (server-id ruff, priority -2), (server-id ty-ls, priority -1)
Cancelling textDocument/codeAction(13) in hook post-command-hook
Creating watchers for following 1 folders:
...
Creating watchers for following 8 folders:
...
*lsp-log: ty-ls*
[Trace - 10:07:34 ] Sending request 'initialize - (3)'.
Params: {
"processId": 82459,
"rootPath": "...",
"clientInfo": {
"name": "emacs",
"version": "GNU Emacs 30.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.50, cairo version 1.18.4)"
},
"rootUri": "file://...",
"capabilities": {
"general": {
"positionEncodings": [
"utf-32",
"utf-16"
]
},
"workspace": {
"workspaceEdit": {
"documentChanges": true,
"resourceOperations": [
"create",
"rename",
"delete"
]
},
"applyEdit": true,
"symbol": {
"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": false
},
"didChangeWatchedFiles": {
"dynamicRegistration": true
},
"workspaceFolders": true,
"configuration": true,
"codeLens": {
"refreshSupport": true
},
"diagnostics": {
"refreshSupport": false
},
"fileOperations": {
"didCreate": false,
"willCreate": false,
"didRename": true,
"willRename": true,
"didDelete": false,
"willDelete": false
}
},
"textDocument": {
"declaration": {
"dynamicRegistration": true,
"linkSupport": true
},
"definition": {
"dynamicRegistration": true,
"linkSupport": true
},
"references": {
"dynamicRegistration": true
},
"implementation": {
"dynamicRegistration": true,
"linkSupport": true
},
"typeDefinition": {
"dynamicRegistration": true,
"linkSupport": true
},
"synchronization": {
"willSave": true,
"didSave": true,
"willSaveWaitUntil": true
},
"documentSymbol": {
"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
},
"formatting": {
"dynamicRegistration": true
},
"rangeFormatting": {
"dynamicRegistration": true
},
"onTypeFormatting": {
"dynamicRegistration": true
},
"rename": {
"dynamicRegistration": true,
"prepareSupport": true
},
"codeAction": {
"dynamicRegistration": true,
"isPreferredSupport": true,
"codeActionLiteralSupport": {
"codeActionKind": {
"valueSet": [
"",
"quickfix",
"refactor",
"refactor.extract",
"refactor.inline",
"refactor.rewrite",
"source",
"source.organizeImports"
]
}
},
"resolveSupport": {
"properties": [
"edit",
"command"
]
},
"dataSupport": true
},
"completion": {
"completionItem": {
"snippetSupport": true,
"documentationFormat": [
"markdown",
"plaintext"
],
"resolveAdditionalTextEditsSupport": true,
"insertReplaceSupport": true,
"deprecatedSupport": true,
"resolveSupport": {
"properties": [
"documentation",
"detail",
"additionalTextEdits",
"command"
]
},
"insertTextModeSupport": {
"valueSet": [
1,
2
]
},
"labelDetailsSupport": true
},
"contextSupport": true,
"dynamicRegistration": true
},
"signatureHelp": {
"signatureInformation": {
"parameterInformation": {
"labelOffsetSupport": true
},
"activeParameterSupport": true
},
"dynamicRegistration": true
},
"documentLink": {
"dynamicRegistration": true,
"tooltipSupport": true
},
"hover": {
"contentFormat": [
"markdown",
"plaintext"
],
"dynamicRegistration": true
},
"foldingRange": {
"dynamicRegistration": true
},
"selectionRange": {
"dynamicRegistration": true
},
"callHierarchy": {
"dynamicRegistration": false
},
"typeHierarchy": {
"dynamicRegistration": true
},
"publishDiagnostics": {
"relatedInformation": true,
"tagSupport": {
"valueSet": [
1,
2
]
},
"versionSupport": true
},
"diagnostic": {
"dynamicRegistration": false,
"relatedDocumentSupport": false
},
"linkedEditingRange": {
"dynamicRegistration": true
},
"inlineCompletion": null
},
"window": {
"workDoneProgress": true,
"showDocument": {
"support": true
}
}
},
"initializationOptions": null,
"workDoneToken": "1"
}
[Trace - 10:07:35 ] Received response 'initialize - (3)' in 869ms.
Result: {
"capabilities": {
"codeActionProvider": {
"codeActionKinds": [
"quickfix"
]
},
"completionProvider": {
"triggerCharacters": [
"."
]
},
"declarationProvider": true,
"definitionProvider": true,
"diagnosticProvider": {
"identifier": "ty",
"interFileDependencies": true,
"workDoneProgress": true,
"workspaceDiagnostics": true
},
"documentHighlightProvider": true,
"documentSymbolProvider": true,
"executeCommandProvider": {
"commands": [
"ty.printDebugInformation"
],
"workDoneProgress": null
},
"hoverProvider": true,
"inlayHintProvider": {},
"notebookDocumentSync": {
"notebookSelector": [
{
"cells": [
{
"language": "python"
}
]
}
],
"save": null
},
"positionEncoding": "utf-32",
"referencesProvider": true,
"renameProvider": {
"prepareProvider": true
},
"selectionRangeProvider": true,
"semanticTokensProvider": {
"full": true,
"legend": {
"tokenModifiers": [
"definition",
"readonly",
"async",
"documentation"
],
"tokenTypes": [
"namespace",
"class",
"parameter",
"selfParameter",
"clsParameter",
"variable",
"property",
"function",
"method",
"keyword",
"string",
"number",
"decorator",
"builtinConstant",
"typeParameter"
]
},
"range": true
},
"signatureHelpProvider": {
"retriggerCharacters": [
")"
],
"triggerCharacters": [
"(",
","
]
},
"textDocumentSync": {
"change": 2,
"openClose": true
},
"typeDefinitionProvider": true,
"workspaceSymbolProvider": true
},
"serverInfo": {
"name": "ty",
"version": "0.0.14"
}
}
[Trace - 10:07:35 ] Sending notification 'initialized'.
Params: {}
[Trace - 10:07:35 ] Sending notification 'textDocument/didOpen'.
Params: {
"textDocument": {
"uri": "file://...",
"languageId": "python",
"version": 0,
"text": "..."
}
}
[Trace - 10:07:35 ] Sending request 'textDocument/diagnostic - (18)'.
Params: {
"textDocument": {
"uri": "file://..."
}
}
[Trace - 10:07:35 ] Sending request 'textDocument/documentSymbol - (19)'.
Params: {
"textDocument": {
"uri": "file://..."
}
}
[Trace - 10:07:35 ] Sending request 'textDocument/codeAction - (20)'.
Params: {
"textDocument": {
"uri": "file://..."
},
"range": {
"start": {
"line": 0,
"character": 0
},
"end": {
"line": 0,
"character": 0
}
},
"context": {
"diagnostics": []
}
}
[Trace - 10:07:35 ] Sending request 'textDocument/documentHighlight - (21)'.
Params: {
"textDocument": {
"uri": "file://..."
},
"position": {
"line": 0,
"character": 0
}
}
[Trace - 10:07:35 ] Received request 'workspace/configuration - (0).
Params: {
"items": [
{
"scopeUri": "file://...",
"section": "ty"
}
]
}
[Trace - 10:07:35 ] Sending response 'workspace/configuration - (0)'. Processing request took 0ms
Params: {
"jsonrpc": "2.0",
"id": 0,
"result": [
{}
]
}
[Trace - 10:07:35 ] Received request 'client/registerCapability - (1).
Params: {
"registrations": [
{
"id": "ty/workspace/didChangeWatchedFiles",
"method": "workspace/didChangeWatchedFiles",
"registerOptions": {
"watchers": [
{
"globPattern": "**",
"kind": 7
}
]
}
}
]
}
[Trace - 10:07:35 ] Sending response 'client/registerCapability - (1)'. Processing request took 58ms
Params: {
"jsonrpc": "2.0",
"id": 1,
"result": null
}
[Trace - 10:07:35 ] Received response 'textDocument/codeAction - (20)' in 145ms.
Result: null
[Trace - 10:07:35 ] Received response 'textDocument/documentHighlight - (21)' in 143ms.
Result: null
[Trace - 10:07:35 ] Received response 'textDocument/documentSymbol - (19)' in 150ms.
Result: [
{
"children": [],
"kind": 12,
"name": "get_logger",
"range": {
"end": {
"character": 17,
"line": 19
},
"start": {
"character": 0,
"line": 8
}
},
"selectionRange": {
"end": {
"character": 14,
"line": 8
},
"start": {
"character": 4,
"line": 8
}
}
},
{
"children": [
{
"children": [],
"kind": 9,
"name": "__init__",
"range": {
"end": {
"character": 57,
"line": 60
},
"start": {
"character": 4,
"line": 23
}
},
"selectionRange": {
"end": {
"character": 16,
"line": 23
},
"start": {
"character": 8,
"line": 23
}
}
}
],
"kind": 5,
"name": "APIBase",
"range": {
"end": {
"character": 57,
"line": 60
},
"start": {
"character": 0,
"line": 22
}
},
"selectionRange": {
"end": {
"character": 13,
"line": 22
},
"start": {
"character": 6,
"line": 22
}
}
}
]
[Trace - 10:07:35 ] Received response 'textDocument/diagnostic - (18)' in 281ms.
Result: {
"items": [],
"kind": "full"
}
[Trace - 10:07:40 ] Sending request 'textDocument/hover - (25)'.
Params: {
"textDocument": {
"uri": "file://..."
},
"position": {
"line": 0,
"character": 0
}
}
[Trace - 10:07:41 ] Received response 'textDocument/hover - (25)' in 225ms.
Result: null
[Trace - 10:07:51 ] Sending request 'textDocument/hover - (26)'.
Params: {
"textDocument": {
"uri": "file://..."
},
"position": {
"line": 0,
"character": 0
}
}
[Trace - 10:07:51 ] Received response 'textDocument/hover - (26)' in 212ms.
Result: null
[Trace - 10:09:00 ] Sending notification 'textDocument/didChange'.
Params: {
"textDocument": {
"uri": "file://...",
"version": 1
},
"contentChanges": [
{
"range": {
"start": {
"line": 6,
"character": 0
},
"end": {
"line": 6,
"character": 0
}
},
"rangeLength": 0,
"text": "p"
}
]
}
[Trace - 10:09:00 ] Sending request 'textDocument/diagnostic - (28)'.
Params: {
"textDocument": {
"uri": "file://..."
}
}
[Trace - 10:09:00 ] Received response 'textDocument/diagnostic - (28)' in 117ms.
Result: {
"items": [
{
"code": "unresolved-reference",
"codeDescription": {
"href": "https://ty.dev/rules#unresolved-reference"
},
"data": null,
"message": "Name `p` used when not defined",
"range": {
"end": {
"character": 1,
"line": 6
},
"start": {
"character": 0,
"line": 6
}
},
"relatedInformation": [],
"severity": 1,
"source": "ty"
}
],
"kind": "full",
"resultId": "34e2383c2cd6f2e5"
}
[Trace - 10:09:00 ] Sending request 'textDocument/documentSymbol - (29)'.
Params: {
"textDocument": {
"uri": "file://..."
}
}
[Trace - 10:09:01 ] Sending request 'textDocument/documentSymbol - (31)'.
Params: {
"textDocument": {
"uri": "file://..."
}
}
[Trace - 10:09:01 ] Received response 'textDocument/documentSymbol - (29)' in 235ms.
Result: [
{
"children": [],
"kind": 12,
"name": "get_logger",
"range": {
"end": {
"character": 17,
"line": 19
},
"start": {
"character": 0,
"line": 8
}
},
"selectionRange": {
"end": {
"character": 14,
"line": 8
},
"start": {
"character": 4,
"line": 8
}
}
},
{
"children": [
{
"children": [],
"kind": 9,
"name": "__init__",
"range": {
"end": {
"character": 57,
"line": 60
},
"start": {
"character": 4,
"line": 23
}
},
"selectionRange": {
"end": {
"character": 16,
"line": 23
},
"start": {
"character": 8,
"line": 23
}
}
}
],
"kind": 5,
"name": "APIBase",
"range": {
"end": {
"character": 57,
"line": 60
},
"start": {
"character": 0,
"line": 22
}
},
"selectionRange": {
"end": {
"character": 13,
"line": 22
},
"start": {
"character": 6,
"line": 22
}
}
}
]
[Trace - 10:09:01 ] Received response 'textDocument/documentSymbol - (31)' in 17ms.
Result: [
{
"children": [],
"kind": 12,
"name": "get_logger",
"range": {
"end": {
"character": 17,
"line": 19
},
"start": {
"character": 0,
"line": 8
}
},
"selectionRange": {
"end": {
"character": 14,
"line": 8
},
"start": {
"character": 4,
"line": 8
}
}
},
{
"children": [
{
"children": [],
"kind": 9,
"name": "__init__",
"range": {
"end": {
"character": 57,
"line": 60
},
"start": {
"character": 4,
"line": 23
}
},
"selectionRange": {
"end": {
"character": 16,
"line": 23
},
"start": {
"character": 8,
"line": 23
}
}
}
],
"kind": 5,
"name": "APIBase",
"range": {
"end": {
"character": 57,
"line": 60
},
"start": {
"character": 0,
"line": 22
}
},
"selectionRange": {
"end": {
"character": 13,
"line": 22
},
"start": {
"character": 6,
"line": 22
}
}
}
]
[Trace - 10:09:01 ] Sending notification 'textDocument/didChange'.
Params: {
"textDocument": {
"uri": "file://...",
"version": 2
},
"contentChanges": [
{
"range": {
"start": {
"line": 6,
"character": 0
},
"end": {
"line": 6,
"character": 1
}
},
"rangeLength": 1,
"text": ""
}
]
}
[Trace - 10:09:01 ] Sending request 'textDocument/diagnostic - (33)'.
Params: {
"textDocument": {
"uri": "file://..."
}
}
[Trace - 10:09:01 ] Received response 'textDocument/diagnostic - (33)' in 81ms.
Result: {
"items": [],
"kind": "full"
}
[Trace - 10:09:02 ] Sending request 'textDocument/documentSymbol - (34)'.
Params: {
"textDocument": {
"uri": "file://..."
}
}
[Trace - 10:09:02 ] Sending request 'textDocument/documentSymbol - (36)'.
Params: {
"textDocument": {
"uri": "file://..."
}
}
[Trace - 10:09:02 ] Received response 'textDocument/documentSymbol - (34)' in 156ms.
Result: [
{
"children": [],
"kind": 12,
"name": "get_logger",
"range": {
"end": {
"character": 17,
"line": 19
},
"start": {
"character": 0,
"line": 8
}
},
"selectionRange": {
"end": {
"character": 14,
"line": 8
},
"start": {
"character": 4,
"line": 8
}
}
},
{
"children": [
{
"children": [],
"kind": 9,
"name": "__init__",
"range": {
"end": {
"character": 57,
"line": 60
},
"start": {
"character": 4,
"line": 23
}
},
"selectionRange": {
"end": {
"character": 16,
"line": 23
},
"start": {
"character": 8,
"line": 23
}
}
}
],
"kind": 5,
"name": "APIBase",
"range": {
"end": {
"character": 57,
"line": 60
},
"start": {
"character": 0,
"line": 22
}
},
"selectionRange": {
"end": {
"character": 13,
"line": 22
},
"start": {
"character": 6,
"line": 22
}
}
}
]
[Trace - 10:09:02 ] Received response 'textDocument/documentSymbol - (36)' in 16ms.
Result: [
{
"children": [],
"kind": 12,
"name": "get_logger",
"range": {
"end": {
"character": 17,
"line": 19
},
"start": {
"character": 0,
"line": 8
}
},
"selectionRange": {
"end": {
"character": 14,
"line": 8
},
"start": {
"character": 4,
"line": 8
}
}
},
{
"children": [
{
"children": [],
"kind": 9,
"name": "__init__",
"range": {
"end": {
"character": 57,
"line": 60
},
"start": {
"character": 4,
"line": 23
}
},
"selectionRange": {
"end": {
"character": 16,
"line": 23
},
"start": {
"character": 8,
"line": 23
}
}
}
],
"kind": 5,
"name": "APIBase",
"range": {
"end": {
"character": 57,
"line": 60
},
"start": {
"character": 0,
"line": 22
}
},
"selectionRange": {
"end": {
"character": 13,
"line": 22
},
"start": {
"character": 6,
"line": 22
}
}
}
]Anything else?
when using lsp-start-plain I got the following callstack
Debugger entered--Lisp error: (wrong-type-argument hash-table-p nil)
gethash("range" nil)
(let* ((symbol input0) (range (gethash "range" (gethash "location" symbol)))) (if (lsp-point-in-range? current-position range) (progn (lsp--symbol-information->document-symbol symbol))))
#f(lambda (input0) [(current-position #<hash-table equal 2/6 0x103366c70d9d ...>)] (let* ((symbol input0) (range (gethash "range" (gethash "location" symbol)))) (if (lsp-point-in-range? current-position range) (progn (lsp--symbol-information->document-symbol symbol)))))(#<hash-table equal 5/5 0x103366d2a0f7 ...>)
funcall(#f(lambda (input0) [(current-position #<hash-table equal 2/6 0x103366c70d9d ...>)] (let* ((symbol input0) (range (gethash "range" (gethash "location" symbol)))) (if (lsp-point-in-range? current-position range) (progn (lsp--symbol-information->document-symbol symbol))))) #<hash-table equal 5/5 0x103366d2a0f7 ...>)
(let ((mapped (funcall fn it))) (if mapped (progn (setq result (cons mapped result)))))
(let ((it (car-safe (prog1 list (setq list (cdr list))))) (it-index i)) (ignore it it-index) (let ((mapped (funcall fn it))) (if mapped (progn (setq result (cons mapped result))))))
(while list (let ((it (car-safe (prog1 list (setq list (cdr list))))) (it-index i)) (ignore it it-index) (let ((mapped (funcall fn it))) (if mapped (progn (setq result (cons mapped result)))))) (setq i (1+ i)))
(let ((list list) (i 0)) (while list (let ((it (car-safe (prog1 list (setq list ...)))) (it-index i)) (ignore it it-index) (let ((mapped (funcall fn it))) (if mapped (progn (setq result (cons mapped result)))))) (setq i (1+ i))))
(let (result) (let ((list list) (i 0)) (while list (let ((it (car-safe (prog1 list ...))) (it-index i)) (ignore it it-index) (let ((mapped (funcall fn it))) (if mapped (progn (setq result ...))))) (setq i (1+ i)))) (nreverse result))
-keep(#f(lambda (input0) [(current-position #<hash-table equal 2/6 0x103366c70d9d ...>)] (let* ((symbol input0) (range (gethash "range" (gethash "location" symbol)))) (if (lsp-point-in-range? current-position range) (progn (lsp--symbol-information->document-symbol symbol))))) (#<hash-table equal 4/4 0x103366c5a958 ...> #<hash-table equal 4/4 0x103366c5a927 ...> #<hash-table equal 4/4 0x103366c5a9a7 ...> #<hash-table equal 4/4 0x103366c5aaa6 ...> #<hash-table equal 4/4 0x103366c5aa26 ...> #<hash-table equal 4/4 0x103366c5aa59 ...> #<hash-table equal 4/4 0x103366c5abf5 ...> #<hash-table equal 4/4 0x103366c5ab70 ...> #<hash-table equal 4/4 0x103366c56d6e ...> #<hash-table equal 4/4 0x103366c56d1e ...> #<hash-table equal 4/4 0x103366c56b51 ...> #<hash-table equal 4/4 0x103366c56bbd ...> #<hash-table equal 4/4 0x103366c56bc8 ...> #<hash-table equal 4/4 0x103366c56a1c ...> #<hash-table equal 4/4 0x103366c56ac3 ...> #<hash-table equal 4/4 0x103366c04ff2 ...> #<hash-table equal 4/4 0x103366c04f72 ...> #<hash-table equal 4/4 0x103366c04f0d ...> #<hash-table equal 4/4 0x103366c04959 ...> #<hash-table equal 4/4 0x103366c0498c ...> #<hash-table equal 4/4 0x103366c049c0 ...> #<hash-table equal 4/4 0x103366f1b368 ...> #<hash-table equal 4/4 0x103366f1b2f7 ...> #<hash-table equal 4/4 0x103366f1b277 ...> #<hash-table equal 5/5 0x103366d2a0f7 ...> #<hash-table equal 5/5 0x103366c5bed4 ...>))
(let ((it (-keep #'(lambda (input0) (let* (... ...) (if ... ...))) it))) (sort it #'(lambda (input0 input1) (let* ((--dash-source-147-- (gethash "range" input0)) (a-start-position (gethash "start" --dash-source-147--)) (a-end-position (gethash "end" --dash-source-147--)) (--dash-source-149-- (gethash "range" input1)) (b-start-position (gethash "start" --dash-source-149--)) (b-end-position (gethash "end" --dash-source-149--))) (and (lsp--position-compare b-start-position a-start-position) (lsp--position-compare a-end-position b-end-position))))))
(let ((it symbols-informations)) (let ((it (-keep #'(lambda (input0) (let* ... ...)) it))) (sort it #'(lambda (input0 input1) (let* ((--dash-source-147-- ...) (a-start-position ...) (a-end-position ...) (--dash-source-149-- ...) (b-start-position ...) (b-end-position ...)) (and (lsp--position-compare b-start-position a-start-position) (lsp--position-compare a-end-position b-end-position)))))))
lsp--symbols-informations->document-symbols-hierarchy((#<hash-table equal 4/4 0x103366c5a958 ...> #<hash-table equal 4/4 0x103366c5a927 ...> #<hash-table equal 4/4 0x103366c5a9a7 ...> #<hash-table equal 4/4 0x103366c5aaa6 ...> #<hash-table equal 4/4 0x103366c5aa26 ...> #<hash-table equal 4/4 0x103366c5aa59 ...> #<hash-table equal 4/4 0x103366c5abf5 ...> #<hash-table equal 4/4 0x103366c5ab70 ...> #<hash-table equal 4/4 0x103366c56d6e ...> #<hash-table equal 4/4 0x103366c56d1e ...> #<hash-table equal 4/4 0x103366c56b51 ...> #<hash-table equal 4/4 0x103366c56bbd ...> #<hash-table equal 4/4 0x103366c56bc8 ...> #<hash-table equal 4/4 0x103366c56a1c ...> #<hash-table equal 4/4 0x103366c56ac3 ...> #<hash-table equal 4/4 0x103366c04ff2 ...> #<hash-table equal 4/4 0x103366c04f72 ...> #<hash-table equal 4/4 0x103366c04f0d ...> #<hash-table equal 4/4 0x103366c04959 ...> #<hash-table equal 4/4 0x103366c0498c ...> #<hash-table equal 4/4 0x103366c049c0 ...> #<hash-table equal 4/4 0x103366f1b368 ...> #<hash-table equal 4/4 0x103366f1b2f7 ...> #<hash-table equal 4/4 0x103366f1b277 ...> #<hash-table equal 5/5 0x103366d2a0f7 ...> #<hash-table equal 5/5 0x103366c5bed4 ...>) #<hash-table equal 2/6 0x103366c70d9d ...>)
(if (lsp-symbol-information? first-symbol) (lsp--symbols-informations->document-symbols-hierarchy symbols cur-position) (lsp--document-symbols->document-symbols-hierarchy symbols cur-position))
(let ((cur-position (lsp-make-position :line (plist-get (lsp--cur-position) :line) :character (plist-get (lsp--cur-position) :character)))) (if (lsp-symbol-information? first-symbol) (lsp--symbols-informations->document-symbols-hierarchy symbols cur-position) (lsp--document-symbols->document-symbols-hierarchy symbols cur-position)))
(if first-symbol (let ((cur-position (lsp-make-position :line (plist-get (lsp--cur-position) :line) :character (plist-get (lsp--cur-position) :character)))) (if (lsp-symbol-information? first-symbol) (lsp--symbols-informations->document-symbols-hierarchy symbols cur-position) (lsp--document-symbols->document-symbols-hierarchy symbols cur-position))))
(let* ((first-symbol (and t (lsp-seq-first symbols)))) (if first-symbol (let ((cur-position (lsp-make-position :line (plist-get (lsp--cur-position) :line) :character (plist-get (lsp--cur-position) :character)))) (if (lsp-symbol-information? first-symbol) (lsp--symbols-informations->document-symbols-hierarchy symbols cur-position) (lsp--document-symbols->document-symbols-hierarchy symbols cur-position)))))
lsp--symbols->document-symbols-hierarchy((#<hash-table equal 4/4 0x103366c5a958 ...> #<hash-table equal 4/4 0x103366c5a927 ...> #<hash-table equal 4/4 0x103366c5a9a7 ...> #<hash-table equal 4/4 0x103366c5aaa6 ...> #<hash-table equal 4/4 0x103366c5aa26 ...> #<hash-table equal 4/4 0x103366c5aa59 ...> #<hash-table equal 4/4 0x103366c5abf5 ...> #<hash-table equal 4/4 0x103366c5ab70 ...> #<hash-table equal 4/4 0x103366c56d6e ...> #<hash-table equal 4/4 0x103366c56d1e ...> #<hash-table equal 4/4 0x103366c56b51 ...> #<hash-table equal 4/4 0x103366c56bbd ...> #<hash-table equal 4/4 0x103366c56bc8 ...> #<hash-table equal 4/4 0x103366c56a1c ...> #<hash-table equal 4/4 0x103366c56ac3 ...> #<hash-table equal 4/4 0x103366c04ff2 ...> #<hash-table equal 4/4 0x103366c04f72 ...> #<hash-table equal 4/4 0x103366c04f0d ...> #<hash-table equal 4/4 0x103366c04959 ...> #<hash-table equal 4/4 0x103366c0498c ...> #<hash-table equal 4/4 0x103366c049c0 ...> #<hash-table equal 4/4 0x103366f1b368 ...> #<hash-table equal 4/4 0x103366f1b2f7 ...> #<hash-table equal 4/4 0x103366f1b277 ...> #<hash-table equal 5/5 0x103366d2a0f7 ...> #<hash-table equal 5/5 0x103366c5bed4 ...>))
(let ((symbols-hierarchy (lsp--symbols->document-symbols-hierarchy symbols))) (if symbols-hierarchy (let ((enumerated-symbols-hierarchy (-map-indexed #'(lambda ... ...) symbols-hierarchy))) (if enumerated-symbols-hierarchy (mapconcat #'(lambda (input0) (let* ... ...)) enumerated-symbols-hierarchy (concat " " (lsp-headerline--arrow-icon) " ")) "")) ""))
(if symbols (let ((symbols-hierarchy (lsp--symbols->document-symbols-hierarchy symbols))) (if symbols-hierarchy (let ((enumerated-symbols-hierarchy (-map-indexed #'... symbols-hierarchy))) (if enumerated-symbols-hierarchy (mapconcat #'(lambda ... ...) enumerated-symbols-hierarchy (concat " " (lsp-headerline--arrow-icon) " ")) "")) "")) "")
(let ((symbols (lsp--get-document-symbols))) (if symbols (let ((symbols-hierarchy (lsp--symbols->document-symbols-hierarchy symbols))) (if symbols-hierarchy (let ((enumerated-symbols-hierarchy (-map-indexed ... symbols-hierarchy))) (if enumerated-symbols-hierarchy (mapconcat #'... enumerated-symbols-hierarchy (concat " " ... " ")) "")) "")) ""))
(if lsp--document-symbols-request-async (let ((symbols (lsp--get-document-symbols))) (if symbols (let ((symbols-hierarchy (lsp--symbols->document-symbols-hierarchy symbols))) (if symbols-hierarchy (let ((enumerated-symbols-hierarchy ...)) (if enumerated-symbols-hierarchy (mapconcat ... enumerated-symbols-hierarchy ...) "")) "")) "")) "")
(let ((lsp--document-symbols-request-async t)) (if lsp--document-symbols-request-async (let ((symbols (lsp--get-document-symbols))) (if symbols (let ((symbols-hierarchy (lsp--symbols->document-symbols-hierarchy symbols))) (if symbols-hierarchy (let (...) (if enumerated-symbols-hierarchy ... "")) "")) "")) ""))
(if (lsp-feature? "textDocument/documentSymbol") (let ((lsp--document-symbols-request-async t)) (if lsp--document-symbols-request-async (let ((symbols (lsp--get-document-symbols))) (if symbols (let ((symbols-hierarchy ...)) (if symbols-hierarchy (let ... ...) "")) "")) "")) "")
lsp-headerline--build-symbol-string()
(let nil (lsp-headerline--build-symbol-string))
(cond ((eq segment 'project) (let nil (lsp-headerline--build-project-string))) ((eq segment 'file) (let nil (lsp-headerline--build-file-string))) ((eq segment 'path-up-to-project) (let nil (lsp-headerline--build-path-up-to-project-string))) ((eq segment 'symbols) (let nil (lsp-headerline--build-symbol-string))) (t (let nil (lsp-log "'%s' is not a valid entry for `lsp-headerline-breadcrumb-segments'" (symbol-name segment)) "")))
(let ((segment-string (cond ((eq segment 'project) (let nil (lsp-headerline--build-project-string))) ((eq segment 'file) (let nil (lsp-headerline--build-file-string))) ((eq segment 'path-up-to-project) (let nil (lsp-headerline--build-path-up-to-project-string))) ((eq segment 'symbols) (let nil (lsp-headerline--build-symbol-string))) (t (let nil (lsp-log "'%s' is not a valid entry for `lsp-headerline-breadcrumb-segments'" (symbol-name segment)) ""))))) (if (string-empty-p segment-string) "" (concat (lsp-headerline--arrow-icon) " " segment-string " ")))
#f(lambda (segment) [all-the-icons-scale-factor all-the-icons-default-adjust t] (let ((segment-string (cond ((eq segment 'project) (let nil (lsp-headerline--build-project-string))) ((eq segment 'file) (let nil (lsp-headerline--build-file-string))) ((eq segment 'path-up-to-project) (let nil (lsp-headerline--build-path-up-to-project-string))) ((eq segment 'symbols) (let nil (lsp-headerline--build-symbol-string))) (t (let nil (lsp-log "'%s' is not a valid entry for `lsp-headerline-breadcrumb-segments'" (symbol-name segment)) ""))))) (if (string-empty-p segment-string) "" (concat (lsp-headerline--arrow-icon) " " segment-string " "))))(symbols)
mapconcat(#f(lambda (segment) [all-the-icons-scale-factor all-the-icons-default-adjust t] (let ((segment-string (cond ((eq segment ...) (let nil ...)) ((eq segment ...) (let nil ...)) ((eq segment ...) (let nil ...)) ((eq segment ...) (let nil ...)) (t (let nil ... ""))))) (if (string-empty-p segment-string) "" (concat (lsp-headerline--arrow-icon) " " segment-string " ")))) (path-up-to-project file symbols) "")
(string-trim-right (mapconcat #'(lambda (segment) (let ((segment-string (cond ... ... ... ... ...))) (if (string-empty-p segment-string) "" (concat (lsp-headerline--arrow-icon) " " segment-string " ")))) lsp-headerline-breadcrumb-segments ""))
lsp-headerline--build-string()
(set-window-parameter (selected-window) 'lsp-headerline--string (lsp-headerline--build-string))
lsp-headerline-check-breadcrumb()
run-hooks(lsp-on-idle-hook)
(progn (run-hooks 'lsp-on-idle-hook))
(if (and (buffer-live-p buffer) (equal buffer (current-buffer)) (not lsp-inhibit-lsp-hooks) lsp-managed-mode) (progn (run-hooks 'lsp-on-idle-hook)))
lsp--on-idle(#<buffer api_base.py>)
apply(lsp--on-idle #<buffer api_base.py>)
timer-event-handler([t 0 0 500000 nil lsp--on-idle (#<buffer api_base.py>) idle 0 nil])
Reactions are currently unavailable