-
I am sorry to ask here for such a trivial issue. But does anyone here want to share their Here is walk-through of my steps.
npm install -g vscode-html-languageserver-bin
(require 'eglot)
(add-to-list 'eglot-server-programs '(html-mode . ("html-languageserver" "--stdio")))
<!DOCTYPE html>
<html>
<head>
<title>eglot html-lsp</title>
</head>
<body>
<h1>eglot html-lsp</h1>
</body>
</html>
[client-request] (id:1) Fri Dec 3 13:06:15 2021:
(:jsonrpc "2.0" :id 1 :method "initialize" :params
(:processId 36411 :rootPath "/tmp/" :rootUri "file:///private/tmp" :initializationOptions #s(hash-table size 65 test eql rehash-size 1.5 rehash-threshold 0.8125 data
())
:capabilities
(:workspace
(:applyEdit t :executeCommand
(:dynamicRegistration :json-false)
:workspaceEdit
(:documentChanges :json-false)
:didChangeWatchedFiles
(:dynamicRegistration t)
:symbol
(:dynamicRegistration :json-false)
:configuration t)
:textDocument
(:synchronization
(:dynamicRegistration :json-false :willSave t :willSaveWaitUntil t :didSave t)
:completion
(:dynamicRegistration :json-false :completionItem
(:snippetSupport t)
: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)
:publishDiagnostics
(:relatedInformation :json-false))
:experimental #s(hash-table size 65 test eql rehash-size 1.5 rehash-threshold 0.8125 data
()))))
[server-reply] (id:1) ERROR Fri Dec 3 13:06:15 2021:
(:jsonrpc "2.0" :id 1 :error
(:code -32603 :message "Request initialize failed with message: Cannot read properties of undefined (reading 'css')"))
[internal] Fri Dec 3 13:06:15 2021:
(:message "Connection state changed" :change "killed: 9\n")
I can't figure out what this error message means. I have successfully installed and activated the I thought it that it could be a mode issues, so tried adding (add-to-list 'eglot-server-programs '((html-mode mhtml-mode) . ("html-languageserver" "--stdio"))) I am sure it brain fart on my part. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I tried |
Beta Was this translation helpful? Give feedback.
-
Hi @iquiw |
Beta Was this translation helpful? Give feedback.
vscode-html-languageserver-bin
looks very old.I tried
vscode-html-language-server
from vscode-langservers-extracted. It works without the error.