Skip to content

Instantly share code, notes, and snippets.

@Eason0210
Created June 17, 2023 13:11
Show Gist options
  • Save Eason0210/129e9978253c6bc2e4f59d576e6cb0d0 to your computer and use it in GitHub Desktop.
Save Eason0210/129e9978253c6bc2e4f59d576e6cb0d0 to your computer and use it in GitHub Desktop.
Eglot events with pyright
[internal] Sat Jun 17 21:04:15 2023:
(:message "Running language server: /Users/aqua0210/.nvm/versions/node/v19.6.0/bin/pyright-langserver --stdio")
[client-request] (id:1) Sat Jun 17 21:04:15 2023:
(:jsonrpc "2.0" :id 1 :method "initialize" :params
(:processId 79724 :rootPath "/Users/aqua0210/Code/Python/django-project/" :rootUri "file:///Users/aqua0210/Code/Python/django-project" :initializationOptions #s(hash-table size 1 test eql rehash-size 1.5 rehash-threshold 0.8125 data
())
:capabilities
(:workspace
(:applyEdit t :executeCommand
(:dynamicRegistration :json-false)
:workspaceEdit
(:documentChanges t)
:didChangeWatchedFiles
(:dynamicRegistration t)
:symbol
(:dynamicRegistration :json-false)
:configuration t :workspaceFolders t)
:textDocument
(:synchronization
(:dynamicRegistration :json-false :willSave t :willSaveWaitUntil t :didSave t)
:completion
(:dynamicRegistration :json-false :completionItem
(:snippetSupport t :deprecatedSupport t :resolveSupport
(:properties
["documentation" "details" "additionalTextEdits"])
:tagSupport
(:valueSet
[1]))
:contextSupport t)
:hover
(:dynamicRegistration :json-false :contentFormat
["markdown" "plaintext"])
:signatureHelp
(:dynamicRegistration :json-false :signatureInformation
(:parameterInformation
(:labelOffsetSupport t)
:activeParameterSupport t))
:references
(:dynamicRegistration :json-false)
:definition
(:dynamicRegistration :json-false :linkSupport t)
:declaration
(:dynamicRegistration :json-false :linkSupport t)
:implementation
(:dynamicRegistration :json-false :linkSupport t)
:typeDefinition
(:dynamicRegistration :json-false :linkSupport t)
:documentSymbol
(:dynamicRegistration :json-false :hierarchicalDocumentSymbolSupport t :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]))
:documentHighlight
(:dynamicRegistration :json-false)
:codeAction
(:dynamicRegistration :json-false :codeActionLiteralSupport
(:codeActionKind
(:valueSet
["quickfix" "refactor" "refactor.extract" "refactor.inline" "refactor.rewrite" "source" "source.organizeImports"]))
:isPreferredSupport t)
:formatting
(:dynamicRegistration :json-false)
:rangeFormatting
(:dynamicRegistration :json-false)
:rename
(:dynamicRegistration :json-false)
:inlayHint
(:dynamicRegistration :json-false)
:publishDiagnostics
(:relatedInformation :json-false :codeDescriptionSupport :json-false :tagSupport
(:valueSet
[1 2])))
:window
(:workDoneProgress t)
:general
(:positionEncodings
["utf-32" "utf-8" "utf-16"])
:experimental #s(hash-table size 1 test eql rehash-size 1.5 rehash-threshold 0.8125 data
()))
:workspaceFolders
[(:uri "file:///Users/aqua0210/Code/Python/django-project" :name "~/Code/Python/django-project/")]))
[server-notification] Sat Jun 17 21:04:15 2023:
(:jsonrpc "2.0" :method "window/logMessage" :params
(:type 3 :message "Pyright language server 1.1.314 starting"))
[server-notification] Sat Jun 17 21:04:15 2023:
(:jsonrpc "2.0" :method "window/logMessage" :params
(:type 3 :message "Server root directory: /Users/aqua0210/.nvm/versions/node/v19.6.0/lib/node_modules/pyright/dist/"))
[server-notification] Sat Jun 17 21:04:15 2023:
(:jsonrpc "2.0" :method "window/logMessage" :params
(:type 3 :message "Starting service instance \"~/Code/Python/django-project/\""))
[server-reply] (id:1) Sat Jun 17 21:04:15 2023:
(:jsonrpc "2.0" :id 1 :result
(:capabilities
(:textDocumentSync 2 :definitionProvider
(:workDoneProgress t)
:declarationProvider
(:workDoneProgress t)
:typeDefinitionProvider
(:workDoneProgress t)
:referencesProvider
(:workDoneProgress t)
:documentSymbolProvider
(:workDoneProgress t)
:workspaceSymbolProvider
(:workDoneProgress t)
:hoverProvider
(:workDoneProgress t)
:documentHighlightProvider
(:workDoneProgress t)
:renameProvider
(:prepareProvider t :workDoneProgress t)
:completionProvider
(:triggerCharacters
["." "[" "\"" "'"]
:resolveProvider t :workDoneProgress t :completionItem
(:labelDetailsSupport t))
:signatureHelpProvider
(:triggerCharacters
["(" "," ")"]
:workDoneProgress t)
:codeActionProvider
(:codeActionKinds
["quickfix" "source.organizeImports"]
:workDoneProgress t)
:executeCommandProvider
(:commands
[]
:workDoneProgress t)
:callHierarchyProvider t :workspace
(:workspaceFolders
(:supported t :changeNotifications t)))))
[client-notification] Sat Jun 17 21:04:15 2023:
(:jsonrpc "2.0" :method "initialized" :params #s(hash-table size 1 test eql rehash-size 1.5 rehash-threshold 0.8125 data
()))
[client-notification] Sat Jun 17 21:04:15 2023:
(:jsonrpc "2.0" :method "textDocument/didOpen" :params
(:textDocument
(:uri "file:///Users/aqua0210/Code/Python/django-project/core/models.py" :version 0 :languageId "python-ts" :text "from django.db import mod\n")))
[client-notification] Sat Jun 17 21:04:15 2023:
(:jsonrpc "2.0" :method "workspace/didChangeConfiguration" :params
(:settings
(:pyright-langserver
(:include
["CoreRoot" "core"]
:exclude
["**/__pycache__"]
:venvPath "." :venv ".venv" :reportTypeshedErrors :json-false :reportMissingImports t :reportMissingTypeStubs :json-false))))
[server-request] (id:0) Sat Jun 17 21:04:15 2023:
(:jsonrpc "2.0" :id 0 :method "client/registerCapability" :params
(:registrations
[(:id "14a2646c-fef1-40b5-a7a7-0f26cd6a9133" :method "workspace/didChangeWatchedFiles" :registerOptions
(:watchers
[(:globPattern "**/pyrightconfig.json" :kind 7)
(:globPattern "**" :kind 7)]))]))
[client-reply] (id:0) Sat Jun 17 21:04:15 2023:
(:jsonrpc "2.0" :id 0 :result nil)
[server-request] (id:1) Sat Jun 17 21:04:15 2023:
(:jsonrpc "2.0" :id 1 :method "workspace/configuration" :params
(:items
[(:scopeUri "file:///Users/aqua0210/Code/Python/django-project" :section "python")]))
[client-reply] (id:1) Sat Jun 17 21:04:15 2023:
(:jsonrpc "2.0" :id 1 :result
[nil])
[server-request] (id:2) Sat Jun 17 21:04:15 2023:
(:jsonrpc "2.0" :id 2 :method "workspace/configuration" :params
(:items
[(:scopeUri "file:///Users/aqua0210/Code/Python/django-project" :section "python.analysis")]))
[client-reply] (id:2) Sat Jun 17 21:04:15 2023:
(:jsonrpc "2.0" :id 2 :result
[nil])
[server-request] (id:3) Sat Jun 17 21:04:15 2023:
(:jsonrpc "2.0" :id 3 :method "workspace/configuration" :params
(:items
[(:scopeUri "file:///Users/aqua0210/Code/Python/django-project" :section "pyright")]))
[client-reply] (id:3) Sat Jun 17 21:04:15 2023:
(:jsonrpc "2.0" :id 3 :result
[nil])
[server-notification] Sat Jun 17 21:04:15 2023:
(:jsonrpc "2.0" :method "window/logMessage" :params
(:type 3 :message "Loading configuration file at /Users/aqua0210/Code/Python/django-project/pyrightconfig.json"))
[server-notification] Sat Jun 17 21:04:15 2023:
(:jsonrpc "2.0" :method "window/logMessage" :params
(:type 3 :message "Assuming Python version 3.11"))
[server-notification] Sat Jun 17 21:04:15 2023:
(:jsonrpc "2.0" :method "window/logMessage" :params
(:type 3 :message "Found 12 source files"))
[server-request] (id:4) Sat Jun 17 21:04:15 2023:
(:jsonrpc "2.0" :id 4 :method "client/registerCapability" :params
(:registrations
[(:id "2703f4eb-c06f-4c6d-81a2-6eb2e1177465" :method "workspace/didChangeWatchedFiles" :registerOptions
(:watchers
[(:globPattern "**/pyrightconfig.json" :kind 7)
(:globPattern "**" :kind 7)]))]))
[client-reply] (id:4) Sat Jun 17 21:04:15 2023:
(:jsonrpc "2.0" :id 4 :result nil)
[server-request] (id:5) Sat Jun 17 21:04:15 2023:
(:jsonrpc "2.0" :id 5 :method "client/unregisterCapability" :params
(:unregisterations
[(:id "14a2646c-fef1-40b5-a7a7-0f26cd6a9133" :method "workspace/didChangeWatchedFiles")]))
[client-reply] (id:5) Sat Jun 17 21:04:15 2023:
(:jsonrpc "2.0" :id 5 :result nil)
[server-notification] Sat Jun 17 21:04:15 2023:
(:jsonrpc "2.0" :method "textDocument/publishDiagnostics" :params
(:uri "file:///Users/aqua0210/Code/Python/django-project/core/models.py" :version 0 :diagnostics
[(:range
(:start
(:line 0 :character 22)
:end
(:line 0 :character 25))
:message "\"mod\" is not accessed" :severity 4 :source "Pyright" :tags
[1])]))
[client-notification] Sat Jun 17 21:04:19 2023:
(:jsonrpc "2.0" :method "textDocument/didChange" :params
(:textDocument
(:uri "file:///Users/aqua0210/Code/Python/django-project/core/models.py" :version 4)
:contentChanges
[(:range
(:start
(:line 0 :character 24)
:end
(:line 0 :character 25))
:rangeLength 1 :text "")
(:range
(:start
(:line 0 :character 23)
:end
(:line 0 :character 24))
:rangeLength 1 :text "")
(:range
(:start
(:line 0 :character 22)
:end
(:line 0 :character 23))
:rangeLength 1 :text "")
(:range
(:start
(:line 0 :character 22)
:end
(:line 0 :character 22))
:rangeLength 0 :text "m")]))
[client-request] (id:2) Sat Jun 17 21:04:19 2023:
(:jsonrpc "2.0" :id 2 :method "textDocument/completion" :params
(:textDocument
(:uri "file:///Users/aqua0210/Code/Python/django-project/core/models.py")
:position
(:line 0 :character 23)
:context
(:triggerKind 1)))
[server-reply] (id:2) Sat Jun 17 21:04:19 2023:
(:jsonrpc "2.0" :id 2 :result
(:items
[]
:isIncomplete t))
[server-notification] Sat Jun 17 21:04:19 2023:
(:jsonrpc "2.0" :method "textDocument/publishDiagnostics" :params
(:uri "file:///Users/aqua0210/Code/Python/django-project/core/models.py" :version 4 :diagnostics
[(:range
(:start
(:line 0 :character 22)
:end
(:line 0 :character 23))
:message "\"m\" is not accessed" :severity 4 :source "Pyright" :tags
[1])]))
[client-notification] Sat Jun 17 21:04:19 2023:
(:jsonrpc "2.0" :method "textDocument/didChange" :params
(:textDocument
(:uri "file:///Users/aqua0210/Code/Python/django-project/core/models.py" :version 5)
:contentChanges
[(:range
(:start
(:line 0 :character 23)
:end
(:line 0 :character 23))
:rangeLength 0 :text "o")]))
[client-request] (id:3) Sat Jun 17 21:04:19 2023:
(:jsonrpc "2.0" :id 3 :method "textDocument/completion" :params
(:textDocument
(:uri "file:///Users/aqua0210/Code/Python/django-project/core/models.py")
:position
(:line 0 :character 24)
:context
(:triggerKind 1)))
[server-reply] (id:3) Sat Jun 17 21:04:19 2023:
(:jsonrpc "2.0" :id 3 :result
(:items
[]
:isIncomplete t))
[client-notification] Sat Jun 17 21:04:20 2023:
(:jsonrpc "2.0" :method "textDocument/didChange" :params
(:textDocument
(:uri "file:///Users/aqua0210/Code/Python/django-project/core/models.py" :version 6)
:contentChanges
[(:range
(:start
(:line 0 :character 24)
:end
(:line 0 :character 24))
:rangeLength 0 :text "d")]))
[client-request] (id:4) Sat Jun 17 21:04:20 2023:
(:jsonrpc "2.0" :id 4 :method "textDocument/completion" :params
(:textDocument
(:uri "file:///Users/aqua0210/Code/Python/django-project/core/models.py")
:position
(:line 0 :character 25)
:context
(:triggerKind 1)))
[server-reply] (id:4) Sat Jun 17 21:04:20 2023:
(:jsonrpc "2.0" :id 4 :result
(:items
[]
:isIncomplete t))
[server-notification] Sat Jun 17 21:04:20 2023:
(:jsonrpc "2.0" :method "textDocument/publishDiagnostics" :params
(:uri "file:///Users/aqua0210/Code/Python/django-project/core/models.py" :version 6 :diagnostics
[(:range
(:start
(:line 0 :character 22)
:end
(:line 0 :character 25))
:message "\"mod\" is not accessed" :severity 4 :source "Pyright" :tags
[1])]))
[client-notification] Sat Jun 17 21:04:20 2023:
(:jsonrpc "2.0" :method "textDocument/didChange" :params
(:textDocument
(:uri "file:///Users/aqua0210/Code/Python/django-project/core/models.py" :version 7)
:contentChanges
[(:range
(:start
(:line 0 :character 25)
:end
(:line 0 :character 25))
:rangeLength 0 :text "e")]))
[client-request] (id:5) Sat Jun 17 21:04:20 2023:
(:jsonrpc "2.0" :id 5 :method "textDocument/completion" :params
(:textDocument
(:uri "file:///Users/aqua0210/Code/Python/django-project/core/models.py")
:position
(:line 0 :character 26)
:context
(:triggerKind 1)))
[server-reply] (id:5) Sat Jun 17 21:04:20 2023:
(:jsonrpc "2.0" :id 5 :result
(:items
[]
:isIncomplete t))
[server-notification] Sat Jun 17 21:04:21 2023:
(:jsonrpc "2.0" :method "textDocument/publishDiagnostics" :params
(:uri "file:///Users/aqua0210/Code/Python/django-project/core/models.py" :version 7 :diagnostics
[(:range
(:start
(:line 0 :character 22)
:end
(:line 0 :character 26))
:message "\"mode\" is not accessed" :severity 4 :source "Pyright" :tags
[1])]))
[client-request] (id:6) Sat Jun 17 21:04:23 2023:
(:jsonrpc "2.0" :id 6 :method "textDocument/completion" :params
(:textDocument
(:uri "file:///Users/aqua0210/Code/Python/django-project/core/models.py")
:position
(:line 0 :character 26)
:context
(:triggerKind 1)))
[server-reply] (id:6) Sat Jun 17 21:04:23 2023:
(:jsonrpc "2.0" :id 6 :result
(:items
[]
:isIncomplete t))
[client-request] (id:7) Sat Jun 17 21:04:25 2023:
(:jsonrpc "2.0" :id 7 :method "textDocument/documentSymbol" :params
(:textDocument
(:uri "file:///Users/aqua0210/Code/Python/django-project/core/models.py")))
[server-reply] (id:7) Sat Jun 17 21:04:25 2023:
(:jsonrpc "2.0" :id 7 :result
[])
[client-request] (id:8) Sat Jun 17 21:05:10 2023:
(:jsonrpc "2.0" :id 8 :method "textDocument/signatureHelp" :params
(:textDocument
(:uri "file:///Users/aqua0210/Code/Python/django-project/core/models.py")
:position
(:line 0 :character 26)))
[client-request] (id:9) Sat Jun 17 21:05:10 2023:
(:jsonrpc "2.0" :id 9 :method "textDocument/hover" :params
(:textDocument
(:uri "file:///Users/aqua0210/Code/Python/django-project/core/models.py")
:position
(:line 0 :character 26)))
[client-request] (id:10) Sat Jun 17 21:05:10 2023:
(:jsonrpc "2.0" :id 10 :method "textDocument/documentHighlight" :params
(:textDocument
(:uri "file:///Users/aqua0210/Code/Python/django-project/core/models.py")
:position
(:line 0 :character 26)))
[server-reply] (id:8) Sat Jun 17 21:05:10 2023:
(:jsonrpc "2.0" :id 8 :result nil)
[server-reply] (id:9) Sat Jun 17 21:05:10 2023:
(:jsonrpc "2.0" :id 9 :result
(:contents
(:kind "markdown" :value "```python\n(import) mode: Unknown\n```")
:range
(:start
(:line 0 :character 22)
:end
(:line 0 :character 26))))
[server-reply] (id:10) Sat Jun 17 21:05:10 2023:
(:jsonrpc "2.0" :id 10 :result
[(:kind 3 :range
(:start
(:line 0 :character 22)
:end
(:line 0 :character 26)))])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment