Skip to content

Commit

Permalink
sys jump change
Browse files Browse the repository at this point in the history
  • Loading branch information
jim committed Mar 25, 2024
1 parent 40be19d commit 5b319bc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 43 deletions.
32 changes: 2 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -428,38 +428,10 @@ filter result is:

`2.php` `31.php` will be ignored during tag generation;

Laravel example:

```json
{
"filter": {
"php-file-ext-list": [
"php"
],
"php-path-list": [
"./app",
"./database",
"./vendor/laravel/framework/src/Illuminate"
]
}
}
```

You can also add the standard php library with [phpstorm stubs][:phpstorm-stubs:].
Assuming you cloned this repo into `/usr/local/src/phpstorm-stubs` you base configuration will be:

```json
{
"filter": {
"php-file-ext-list": [
"php"
],
"php-path-list": [
".",
"/usr/local/src/phpstorm-stubs"
]
}
}
```
composer require jetbrains/phpstorm-stubs
```

### Rebuilding tags
Expand Down
17 changes: 4 additions & 13 deletions ac-php-core.el
Original file line number Diff line number Diff line change
Expand Up @@ -2416,7 +2416,7 @@ although in fact they may not be."
(interactive "P")
;; 检查是类还是 符号
(let ((tags-data (ac-php-get-tags-data))
symbol-ret type jump-pos local-var local-var-flag)
symbol-ret type jump-pos local-var local-var-flag (jump-flag t ) )
(setq local-var (ac-php-get-cur-word-with-dollar))
(setq local-var-flag (s-matches-p "^\\$" local-var))

Expand Down Expand Up @@ -2452,18 +2452,9 @@ although in fact they may not be."
(cond
((s-matches-p "sys" (nth 0 tmp-arr))
(let((sys-item-name (aref (nth 3 symbol-ret) 1))) ;; system function
;; \trim(=> trim
(if (string= type "user_function")
(setq sys-item-name
(substring-no-properties
sys-item-name 1
(if (string= "(" (substring sys-item-name -1))
-1 nil)))
;; class name
(setq sys-item-name (nth 2 symbol-ret)))
(if (fboundp 'php-search-documentation)
(php-search-documentation sys-item-name)
(message "Unable to find php-search-documentation function"))))
(goto-char (1+ (point)))
(message "need install : composer require jetbrains/phpstorm-stubs ")
))
(t
(let ((file-list (ac-php-g--file-list tags-data)))
;; from get index
Expand Down

0 comments on commit 5b319bc

Please sign in to comment.