Pure-D / serve-d

D LSP server (dlang language server protocol server)
MIT License
208 stars 50 forks source link

serve-d seems not to work with emacs / eglot #329

Closed gizmomogwai closed 1 year ago

gizmomogwai commented 1 year ago

Emacs staring with version 29, will finally feature a lsp client called eglot. I wanted to try, how the current serve-d behaves with that. Seems not to work at the moment. Steps I took (on os x with a M1 macbook, Ventura 13.4.1):

this yields in the emacs logs:

[eglot] Connected! Server `serve-d' now managing `nil' buffers in project `27-tui

and then in the details eglot logs (which include the stderr output of serve-d:

[internal] Thu Jul 13 00:30:33 2023:
(:message "Running language server: /Users/christian.koestlin/Sync/projects/_d/external/serve-d/serve-d --logLevel=all")
[client-request] (id:1) Thu Jul 13 00:30:33 2023:
(:jsonrpc "2.0" :id 1 :method "initialize" :params
      (:processId 43501 :rootPath "/Users/christian.koestlin/Sync/projects/_d/active/27-tui/" :rootUri "file:///Users/christian.koestlin/Sync/projects/_d/active/27-tui" :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 :json-false :deprecatedSupport t :resolveSupport
                                   (:properties
                                ["documentation" "details" "additionalTextEdits"])
                                   :tagSupport
                                   (:valueSet
                                [1]))
                          :contextSupport t)
            :hover
            (:dynamicRegistration :json-false :contentFormat
                          ["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/christian.koestlin/Sync/projects/_d/active/27-tui" :name "~/Sync/projects/_d/active/27-tui/")]))
[stderr] 2023-07-13T00:30:33.817 [trace] app.d:162:main Features fulfilled
[stderr] serve-d standalone v0.8.0-beta.14
[stderr] Included features: "d", "workspaces"
[stderr] Built: Thu Jul 13 00:10:43 2023
[stderr] with compiler LDC v2.102 on osx aarch64
[stderr] dub, dfmt and dscanner are bundled within (compiled in)
[stderr] 2023-07-13T00:30:33.817 [trace] serverbase.d:461:run Started reading from stdin
[stderr] 2023-07-13T00:30:33.817 [trace] serverbase.d:465:run RPC started
[stderr] 2023-07-13T00:30:33.842 [trace] serverbase.d:122:processRequest Initializing
[stderr] 2023-07-13T00:30:33.842 [trace] extension.d:235:initialize initialize params:
[stderr] 2023-07-13T00:30:33.842 [trace] extension.d:236:initialize     processId: 43501
[stderr] 2023-07-13T00:30:33.842 [trace] extension.d:236:initialize     processId: 43501
[stderr] 2023-07-13T00:30:33.842 [trace] extension.d:236:initialize     rootPath?: /Users/christian.koestlin/Sync/projects/_d/active/27-tui/
[stderr] 2023-07-13T00:30:33.842 [trace] extension.d:236:initialize     rootUri: file:///Users/christian.koestlin/Sync/projects/_d/active/27-tui
[stderr] 2023-07-13T00:30:33.842 [trace] extension.d:236:initialize     initializationOptions?:
[stderr] 2023-07-13T00:30:33.842 [trace] extension.d:236:initialize         storage__: Storage__
[stderr] 2023-07-13T00:30:33.842 [trace] extension.d:236:initialize         identifier__: 6
[stderr] 2023-07-13T00:30:33.842 [trace] extension.d:236:initialize     capabilities:
[stderr] 2023-07-13T00:30:33.842 [trace] extension.d:236:initialize         workspace?:
[stderr] 2023-07-13T00:30:33.842 [trace] extension.d:236:initialize             applyEdit?: true
[stderr] 2023-07-13T00:30:33.842 [trace] extension.d:236:initialize             workspaceEdit?:
[stderr] 2023-07-13T00:30:33.842 [trace] extension.d:236:initialize                 documentChanges?: true
[stderr] 2023-07-13T00:30:33.842 [trace] extension.d:236:initialize                 resourceOperations?: <null>
[stderr] 2023-07-13T00:30:33.842 [trace] extension.d:236:initialize                 failureHandling?: <null>
[stderr] 2023-07-13T00:30:33.842 [trace] extension.d:236:initialize                 normalizesLineEndings?: <null>
[stderr] 2023-07-13T00:30:33.842 [trace] extension.d:236:initialize                 changeAnnotationSupport?: <null>
[stderr] 2023-07-13T00:30:33.842 [trace] extension.d:236:initialize             didChangeConfiguration?: <null>
[stderr] 2023-07-13T00:30:33.842 [trace] extension.d:236:initialize             didChangeWatchedFiles?:
[stderr] 2023-07-13T00:30:33.842 [trace] extension.d:236:initialize                 dynamicRegistration?: true
[stderr] 2023-07-13T00:30:33.842 [trace] extension.d:236:initialize             symbol?:
[stderr] 2023-07-13T00:30:33.842 [trace] extension.d:236:initialize                 dynamicRegistration?: false
[stderr] 2023-07-13T00:30:33.842 [trace] extension.d:236:initialize             executeCommand?:
[stderr] 2023-07-13T00:30:33.842 [trace] extension.d:236:initialize                 dynamicRegistration?: false
[stderr] 2023-07-13T00:30:33.842 [trace] extension.d:236:initialize             workspaceFolders?: true
[stderr] 2023-07-13T00:30:33.842 [trace] extension.d:236:initialize             configuration?: true
[stderr] 2023-07-13T00:30:33.842 [trace] extension.d:236:initialize             semanticTokens?: <null>
[stderr] 2023-07-13T00:30:33.842 [trace] extension.d:236:initialize             codeLens?: <null>
[stderr] 2023-07-13T00:30:33.842 [trace] extension.d:236:initialize             fileOperations?: <null>
[stderr] 2023-07-13T00:30:33.843 [trace] extension.d:236:initialize         textDocument?:
[stderr] 2023-07-13T00:30:33.843 [trace] extension.d:236:initialize             synchronization?:
[stderr] 2023-07-13T00:30:33.843 [trace] extension.d:236:initialize                 dynamicRegistration?: false
[stderr] 2023-07-13T00:30:33.843 [trace] extension.d:236:initialize                 willSave?: true
[stderr] 2023-07-13T00:30:33.843 [trace] extension.d:236:initialize                 willSaveWaitUntil?: true
[stderr] 2023-07-13T00:30:33.843 [trace] extension.d:236:initialize                 didSave?: true
[stderr] 2023-07-13T00:30:33.843 [trace] extension.d:236:initialize             completion?:
[stderr] 2023-07-13T00:30:33.843 [trace] extension.d:236:initialize                 dynamicRegistration?: false
[stderr] 2023-07-13T00:30:33.843 [trace] extension.d:236:initialize                 completionItem?:
[stderr] 2023-07-13T00:30:33.843 [trace] extension.d:236:initialize                     snippetSupport?: false
[stderr] 2023-07-13T00:30:33.843 [trace] extension.d:236:initialize                     commitCharactersSupport?: <null>
[stderr] 2023-07-13T00:30:33.843 [trace] extension.d:236:initialize                     documentationFormat?: <null>
[stderr] 2023-07-13T00:30:33.843 [trace] extension.d:236:initialize                     deprecatedSupport?: true
[stderr] 2023-07-13T00:30:33.843 [trace] extension.d:236:initialize                     preselectSupport?: <null>
[stderr] 2023-07-13T00:30:33.843 [trace] extension.d:236:initialize                     tagSupport?:
[stderr] 2023-07-13T00:30:33.843 [trace] extension.d:236:initialize                         valueSet: [deprecated_]
[stderr] 2023-07-13T00:30:33.843 [trace] extension.d:236:initialize                     insertReplaceSupport?: <null>
[stderr] 2023-07-13T00:30:33.843 [trace] extension.d:236:initialize                     resolveSupport?:
[stderr] 2023-07-13T00:30:33.843 [trace] extension.d:236:initialize                         properties: ["documentation", "details", "additionalTextEdits"]
[stderr] 2023-07-13T00:30:33.843 [trace] extension.d:236:initialize                     insertTextModeSupport?: <null>
[stderr] 2023-07-13T00:30:33.843 [trace] extension.d:236:initialize                     labelDetailsSupport?: <null>
[stderr] 2023-07-13T00:30:33.843 [trace] extension.d:236:initialize                     labelDetailsSupport?: <null>
[stderr] 2023-07-13T00:30:33.843 [trace] extension.d:236:initialize                 completionItemKind?: <null>
[stderr] 2023-07-13T00:30:33.843 [trace] extension.d:236:initialize                 contextSupport?: true
[stderr] 2023-07-13T00:30:33.843 [trace] extension.d:236:initialize             hover?:
[stderr] 2023-07-13T00:30:33.843 [trace] extension.d:236:initialize                 dynamicRegistration?: false
[stderr] 2023-07-13T00:30:33.843 [trace] extension.d:236:initialize                 contentFormat?: [plaintext]
[stderr] 2023-07-13T00:30:33.843 [trace] extension.d:236:initialize             signatureHelp?:
[stderr] 2023-07-13T00:30:33.843 [trace] extension.d:236:initialize                 dynamicRegistration?: false
[stderr] 2023-07-13T00:30:33.843 [trace] extension.d:236:initialize                 signatureInformation?:
[stderr] 2023-07-13T00:30:33.843 [trace] extension.d:236:initialize                     documentationFormat?: <null>
[stderr] 2023-07-13T00:30:33.843 [trace] extension.d:236:initialize                     parameterInformation?:
[stderr] 2023-07-13T00:30:33.843 [trace] extension.d:236:initialize                         labelOffsetSupport?: true
[stderr] 2023-07-13T00:30:33.843 [trace] extension.d:236:initialize                     activeParameterSupport?: true
[stderr] 2023-07-13T00:30:33.843 [trace] extension.d:236:initialize                 contextSupport?: <null>
[stderr] 2023-07-13T00:30:33.843 [trace] extension.d:236:initialize             declaration?:
[stderr] 2023-07-13T00:30:33.843 [trace] extension.d:236:initialize                 dynamicRegistration?: false
[stderr] 2023-07-13T00:30:33.843 [trace] extension.d:236:initialize                 linkSupport?: true
[stderr] 2023-07-13T00:30:33.843 [trace] extension.d:236:initialize             definition?:
[stderr] 2023-07-13T00:30:33.843 [trace] extension.d:236:initialize                 dynamicRegistration?: false
[stderr] 2023-07-13T00:30:33.843 [trace] extension.d:236:initialize                 linkSupport?: true
[stderr] 2023-07-13T00:30:33.843 [trace] extension.d:236:initialize             typeDefinition?:
[stderr] 2023-07-13T00:30:33.843 [trace] extension.d:236:initialize                 dynamicRegistration?: false
[stderr] 2023-07-13T00:30:33.843 [trace] extension.d:236:initialize                 linkSupport?: true
[stderr] 2023-07-13T00:30:33.843 [trace] extension.d:236:initialize             implementation?:
[stderr] 2023-07-13T00:30:33.843 [trace] extension.d:236:initialize                 dynamicRegistration?: false
[stderr] 2023-07-13T00:30:33.843 [trace] extension.d:236:initialize                 linkSupport?: true
[stderr] 2023-07-13T00:30:33.843 [trace] extension.d:236:initialize             references?:
[stderr] 2023-07-13T00:30:33.843 [trace] extension.d:236:initialize                 dynamicRegistration?: false
[stderr] 2023-07-13T00:30:33.843 [trace] extension.d:236:initialize             documentHighlight?:
[stderr] 2023-07-13T00:30:33.843 [trace] extension.d:236:initialize                 dynamicRegistration?: false
[stderr] 2023-07-13T00:30:33.843 [trace] extension.d:236:initialize             documentSymbol?:
[stderr] 2023-07-13T00:30:33.843 [trace] extension.d:236:initialize                 dynamicRegistration?: false
[stderr] 2023-07-13T00:30:33.843 [trace] extension.d:236:initialize                 symbolKind?:
[stderr] 2023-07-13T00:30:33.843 [trace] extension.d:236:initialize                     valueSet?: [file, module_, namespace, package_, class_, method, property, field, constructor, enum_, interface_, function_, variable, constant, string, number, boolean, array, object, key, null_, enumMember, struct_, event, operator, typeParameter]
[stderr] 2023-07-13T00:30:33.843 [trace] extension.d:236:initialize                 hierarchicalDocumentSymbolSupport?: true
[stderr] 2023-07-13T00:30:33.843 [trace] extension.d:236:initialize                 tagSupport?: <null>
[stderr] 2023-07-13T00:30:33.843 [trace] extension.d:236:initialize                 labelSupport?: <null>
[stderr] 2023-07-13T00:30:33.843 [trace] extension.d:236:initialize             codeAction?:
[stderr] 2023-07-13T00:30:33.844 [trace] extension.d:236:initialize                 dynamicRegistration?: false
[stderr] 2023-07-13T00:30:33.844 [trace] extension.d:236:initialize                 codeActionLiteralSupport?:
[stderr] 2023-07-13T00:30:33.844 [trace] extension.d:236:initialize                     codeActionKind:
[stderr] 2023-07-13T00:30:33.844 [trace] extension.d:236:initialize                         valueSet: [quickfix, refactor, refactorExtract, refactorInline, refactorRewrite, source, sourceOrganizeImports]
[stderr] 2023-07-13T00:30:33.844 [trace] extension.d:236:initialize                 isPreferredSupport?: true
[stderr] 2023-07-13T00:30:33.844 [trace] extension.d:236:initialize                 disabledSupport?: <null>
[stderr] 2023-07-13T00:30:33.844 [trace] extension.d:236:initialize                 disabledSupport?: <null>
[stderr] 2023-07-13T00:30:33.844 [trace] extension.d:236:initialize                 dataSupport?: <null>
[stderr] 2023-07-13T00:30:33.844 [trace] extension.d:236:initialize                 resolveSupport?: <null>
[stderr] 2023-07-13T00:30:33.844 [trace] extension.d:236:initialize                 honorsChangeAnnotations?: <null>
[stderr] 2023-07-13T00:30:33.844 [trace] extension.d:236:initialize             codeLens?: <null>
[stderr] 2023-07-13T00:30:33.844 [trace] extension.d:236:initialize             documentLink?: <null>
[stderr] 2023-07-13T00:30:33.844 [trace] extension.d:236:initialize             colorProvider?: <null>
[stderr] 2023-07-13T00:30:33.844 [trace] extension.d:236:initialize             formatting?:
[stderr] 2023-07-13T00:30:33.844 [trace] extension.d:236:initialize                 dynamicRegistration?: false
[stderr] 2023-07-13T00:30:33.844 [trace] extension.d:236:initialize             rangeFormatting?:
[stderr] 2023-07-13T00:30:33.844 [trace] extension.d:236:initialize                 dynamicRegistration?: false
[stderr] 2023-07-13T00:30:33.844 [trace] extension.d:236:initialize             onTypeFormatting?: <null>
[stderr] 2023-07-13T00:30:33.844 [trace] extension.d:236:initialize             rename?:
[stderr] 2023-07-13T00:30:33.844 [trace] extension.d:236:initialize                 dynamicRegistration?: false
[stderr] 2023-07-13T00:30:33.844 [trace] extension.d:236:initialize                 prepareSupport?: <null>
[stderr] 2023-07-13T00:30:33.844 [trace] extension.d:236:initialize                 prepareSupportDefaultBehavior?: <null>
[stderr] 2023-07-13T00:30:33.844 [trace] extension.d:236:initialize                 honorsChangeAnnotations?: <null>
[stderr] 2023-07-13T00:30:33.844 [trace] extension.d:236:initialize             publishDiagnostics?:
[stderr] 2023-07-13T00:30:33.844 [trace] extension.d:236:initialize                 relatedInformation?: false
[stderr] 2023-07-13T00:30:33.844 [trace] extension.d:236:initialize                 tagSupport?:
[stderr] 2023-07-13T00:30:33.844 [trace] extension.d:236:initialize                     valueSet: [unnecessary, deprecated_]
[stderr] 2023-07-13T00:30:33.844 [trace] extension.d:236:initialize                 versionSupport?: <null>
[stderr] 2023-07-13T00:30:33.844 [trace] extension.d:236:initialize                 codeDescriptionSupport?: false
[stderr] 2023-07-13T00:30:33.844 [trace] extension.d:236:initialize                 dataSupport?: <null>
[stderr] 2023-07-13T00:30:33.844 [trace] extension.d:236:initialize             foldingRange?: <null>
[stderr] 2023-07-13T00:30:33.844 [trace] extension.d:236:initialize             selectionRange?: <null>
[stderr] 2023-07-13T00:30:33.844 [trace] extension.d:236:initialize             linkedEditingRange?: <null>
[stderr] 2023-07-13T00:30:33.844 [trace] extension.d:236:initialize             callHierarchy?: <null>
[stderr] 2023-07-13T00:30:33.844 [trace] extension.d:236:initialize             semanticTokens?: <null>
[stderr] 2023-07-13T00:30:33.844 [trace] extension.d:236:initialize             moniker?: <null>
[stderr] 2023-07-13T00:30:33.844 [trace] extension.d:236:initialize         window?:
[stderr] 2023-07-13T00:30:33.844 [trace] extension.d:236:initialize             workDoneProgress?: true
[stderr] 2023-07-13T00:30:33.844 [trace] extension.d:236:initialize             showMessage?: <null>
[stderr] 2023-07-13T00:30:33.844 [trace] extension.d:236:initialize             showDocument?: <null>
[stderr] 2023-07-13T00:30:33.844 [trace] extension.d:236:initialize         general?:
[stderr] 2023-07-13T00:30:33.844 [trace] extension.d:236:initialize             regularExpressions?: <null>
[stderr] 2023-07-13T00:30:33.844 [trace] extension.d:236:initialize             markdown?: <null>
[stderr] 2023-07-13T00:30:33.844 [trace] extension.d:236:initialize         experimental?:
[stderr] 2023-07-13T00:30:33.844 [trace] extension.d:236:initialize             storage__: Storage__
[stderr] 2023-07-13T00:30:33.844 [trace] extension.d:236:initialize             identifier__: 6
[stderr] 2023-07-13T00:30:33.844 [trace] extension.d:236:initialize     trace?: <null>
[stderr] 2023-07-13T00:30:33.844 [trace] extension.d:236:initialize     workspaceFolders:
[stderr] 2023-07-13T00:30:33.844 [trace] extension.d:236:initialize         isSet: true
[stderr] 2023-07-13T00:30:33.844 [trace] extension.d:236:initialize         isSet: true
[server-reply] (id:1) Thu Jul 13 00:30:33 2023:
(:jsonrpc "2.0" :id 1 :result
      (:capabilities
       (:textDocumentSync
        (:openClose t :change 2 :save
            (:includeText :json-false))
        :completionProvider
        (:resolveProvider :json-false :triggerCharacters
                  ["." "=" "/" "*" "+" "-"]
                  :completionItem
                  (:labelDetailsSupport t))
        :hoverProvider t :signatureHelpProvider
        (:triggerCharacters
         ["(" "[" ","])
        :definitionProvider t :referencesProvider t :documentHighlightProvider t :documentSymbolProvider t :codeActionProvider t :codeLensProvider
        (:resolveProvider t)
        :colorProvider nil :documentFormattingProvider t :documentRangeFormattingProvider t :renameProvider
        (:prepareProvider t)
        :foldingRangeProvider nil :workspaceSymbolProvider t :workspace
        (:workspaceFolders
         (:supported t :changeNotifications t)))
       :serverInfo
       (:name "serve-d" :version "v0.8.0-beta.14")))
[client-notification] Thu Jul 13 00:30:33 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] Thu Jul 13 00:30:33 2023:
(:jsonrpc "2.0" :method "workspace/didChangeConfiguration" :params
      (:settings #s(hash-table size 1 test eql rehash-size 1.5 rehash-threshold 0.8125 data
                   ())))
[stderr] 2023-07-13T00:30:33.844 [trace] extension.d:236:initialize         embed: [WorkspaceFolder("file:///Users/christian.koestlin/Sync/projects/_d/active/27-tui", "~/Sync/projects/_d/active/27-tui/")]
[stderr] 2023-07-13T00:30:33.844 [trace] extension.d:236:initialize     clientInfo?: <null>
[stderr] 2023-07-13T00:30:33.844 [trace] extension.d:236:initialize     locale?: <null>
[stderr] 2023-07-13T00:30:33.844 [trace] serverbase.d:128:processRequest Initialized
[stderr] 2023-07-13T00:30:33.869 [trace] serverbase.d:368:__lambda3 Calling notification method setupConfig_Initialized
[stderr] 2023-07-13T00:30:33.869 [trace] async.d:85:setTimeout Setting timeout for 250 ms
[server-notification] Thu Jul 13 00:30:33 2023:
(:jsonrpc "2.0" :method "window/logMessage" :params
      (:type 4 :message "[progress] [00000.065] [configLoad] 0 / 1: file:///Users/christian.koestlin/Sync/projects/_d/active/27-tui"))
[stderr] 2023-07-13T00:30:33.881 [trace] serverbase.d:368:__lambda3 Calling notification method didChangeConfiguration
[stderr] 2023-07-13T00:30:33.881 [trace] extension.d:63:changedConfig Config for file:///Users/christian.koestlin/Sync/projects/_d/active/27-tui changed: Configuration(D(auto, "dcd-client", "dcd-server", "dub", "dmd", true, true, true, true, true, true, true, true, false, true, true, false, [], "", "", "", "", true, false, false, true, [], [], "ask", 6, "project", false, true), DFmt(true, "allman", true, true, false, true, true, "conditional_newline_indent", false, false, false, true, true), DScanner([]), SDL(true, false, 2), Editor([], 0), Git("git"))
[stderr] 2023-07-13T00:30:33.881 [trace] extension.d:362:doGlobalStartup Initializing serve-d for global access
[stderr] 2023-07-13T00:30:33.882 [trace] types.d:218:detectDcdPath found previously installed DCD in /Users/christian.koestlin/.code-d/bin/dcd-client
[stderr] 2023-07-13T00:30:33.882 [trace] types.d:218:detectDcdPath found previously installed DCD in /Users/christian.koestlin/.code-d/bin/dcd-server
[stderr] 2023-07-13T00:30:33.882 [trace] extension.d:375:doGlobalStartup Setup global configuration as ["dmd":Section(["path":dmd]), "dcd":Section(["serverPath":/Users/christian.koestlin/.code-d/bin/dcd-server, "port":9166, "clientPath":/Users/christian.koestlin/.code-d/bin/dcd-client])]
[stderr] 2023-07-13T00:30:33.882 [trace] extension.d:379:doGlobalStartup Registering dub
[stderr] 2023-07-13T00:30:33.882 [trace] extension.d:381:doGlobalStartup Registering fsworkspace
[stderr] 2023-07-13T00:30:33.882 [trace] extension.d:383:doGlobalStartup Registering dcd
[server-notification] Thu Jul 13 00:30:33 2023:
(:jsonrpc "2.0" :method "window/logMessage" :params
      (:type 4 :message "[progress] [00000.065] [globalStartup]: Initializing serve-d..."))
[stderr] 2023-07-13T00:30:33.896 [trace] dcd.d:68:reloadBinaries Detected dcd-server (/Users/christian.koestlin/.code-d/bin/dcd-server) v0.15.2
[stderr] 2023-07-13T00:30:33.896 [trace] dcd.d:73:reloadBinaries Using dcd-client instead of internal workspace-d client
[server-request] (id:1) Thu Jul 13 00:30:33 2023:
(:jsonrpc "2.0" :id 1 :method "client/registerCapability" :params
      (:registrations
       [(:id "profilegc.watchfiles" :method "workspace/didChangeWatchedFiles" :registerOptions
         (:watchers
          [(:globPattern "**/profilegc.log")]))]))
[client-reply] (id:1) Thu Jul 13 00:30:33 2023:
(:jsonrpc "2.0" :id 1 :result nil)
[stderr] 2023-07-13T00:30:33.905 [trace] dcd.d:77:reloadBinaries Detected dcd-client (/Users/christian.koestlin/.code-d/bin/dcd-client) v0.15.2
[stderr] 2023-07-13T00:30:33.905 [trace] extension.d:385:doGlobalStartup Registering dcdext
[stderr] 2023-07-13T00:30:33.905 [trace] extension.d:387:doGlobalStartup Registering dmd
[stderr] 2023-07-13T00:30:33.905 [trace] extension.d:389:doGlobalStartup Starting dscanner
[stderr] 2023-07-13T00:30:33.905 [trace] extension.d:391:doGlobalStartup Starting dfmt
[stderr] 2023-07-13T00:30:33.905 [trace] extension.d:393:doGlobalStartup Starting dlangui
[stderr] 2023-07-13T00:30:33.906 [trace] extension.d:395:doGlobalStartup Starting importer
[stderr] 2023-07-13T00:30:33.906 [trace] extension.d:397:doGlobalStartup Starting moduleman
[stderr] 2023-07-13T00:30:33.906 [trace] extension.d:399:doGlobalStartup Starting snippets
[stderr] 2023-07-13T00:30:33.906 [trace] extension.d:401:doGlobalStartup Starting index
[stderr] 2023-07-13T00:30:33.906 [trace] extension.d:403:doGlobalStartup Starting references
[server-notification] Thu Jul 13 00:30:33 2023:
(:jsonrpc "2.0" :method "coded/changedSelectedWorkspace" :params
      (:uri "file:///Users/christian.koestlin/Sync/projects/_d/active/27-tui" :name "~/Sync/projects/_d/active/27-tui/" :initialized :json-false :selected t :pendingErrors nil))
[stderr] 2023-07-13T00:30:33.931 [trace] extension.d:530:doStartup Initializing serve-d for file:///Users/christian.koestlin/Sync/projects/_d/active/27-tui
[server-notification] Thu Jul 13 00:30:33 2023:
(:jsonrpc "2.0" :method "window/logMessage" :params
      (:type 4 :message "[progress] [00000.133] [workspaceStartup] 0 / 1: file:///Users/christian.koestlin/Sync/projects/_d/active/27-tui"))
[stderr] 2023-07-13T00:30:33.949 [info] extension.d:516:rootsForProject Root Suggestions: [RootSuggestion("/Users/christian.koestlin/Sync/projects/_d/active/27-tui", true)]
[stderr] 2023-07-13T00:30:33.949 [info] extension.d:548:doStartup registering instance for root RootSuggestion("/Users/christian.koestlin/Sync/projects/_d/active/27-tui", true)
[stderr] 2023-07-13T00:30:33.949 [trace] types.d:218:detectDcdPath found previously installed DCD in /Users/christian.koestlin/.code-d/bin/dcd-client
[stderr] 2023-07-13T00:30:33.949 [trace] types.d:218:detectDcdPath found previously installed DCD in /Users/christian.koestlin/.code-d/bin/dcd-server
[stderr] 2023-07-13T00:30:33.950 [trace] types.d:430:activeInstance Setting active instance to /Users/christian.koestlin/Sync/projects/_d/active/27-tui.
[stderr] 2023-07-13T00:30:33.950 [trace] profilegc.d:80:update File Exception processing profilegc: /Users/christian.koestlin/Sync/projects/_d/active/27-tui/profilegc.log: No such file or directory
[stderr] 2023-07-13T00:30:33.950 [trace] extension.d:584:doStartup Starting auto completion service...
[stderr] 2023-07-13T00:30:33.950 [trace] extension.d:595:doStartup Started all completion servers in 17 μs and 3 hnsecs
[stderr] 2023-07-13T00:30:33.950 [trace] extension.d:199:changedConfig Finished config change of file:///Users/christian.koestlin/Sync/projects/_d/active/27-tui with 0 changes in 68 ms, 227 μs, and 7 hnsecs.
[server-notification] Thu Jul 13 00:30:33 2023:
(:jsonrpc "2.0" :method "window/logMessage" :params
      (:type 4 :message "[progress] [00000.133] [completionStartup] 0 / 1: file:///Users/christian.koestlin/Sync/projects/_d/active/27-tui"))
[server-notification] Thu Jul 13 00:30:33 2023:
(:jsonrpc "2.0" :method "window/logMessage" :params
      (:type 4 :message "[progress] [00000.133] [configFinish] 1 / 1: "))
[stderr] 2023-07-13T00:30:34.123 [trace] async.d:44:parallelMain Calling timeout
[stderr] 2023-07-13T00:31:03.824 [trace] serverbase.d:505:collectGC GC run in 815 μs and 4 hnsecs. Freed 369232 bytes (482208 bytes allocated, 4760672 bytes available)
[stderr] 2023-07-13T00:31:33.829 [trace] serverbase.d:505:collectGC GC run in 721 μs and 9 hnsecs. Freed 39600 bytes (482144 bytes allocated, 4760736 bytes available)
[stderr] 2023-07-13T00:32:03.831 [trace] serverbase.d:505:collectGC GC run in 584 μs and 2 hnsecs. Freed 39600 bytes (482144 bytes allocated, 4760736 bytes available)

but whenever i try to do something with lsp e.g. find type definition i get:

jsonrpc-error: jsonrpc-error: "No current JSON-RPC connection", (jsonrpc-error-code . 32603), (jsonrpc-error-message . "No current JSON-RPC connection")
gizmomogwai commented 1 year ago

sorry ... was my problem, wrong configuration. when configuring eglot properly (not on demand loading the serve-d) it works and produces e.g. nice flymake errors ...

a minimal config looks like this:

(defvar bootstrap-version)
(let ((bootstrap-file
       (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
      (bootstrap-version 5))
  (unless (file-exists-p bootstrap-file)
    (with-current-buffer
        (url-retrieve-synchronously
         "https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el"
         'silent 'inhibit-cookies)
      (goto-char (point-max))
      (eval-print-last-sexp)))
  (load bootstrap-file nil 'nomessage))

(straight-use-package 'use-package)

(use-package d-mode
  :straight t)

(use-package eglot
  :straight t
  :config (progn
          (add-hook 'd-mode-hook 'eglot-ensure)))

; dont know how to put this in the previous :config block
(with-eval-after-load 'eglot
  (add-to-list 'eglot-server-programs '((d-mode) "/serve-d/serve-d" "--logLevel=all")))

i am still trying to reproduce this in a docker container (having problems to find a prebuilt pretest emacs 29 version) to be 100% sure.

gizmomogwai commented 1 year ago

In the meantime I put up a dockerized emacs that shows emacs30-nightly + eglot + code-d working together. On some of my projects, code-d does not seems to be able to autodetect the required dub-configuration. What is the property to select the config?

gizmomogwai commented 1 year ago

btw. the dockerfile is located here: https://github.com/gizmomogwai/demacs If I find the time to polish eglot + code-d a little bit I will put up a asciinema of it.