Features
A long list of things I want to have.
Hover
- Show hover text (phpdocs)
Go to
- Go to definition
- Go to declaration
- Go to type
Completion
- Auto-complete with symbols, functions, methods, classes, etc.
-
Smart auto-complete that prioritizes items that fit (e.g. if a function parameter requires an
int
then it would put symbols that match the typeint
at the top)
Code actions
-
Convert most forms of
<?php echo ... ?>
into<?= ... ?>
- Convert function calls into function calls with named parameters, while removing redundant default arguments
- Convert an applicable for loop over an array into an equivalent foreach loop
- Refactor selected code into a function
Diagnostics
-
Undefined variables
- Variables that aren't assigned
- Variables created via a pass-by-reference function call
- Warn of variables created in a loop that could be moved out of it
- Duplicate namespace aliases
Feature flags
- Make sure that certain categories of diagnostics can be disabled via configurations
References
Discussions
Reddit. Link Rust Analyzer author overall tips on implementation and list of features ranked from time-consuming to very-time-consuming, on the time scale of months/years.
LSPs written in Rust
Rust Analyzer. Link. Rust Analyzer itself. Enough said.
phpls-rs. Link. Archive of someone else's attempt at this exact problem without treesitter.
pylyzer. Link. Python LSP in Rust. Somewhat mature (in comparison with the PHP attempt), but still missing a large amount of features.