gbprod / phpactor.nvim

Lua version of the Phpactor vim plugin to take advantage of the latest Neovim features
73 stars 7 forks source link

Is `PhpActor lsp/status` supposed to work? #34

Closed sitedyno closed 7 months ago

sitedyno commented 7 months ago

I just installed the plugin and most things seem to work, but the lsp/ calls that are supposed to display results seem broken. I found that here ipairs is used to iterate over the results. However the results from buf_request_sync() do not have a proper index. For some reason it never has the first index [1]. If I change ipairs to pairs it works. I've pasted what I get as results below:

{                                                                                                                                                                                                                             
  [2] = {                                                                                                                                                                                                                     
    result = 'Process\n-------\n\n  cwd:/home/cb/projects/sitedyno-app\n  pid: 849091\n  up: 0d 0h 0m 3s\n\nServer\n------\n\n  mem: 22,982,960b\n  documents: 1\n  services: ["diagnostics","indexer"]\n  diagnostics: outsou
rced, php-lint\n\nPaths\n-----\n\n  project_id: sitedyno-app-be48cb\n  project_root: /home/cb/projects/sitedyno-app\n  cache: /home/cb/.cache/phpactor\n  config: /home/cb/.config/phpactor\n  data: /home/cb/.local/share/php
actor\n  application_root: /home/cb/.local/share/nvim/mason/packages/phpactor\n  project_config: /home/cb/projects/sitedyno-app/.phpactor\n\nIndexer\n-------\n\n  watcher: pattern matching LSP file events'                 
  },                                                                                                                                                                                                                          
  [3] = {                                                                                                                                                                                                                     
    error = {                                                                                                                                                                                                                 
      code = -32601,                                                                                                                                                                                                          
      message = "Unhandled method phpactor/status",                                                                                                                                                                           
      <metatable> = {                                                                                                                                                                                                         
        __tostring = <function 1>                                                                                                                                                                                             
      }                                                                                                                                                                                                                       
    }                                                                                                                                                                                                                         
  }                                                                                                                                                                                                                           
}                                                                                                                                                                                                                             
gbprod commented 7 months ago

It seems that it's broken, I'll fix it. Thanks for reporting this issue