Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Porting RPC commands to LSP#2782

bart-jaskulski started this conversation inIdeas
Nov 16, 2024· 1 comments· 2 replies
Discussion options

Do you believe it would be beneficial and also simply possible to port existing RPC commands to LSP protocol as code actions?

As I view it, this might contribute to easier access to particular actions without need for editor plugins like phpactor.nvim. Although I am not sure how it would affect the readability of code actions menu (there would be much more actions too choose from at request), and how does amount of code action providers affect the performance of phpactor (I personaly notice a delay when initiating a code actions menu from nvim).

You must be logged in to vote

Replies: 1 comment 2 replies

Comment options

which actions do you have in mind? all the code transformations are in the LSP. class moving isnot (mainly because it works in a whole different way) and maybe one or two others but there is practically only one or two concrete reasons ot use the "RPC" system, it's 95% obsolete.

You must be logged in to vote
2 replies
@bart-jaskulski
Comment options

Hmm... I might blindly assumed, that all actions listed inphpactor.nvim are missing LSP implementation. Namely:

PhpActor [  class_inflect  context_menu  expand_class  generate_accessor  change_visibility  copy_class  import_class  import_missing_classes  move_class  navigate  new_class  transform  update  config  status  cache_clear  copy_fcqn  lsp/status  lsp/reindex  lsp/debug/config  lsp/debug/config  blackfire/start  blackfire/stop]

But it seems it is only true forchange_visibility,generate_accessor andnavigate maybe.

@dantleech
Comment options

yeah, some of thoseare LSP actions.

fwiw the ones that have no direct counterpart:

  • class_inflect: i think this generates interfaces from classes
  • context_menu: replaced by LSP
  • change_visibility: technically still on the list to port to LSP, although tbh I never bothered as it's so easy to do.
  • {move,copy}_class: There is some support for moving classes in LSP, although the "RPC" version does thison disk and I prefer it tbh.
  • navigate: not really something that fits into vanilla LSP - could be integrated as a custom LSP action and have support provided in the client (e.g. phpactor-vscode)
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
Ideas
Labels
None yet
2 participants
@bart-jaskulski@dantleech

[8]ページ先頭

©2009-2025 Movatter.jp