When trying to use go to definition in my nevim setup I get error from Puppet LSP and empty response.
I, [2023-04-27T09:07:06.451883 #2357] INFO -- : Language Server is v1.3.1
D, [2023-04-27T09:07:06.464261 #2357] DEBUG -- : Loading gems...
I, [2023-04-27T09:07:07.368829 #2357] INFO -- : Using Puppet v5.5.22
I, [2023-04-27T09:07:07.372715 #2357] INFO -- : Using Facter v2.5.7
D, [2023-04-27T09:07:07.375613 #2357] DEBUG -- : Detected additional puppet settings ["--modulepath", "/code/a32-tools:/code/puppet:/code/puppet-forge"]
I, [2023-04-27T09:07:07.395013 #2357] INFO -- : Initializing settings...
I, [2023-04-27T09:07:07.398131 #2357] INFO -- : Starting RPC Server...
D, [2023-04-27T09:07:07.401034 #2357] DEBUG -- : Using STDIO Server
D, [2023-04-27T09:07:07.404300 #2357] DEBUG -- : STDIOSRV: Starting STDIO server...
D, [2023-04-27T09:07:07.406998 #2357] DEBUG -- : --- INBOUND
{"jsonrpc":"2.0","params":{"capabilities":{"workspace":{"workspaceEdit":{"resourceOperations":["rename","create","delete"]},"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]},"dynamicRegistration":false,"hierarchicalWorkspaceSymbolSupport":true},"didChangeWatchedFiles":{"dynamicRegistration":true,"relativePatternSupport":true},"workspaceFolders":true,"semanticTokens":{"refreshSupport":true},"configuration":true,"applyEdit":true},"window":{"workDoneProgress":true,"showMessage":{"messageActionItem":{"additionalPropertiesSupport":false}},"showDocument":{"support":true}},"textDocument":{"rename":{"dynamicRegistration":false,"prepareSupport":true},"implementation":{"linkSupport":true},"references":{"dynamicRegistration":false},"documentHighlight":{"dynamicRegistration":false},"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]},"dynamicRegistration":false,"hierarchicalDocumentSymbolSupport":true},"definition":{"linkSupport":true},"semanticTokens":{"formats":["relative"],"overlappingTokenSupport":true,"multilineTokenSupport":false,"serverCancelSupport":false,"augmentsSyntaxTokens":true,"tokenModifiers":["declaration","definition","readonly","static","deprecated","abstract","async","modification","documentation","defaultLibrary"],"requests":{"range":false,"full":{"delta":true}},"dynamicRegistration":false,"tokenTypes":["namespace","type","class","enum","interface","struct","typeParameter","parameter","variable","property","enumMember","event","function","method","macro","keyword","modifier","comment","string","number","regexp","operator","decorator"]},"declaration":{"linkSupport":true},"publishDiagnostics":{"tagSupport":{"valueSet":[1,2]},"relatedInformation":true},"typeDefinition":{"linkSupport":true},"hover":{"dynamicRegistration":false,"contentFormat":["markdown","plaintext"]},"callHierarchy":{"dynamicRegistration":false},"codeAction":{"resolveSupport":{"properties":["edit"]},"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}},"dynamicRegistration":false,"isPreferredSupport":true,"dataSupport":true},"signatureHelp":{"dynamicRegistration":false,"signatureInformation":{"parameterInformation":{"labelOffsetSupport":true},"documentationFormat":["markdown","plaintext"],"activeParameterSupport":true}},"synchronization":{"didSave":true,"willSave":true,"dynamicRegistration":false,"willSaveWaitUntil":true},"completion":{"contextSupport":true,"completionItem":{"insertReplaceSupport":true,"insertTextModeSupport":{"valueSet":[1,2]},"snippetSupport":true,"commitCharactersSupport":true,"preselectSupport":true,"deprecatedSupport":true,"documentationFormat":["markdown","plaintext"],"tagSupport":{"valueSet":[1]},"resolveSupport":{"properties":["documentation","detail","additionalTextEdits"]},"labelDetailsSupport":true},"completionList":{"itemDefaults":["commitCharacters","editRange","insertTextFormat","insertTextMode","data"]},"insertTextMode":1,"dynamicRegistration":false,"completionItemKind":{"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]}}}},"trace":"off","rootPath":"\/code\/a32-tools\/puppet-araw_profile","rootUri":"file:\/\/\/code\/a32-tools\/puppet-araw_profile","workspaceFolders":[{"uri":"file:\/\/\/code\/a32-tools\/puppet-araw_profile","name":"\/code\/a32-tools\/puppet-araw_profile"}],"processId":2326,"clientInfo":{"name":"Neovim","version":"0.10.0"},"initializationOptions":{}},"method":"initialize","id":1}
---
D, [2023-04-27T09:07:07.412078 #2357] DEBUG -- : Received initialize method
I, [2023-04-27T09:07:07.414874 #2357] INFO -- : Loading Default Data via aggregate (Async)...
D, [2023-04-27T09:07:07.417627 #2357] DEBUG -- : SidecarQueue Thread: Running sidecar ["ruby", "/home/pbugala/.local/share/nvim/mason/packages/puppet-editor-services/puppet-languageserver-sidecar", "--action", "default_aggregate", "--puppet-version=5.5.22", "--puppet-settings=--modulepath,/code/a32-tools:/code/puppet:/code/puppet-forge"]
D, [2023-04-27T09:07:07.417773 #2357] DEBUG -- : SidecarQueue Thread: Running sidecar ["ruby", "/home/pbugala/.local/share/nvim/mason/packages/puppet-editor-services/puppet-languageserver-sidecar", "--action", "facts", "--puppet-version=5.5.22", "--puppet-settings=--modulepath,/code/a32-tools:/code/puppet:/code/puppet-forge"]
I, [2023-04-27T09:07:07.417878 #2357] INFO -- : Loading static data (Async)...
I, [2023-04-27T09:07:07.418025 #2357] INFO -- : Loading Workspace Data via aggregate (Async)...
D, [2023-04-27T09:07:07.421768 #2357] DEBUG -- : --- OUTBOUND
{"jsonrpc":"2.0","id":1,"result":{"capabilities":{"textDocumentSync":1,"hoverProvider":true,"completionProvider":{"resolveProvider":true,"triggerCharacters":[">","$","[","="]},"definitionProvider":true,"documentSymbolProvider":true,"workspaceSymbolProvider":true,"signatureHelpProvider":{"triggerCharacters":["(",","]},"documentOnTypeFormattingProvider":{"firstTriggerCharacter":">"}}}}
---
D, [2023-04-27T09:07:07.423024 #2357] DEBUG -- : Importing static data file /home/pbugala/.local/share/nvim/mason/packages/puppet-editor-services/lib/puppet-languageserver/static_data/bolt-ctrl.json...
D, [2023-04-27T09:07:07.424474 #2357] DEBUG -- : --- INBOUND
{"jsonrpc":"2.0","method":"initialized","params":{}}
---
D, [2023-04-27T09:07:07.425927 #2357] DEBUG -- : Importing static data file /home/pbugala/.local/share/nvim/mason/packages/puppet-editor-services/lib/puppet-languageserver/static_data/bolt-puppetdb_fact.json...
I, [2023-04-27T09:07:07.427112 #2357] INFO -- : Client has received initialization
D, [2023-04-27T09:07:07.428575 #2357] DEBUG -- : Importing static data file /home/pbugala/.local/share/nvim/mason/packages/puppet-editor-services/lib/puppet-languageserver/static_data/bolt-file.json...
D, [2023-04-27T09:07:07.429573 #2357] DEBUG -- : Client does not support didChangeConfiguration dynamic registration. Using push method for configuration change detection.
D, [2023-04-27T09:07:07.431133 #2357] DEBUG -- : Importing static data file /home/pbugala/.local/share/nvim/mason/packages/puppet-editor-services/lib/puppet-languageserver/static_data/bolt-system.json...
D, [2023-04-27T09:07:07.432390 #2357] DEBUG -- : --- INBOUND
{"jsonrpc":"2.0","method":"textDocument\/didOpen","params":{"textDocument":{"uri":"file:\/\/\/code\/a32-tools\/puppet-araw_profile\/manifests\/init.pp","text":"<redacted_text>","version":0,"languageId":"puppet"}}}
---
D, [2023-04-27T09:07:07.433548 #2357] DEBUG -- : Importing static data file /home/pbugala/.local/share/nvim/mason/packages/puppet-editor-services/lib/puppet-languageserver/static_data/bolt-puppet_connect.json...
I, [2023-04-27T09:07:07.434536 #2357] INFO -- : Received textDocument/didOpen notification.
D, [2023-04-27T09:07:07.436001 #2357] DEBUG -- : Importing static data file /home/pbugala/.local/share/nvim/mason/packages/puppet-editor-services/lib/puppet-languageserver/static_data/bolt-dir.json...
D, [2023-04-27T09:07:07.441273 #2357] DEBUG -- : Importing static data file /home/pbugala/.local/share/nvim/mason/packages/puppet-editor-services/lib/puppet-languageserver/static_data/bolt-log.json...
D, [2023-04-27T09:07:07.487296 #2357] DEBUG -- : Importing static data file /home/pbugala/.local/share/nvim/mason/packages/puppet-editor-services/lib/puppet-languageserver/static_data/bolt-prompt.json...
D, [2023-04-27T09:07:07.492360 #2357] DEBUG -- : --- OUTBOUND
{"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///code/a32-tools/puppet-araw_profile/manifests/init.pp","diagnostics":[]}}
---
D, [2023-04-27T09:07:07.492881 #2357] DEBUG -- : Importing static data file /home/pbugala/.local/share/nvim/mason/packages/puppet-editor-services/lib/puppet-languageserver/static_data/bolt-out.json...
D, [2023-04-27T09:07:07.496425 #2357] DEBUG -- : Importing static data file /home/pbugala/.local/share/nvim/mason/packages/puppet-editor-services/lib/puppet-languageserver/static_data/bolt-boltlib.json...
D, [2023-04-27T09:07:07.499460 #2357] DEBUG -- : Importing static data file /home/pbugala/.local/share/nvim/mason/packages/puppet-editor-services/lib/puppet-languageserver/static_data/bolt-canary.json...
D, [2023-04-27T09:07:07.501639 #2357] DEBUG -- : Importing static data file /home/pbugala/.local/share/nvim/mason/packages/puppet-editor-services/lib/puppet-languageserver/static_data/bolt-aggregate.json...
D, [2023-04-27T09:07:07.503641 #2357] DEBUG -- : Static bolt data returned 59 functions
D, [2023-04-27T09:07:07.505031 #2357] DEBUG -- : Static bolt data returned 9 datatypes
A, [2023-04-27T09:07:08.628557 #2357] ANY -- : SidecarQueue Thread: Calling sidecar with --action default_aggregate --puppet-version=5.5.22 --puppet-settings=--modulepath,/code/a32-tools:/code/puppet:/code/puppet-forge returned exitcode 1, /home/pbugala/.rvm/gems/ruby-2.7.3/gems/puppet-5.5.22/lib/puppet/file_system/file_impl.rb:80: warning: Using the last argument as keyword parameters is deprecated
D, [2023-04-27T09:07:08.631314 #2357] DEBUG -- : SidecarQueue Thread: Running sidecar ["ruby", "/home/pbugala/.local/share/nvim/mason/packages/puppet-editor-services/puppet-languageserver-sidecar", "--action", "workspace_aggregate", "--local-workspace", "/code/a32-tools/puppet-araw_profile", "--puppet-version=5.5.22", "--puppet-settings=--modulepath,/code/a32-tools:/code/puppet:/code/puppet-forge"]
A, [2023-04-27T09:07:09.387057 #2357] ANY -- : SidecarQueue Thread: Calling sidecar with --action workspace_aggregate --local-workspace /code/a32-tools/puppet-araw_profile --puppet-version=5.5.22 --puppet-settings=--modulepath,/code/a32-tools:/code/puppet:/code/puppet-forge returned exitcode 0, /home/pbugala/.rvm/gems/ruby-2.7.3/gems/puppet-5.5.22/lib/puppet/file_system/file_impl.rb:80: warning: Using the last argument as keyword parameters is deprecated
D, [2023-04-27T09:07:09.393200 #2357] DEBUG -- : SidecarQueue Thread: workspace_aggregate returned 65 classes
A, [2023-04-27T09:07:13.316916 #2357] ANY -- : SidecarQueue Thread: Calling sidecar with --action facts --puppet-version=5.5.22 --puppet-settings=--modulepath,/code/a32-tools:/code/puppet:/code/puppet-forge returned exitcode 0, /home/pbugala/.rvm/gems/ruby-2.7.3/gems/puppet-5.5.22/lib/puppet/file_system/file_impl.rb:80: warning: Using the last argument as keyword parameters is deprecated
/home/pbugala/.rvm/gems/ruby-2.7.3/gems/puppet-5.5.22/lib/puppet/util.rb:461: warning: URI.escape is obsolete
/home/pbugala/.rvm/gems/ruby-2.7.3/gems/puppet-5.5.22/lib/puppet/file_system/file_impl.rb:80: warning: Using the last argument as keyword parameters is deprecated
/home/pbugala/.rvm/gems/ruby-2.7.3/gems/puppet-5.5.22/lib/puppet/util.rb:461: warning: URI.escape is obsolete
rpm: no arguments given for query
rpm: no arguments given for query
D, [2023-04-27T09:07:13.321393 #2357] DEBUG -- : SidecarQueue Thread: facts returned 97 items
D, [2023-04-27T09:07:41.816274 #2357] DEBUG -- : --- INBOUND
{"jsonrpc":"2.0","params":{"position":{"line":119,"character":26},"textDocument":{"uri":"file:\/\/\/code\/a32-tools\/puppet-araw_profile\/manifests\/init.pp"}},"method":"textDocument\/definition","id":2}
---
E, [2023-04-27T09:07:41.826229 #2357] ERROR -- : (textDocument/definition) Unable to generate Defintion information for object of type Puppet::Pops::Model::HostClassDefinition
D, [2023-04-27T09:07:41.831297 #2357] DEBUG -- : --- OUTBOUND
{"jsonrpc":"2.0","id":2,"result":null}
Expected Behavior
Receive proper response for class definition.
Steps to Reproduce
Steps to reproduce the behavior:
Run Neovim with following nvim-lspconfig configuration. You might need to change modulepath to match your setup, or remove that option entirely. I tested it has no impact on this issue bahavior.
local lspconfig = require('lspconfig')
lspconfig.puppet.setup({
on_attach = function(client, bufnr)
local bufopts = { noremap=true, silent=true, buffer=bufnr }
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, bufopts)
end
cmd = { 'puppet-languageserver', '--stdio', '--puppet-settings=--modulepath,/code/a32-tools:/code/puppet:/code/puppet-forge' },
})
Open some puppet module file and press gd while cursor is on class name word.
Describe the Bug
When trying to use go to definition in my nevim setup I get error from Puppet LSP and empty response.
Expected Behavior
Receive proper response for class definition.
Steps to Reproduce
Steps to reproduce the behavior:
gd
while cursor is on class name word.Environment