Commit Graph

65 Commits (master)

Author SHA1 Message Date
Hugo Thunnissen 44e109a5ac Add #'phpinspect-fix-imports to mode keymap 8 months ago
Hugo Thunnissen 81919175ca Implement stub index for builtin functions and types
Misc:
- Removed Cask in favor of dependency install script
- Rework makefile to provide simple build/install process
8 months ago
Hugo Thunnissen 5eae689f09 Add separate interactive function to refresh project autoloader
ci/woodpecker/push/woodpecker Pipeline failed Details
9 months ago
Hugo Thunnissen 2d29bce498 Apply overall code quality improvements
ci/woodpecker/push/woodpecker Pipeline failed Details
Even benchmarks and tests now compile without warnings or errors :)

This includes patches from Stefan Monnier:
- https://lists.gnu.org/archive/html/emacs-devel/2023-08/msg00548.html
9 months ago
Hugo Thunnissen ad4b1f25a6 Update copyright statements and apply some code style improvements
ci/woodpecker/push/woodpecker Pipeline failed Details
As suggested by Stefan Monniers patch:
 - https://mail.gnu.org/archive/html/emacs-devel/2023-08/msg00367.html
9 months ago
Hugo Thunnissen f1e4a5be7d Remove debug statement for company backend
ci/woodpecker/push/woodpecker Pipeline failed Details
9 months ago
Hugo Thunnissen 68c826243c Keep index synchronized with buffer state 9 months ago
Hugo Thunnissen db3ec3b67d Add custom variables for worker and pipeline pause time
ci/woodpecker/push/woodpecker Pipeline failed Details
9 months ago
Hugo Thunnissen e067a9e9dd Remove obsolete function and add some documentation to mode doc string
ci/woodpecker/push/woodpecker Pipeline failed Details
9 months ago
Hugo Thunnissen e4b62c0230 Implement completion-at-point function
ci/woodpecker/push/woodpecker Pipeline failed Details
9 months ago
Hugo Thunnissen fbfcf4f928 Fix byte compilation warnings
ci/woodpecker/push/woodpecker Pipeline failed Details
9 months ago
Hugo Thunnissen 55413ea9fb Implement basic support for function indexation and include dirs
ci/woodpecker/push/woodpecker Pipeline failed Details
Does not yet include support for imported namespaced functions
9 months ago
Hugo Thunnissen 05ca0ace20 Fix all remaining byte compiler warnings
ci/woodpecker/push/woodpecker Pipeline failed Details
9 months ago
Hugo Thunnissen c20df819b8 Give `phpinspect-buffer' responsibility over buffer indexation
ci/woodpecker/push/woodpecker Pipeline failed Details
9 months ago
Hugo Thunnissen f003b6a279 Make project indexation asynchronous using `phpinspect-pipeline'
ci/woodpecker/push/woodpecker Pipeline failed Details
9 months ago
Hugo Thunnissen 2099abced8 Add Cask configuration and fix some compilation warnings
ci/woodpecker/push/woodpecker Pipeline failed Details
9 months ago
Hugo Thunnissen b68baaec83 Make parse context cancellable and restore state after interrupt 9 months ago
Hugo Thunnissen c35c00ceff Implement strategy pattern for completion backend
ci/woodpecker/push/woodpecker Pipeline was successful Details
9 months ago
Hugo Thunnissen d1d34a4249 Move more functionalities from main file to separate modules 9 months ago
Hugo Thunnissen bb04e9a0f8 Implement strategy pattern for phpinspect-eldoc-function 9 months ago
Hugo Thunnissen 1ec0e0cfa2 Limit token lookback range and start completion from the first non-blank character
ci/woodpecker/push/woodpecker Pipeline was successful Details
When editing files where tokens occur sparingly, like in HTML templates, looking
back for the last token that occured is very expensive and never useful.
9 months ago
Hugo Thunnissen 5548734ef7 Implement parser interruption on user input
ci/woodpecker/push/woodpecker Pipeline was successful Details
10 months ago
Hugo Thunnissen ad5ede01ad Implement Incremental Parsing
ci/woodpecker/push/woodpecker Pipeline was successful Details
10 months ago
Hugo Thunnissen f9f3440850 Make file contents insertion asynchronous in background threads
ci/woodpecker/push/woodpecker Pipeline was successful Details
This allows for a more lenient pausing regime in the worker thread, as file
content insertion, which is the longest running action while indexing, no longer
makes the main thread wait.

Implementation uses host system's cat program, but defers to
insert-file-contents when this is not available.
10 months ago
Hugo Thunnissen 47335f3450 Refactor phpinspect--project to phpinspect-project
ci/woodpecker/push/woodpecker Pipeline was successful Details
10 months ago
Hugo Thunnissen 9882ed2c60 Test/fix type inference of objects in nested arrays
continuous-integration/drone/push Build was killed Details
1 year ago
Hugo Thunnissen f030a685d2 Alter interpret-expression-type to interpret array-member assignment
continuous-integration/drone/push Build was killed Details
interpret-expression-type now interprets assignment values provided through
array access as derived statements. This makes type inference work for cases
like `[$foo[0]]`, where it did not before.
1 year ago
Hugo Thunnissen 8cd4dc2025 Remove commented code + tidy some formatting 1 year ago
Hugo Thunnissen 224bbd7916 Implement array member type inference
phpinspect now understands typed arrays!
1 year ago
Hugo Thunnissen ae3acbdbe1 Disable auto-reindexing by default
continuous-integration/drone/push Build is passing Details
2 years ago
Hugo Thunnissen dbf0ec0390 Transition from index script to autoloader
continuous-integration/drone/push Build is failing Details
2 years ago
Hugo Thunnissen ca8d0972ff Implement psr-0 and psr-4 autoloaders 2 years ago
Hugo Thunnissen 56eaa3b36d Replace index-thread with more generic and encapsulated worker type
continuous-integration/drone/push Build is failing Details
The new implementaiton makes the background thread more extensible in terms of
the types of tasks that it can execute. It also allows for the injection of a
worker as dependency of project instances, which will make automated testing
easier in the future.
2 years ago
Hugo Thunnissen 0bc9e795b2 Fix tests and patch bugs that came to light in the process 2 years ago
Hugo Thunnissen 0b210309e7 Fix variable suggestion when there are loose dollar signs in the buffer 2 years ago
Hugo Thunnissen c0786db131 WIP: Index every possibly required type ahead of time.
- Changed project and after-save-action implementation to include imports in
  opened files. This way any types that are used in a file will have completion
  available for it ahead of time.
- Extra attributes have been added to phpinspect--class to check whether or not
  its file has been indexed/is queued for indexation yet.
- Misc: Fixed eldoc function bug that was caused by a previous commit
2 years ago
Hugo Thunnissen 2e487e7810 Fix resolving of function argument types 2 years ago
Hugo Thunnissen 341afd42da WIP: Index types in the background using collaborative threading.
Created queue for types to be indexed in separate thread and tried to limit
lock-ups as much as possible by using idle timers.
2 years ago
Hugo Thunnissen f013b3c709 WIP: Support ambiguous typehints
- Try to infer type of "object" typehint by using the return annotation
- Support late static binding with "static" and "this" return type
2 years ago
Hugo Thunnissen f8bf0b611a WIP: List static methods when requested 2 years ago
Hugo Thunnissen 98e88d45ac WIP: Fix find-class-file 2 years ago
Hugo Thunnissen e07e1ed9e6 WIP: Split code up into separate files 2 years ago
Hugo Thunnissen 74bd0ad434 WIP: New data type for cached classes 2 years ago
Hugo Thunnissen a60dba5f11 WIP: new struct to represent types, and string comparison optimization with obarray 2 years ago
Hugo Thunnissen 2b85271b2b Test + fix get-last-statement-in-token for static attribute references 3 years ago
Hugo Thunnissen 6b8db3a318 Test and fix eldoc function for static methods
Add tests for
- phpinspect-eldoc-function in the context of static attribute and object attribute references
- phpinspect-resolve-type-from-context in the context of static attribute references

Fix:
- phpinspect-get-derived-statement-type-in-block
3 years ago
Hugo Thunnissen f5fe299c01 Make functions that access the filesystem configurable and add test
Add test for `phpinspect-resolve-type-from-context'
3 years ago
Hugo Thunnissen a6bb09b2b3 Test and fix static function indexation 3 years ago
Hugo Thunnissen faa936a4f0 Test type-resolver + make type resolving work for "blocked" namespaces
Test type-resolver created from resolvecontext with:
 - File containing single namespace and no block
 - File containing one namespace with a block ('{}')
 - File containing multiple namespaces with blocks

Patch `phpinspect--make-type-resolver-for-resolvecontext' to support namespaces with
blocks.
3 years ago
Hugo Thunnissen 1e4e865c9b Add variables nested in (function or other) blocks to candidates 3 years ago