sumneko_lua lsp server会把workspace/configuration
发给client,但是client没处理,请问该怎么改代码?
Eval in Emacs: (lsp-bridge--first-start '54143)
Cache action change_cursor, wait for file /Users/albert/workspace/lua/test.lua to open it before executing.
--- Send request initialize: 23015
{
"jsonrpc": "2.0",
"method": "initialize",
"params": {
"processId": 61205,
"rootPath": "/Users/albert/workspace/lua/test.lua",
"clientInfo": {
"name": "emacs",
"version": "GNU Emacs 28.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, cairo version 1.17.6)\n of 2022-04-04"
},
"rootUri": "file:///Users/albert/workspace/lua/test.lua",
"capabilities": {
"callHierarchy": {
"dynamicRegistration": false
},
"textDocument": {
"completion": {
"completionItem": {
"commitCharactersSupport": true,
"deprecatedSupport": true,
"documentationFormat": [
"markdown",
"plaintext"
]
}
}
},
"workspace": {
"applyEdit": true,
"configuration": true,
"symbol": {
"dynamicRegistration": false,
"hierarchicalWorkspaceSymbolSupport": true,
"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
]
}
},
"workspaceEdit": {
"resourceOperations": [
"rename",
"create",
"delete"
]
},
"workspaceFolders": true,
"didChangeConfiguration": {
"dynamicRegistration": true
}
}
},
"initializationOptions": {}
},
"id": 23015
}
--- Recv message: window/logMessage
--- Recv message
{
"jsonrpc": "2.0",
"method": "window/logMessage",
"params": {
"message": "Log path: file:///Users/albert/.local/share/nvim/lsp_servers/sumneko_lua/extension/server/log/file_Users_albert_workspace_lua_test.lua.log",
"type": 4
}
}
--- Recv message: 23015
{
"id": 23015,
"jsonrpc": "2.0",
"result": {
"capabilities": {
"codeActionProvider": {
"codeActionKinds": [
"",
"quickfix",
"refactor.rewrite",
"refactor.extract"
],
"resolveProvider": false
},
"completionProvider": {
"resolveProvider": true,
"triggerCharacters": [
"\t",
"\n",
".",
":",
"(",
"'",
"\"",
"[",
",",
"#",
"*",
"@",
"|",
"=",
"-",
"{",
"/",
"\\",
" ",
"+",
"?"
]
},
"definitionProvider": true,
"documentHighlightProvider": true,
"documentOnTypeFormattingProvider": {
"firstTriggerCharacter": "\n"
},
"documentSymbolProvider": true,
"executeCommandProvider": {
"commands": [
"lua.removeSpace",
"lua.solve",
"lua.jsonToLua",
"lua.setConfig",
"lua.autoRequire"
]
},
"foldingRangeProvider": true,
"hoverProvider": true,
"offsetEncoding": "utf-16",
"referencesProvider": true,
"renameProvider": {
"prepareProvider": true
},
"semanticTokensProvider": {
"full": false,
"legend": {
"tokenModifiers": [
"declaration",
"definition",
"readonly",
"static",
"deprecated",
"abstract",
"async",
"modification",
"documentation",
"defaultLibrary"
],
"tokenTypes": [
"namespace",
"type",
"class",
"enum",
"interface",
"struct",
"typeParameter",
"parameter",
"variable",
"property",
"enumMember",
"event",
"function",
"method",
"macro",
"keyword",
"modifier",
"comment",
"string",
"number",
"regexp",
"operator"
]
},
"range": true
},
"signatureHelpProvider": {
"triggerCharacters": [
"(",
","
]
},
"textDocumentSync": {
"change": 2,
"openClose": true
},
"typeDefinitionProvider": true,
"workspaceSymbolProvider": true
},
"serverInfo": {
"name": "sumneko.lua"
}
}
}
--- Send notification: initialized
{
"jsonrpc": "2.0",
"method": "initialized",
"params": {}
}
--- Recv message: $/status/report
--- Recv message
{
"jsonrpc": "2.0",
"method": "$/status/report",
"params": {
"text": "\ud83d\ude3aLua",
"tooltip": "Workspace : /Users/albert/workspace/lua/test.lua\nCached files: 0/0\nMemory usage: 2M"
}
}
--- Send notification: workspace/didChangeConfiguration
{
"jsonrpc": "2.0",
"method": "workspace/didChangeConfiguration",
"params": {
"settings": {
"Lua": {
"telemetry": {
"enable": false
},
"workspace": {
"library": {
"/Applications/VimR.app/Contents/Resources/NvimView_NvimView.bundle/Contents/Resources/runtime/lua": true
},
"maxPreload": 100000,
"preloadFileSize": 10000
}
},
"runtime": {
"version": "Lua 5.1"
},
"diagnostics": {
"enable": false
}
}
}
}
Execute action change_cursor for file /Users/albert/workspace/lua/test.lua
--- Send notification: textDocument/didOpen
{
"jsonrpc": "2.0",
"method": "textDocument/didOpen",
"params": {
"textDocument": {
"uri": "file:///Users/albert/workspace/lua/test.lua",
"languageId": "lua",
"version": 0,
"text": "local albert = \"Albert\"\n\nprint(\"Hello World.\")\n"
}
}
}
--- Recv message: $/status/report
--- Recv message
{
"jsonrpc": "2.0",
"method": "$/status/report",
"params": {
"text": "\ud83d\ude3aLua",
"tooltip": "Workspace : /Users/albert/workspace/lua/test.lua\nCached files: 0/0\nMemory usage: 1M"
}
}
--- Recv message: workspace/configuration
--- Recv message: 1 #### 这个message ####
{
"id": 1,
"jsonrpc": "2.0",
"method": "workspace/configuration",
"params": {
"items": [
{
"scopeUri": "file:///Users/albert/workspace/lua/test.lua",
"section": "Lua"
},
{
"scopeUri": "file:///Users/albert/workspace/lua/test.lua",
"section": "files.associations"
},
{
"scopeUri": "file:///Users/albert/workspace/lua/test.lua",
"section": "files.exclude"
},
{
"scopeUri": "file:///Users/albert/workspace/lua/test.lua",
"section": "editor.semanticHighlighting.enabled"
},
{
"scopeUri": "file:///Users/albert/workspace/lua/test.lua",
"section": "editor.acceptSuggestionOnEnter"
}
]
}
}
--- Recv message: workspace/configuration
--- Recv message: 2
{
"id": 2,
"jsonrpc": "2.0",
"method": "workspace/configuration",
"params": {
"items": [
{
"scopeUri": "file:///Users/albert/workspace/lua/test.lua",
"section": "Lua"
},
{
"scopeUri": "file:///Users/albert/workspace/lua/test.lua",
"section": "files.associations"
},
{
"scopeUri": "file:///Users/albert/workspace/lua/test.lua",
"section": "files.exclude"
},
{
"scopeUri": "file:///Users/albert/workspace/lua/test.lua",
"section": "editor.semanticHighlighting.enabled"
},
{
"scopeUri": "file:///Users/albert/workspace/lua/test.lua",
"section": "editor.acceptSuggestionOnEnter"
}
]
}
}