Coder Social home page Coder Social logo

Comments (20)

msankhala avatar msankhala commented on May 23, 2024 10

The solution provided in the above comments was not working for me. I have to add the following settings in settings.json

"intelephense.files.associations": ["*.php", "*.phtml", "*.inc", "*.module", "*.install", "*.theme", ".engine", ".profile", ".info", ".test"]

from vscode-intelephense.

jmsosso avatar jmsosso commented on May 23, 2024 3

All the day trying to figure out why this morning Intelephense was not indexing all my files. Last week it was working fine.
@msankhala solution worked for my Drupal project.

from vscode-intelephense.

calebporzio avatar calebporzio commented on May 23, 2024 1

Boom! fixed! thanks @zorfling. I had my file associations set for .php_cs files:

"files.associations": {
        ".php_cs": "php",
        ".php_cs.dist": "php"
    },

Everything is indexing fine now, thanks!

from vscode-intelephense.

la-jamesh avatar la-jamesh commented on May 23, 2024 1

I have added the following

"files.associations": {
        ".php_cs": "php",
        "*.php": "php"
    },

And I'm still seeing this when I try to index my laravel project.
screen shot 2018-05-21 at 4 26 59 pm

Anyone able to give me some more info?

EDIT: Turns out I needed to run the PHP Intelephense "Clear Cache and Reload" command.
screen shot 2018-05-23 at 1 50 34 pm

Then I was in business.

[Info  - 13:29:25] Initialising
[Info  - 13:29:30] Initialised in 4892 ms
[Info  - 13:29:30] Intelephense 0.8.6
[Info  - 13:29:30] Indexing started.
[Info  - 13:31:59] Indexing ended | 9630 files | 148.796 s

from vscode-intelephense.

bmewburn avatar bmewburn commented on May 23, 2024 1

I think it's best to open a new issue. Please add a code example and describe the actual problem.

from vscode-intelephense.

bmewburn avatar bmewburn commented on May 23, 2024

I'm not able to reproduce the issue. I created a fresh laravel project and it indexed around 4400 files. When editing the user model go to def, symbol search, completions all worked. Note that the extension will only index files in the open folder/workspace (and descendant folders). When a workspace has been previously indexed then only those files that have been modified outside of a vscode session will be reindexed. This is why it will quite often show 0 files indexed when reopening.

screenshot from 2017-11-25 22-09-27

from vscode-intelephense.

zorfling avatar zorfling commented on May 23, 2024

I had a similar issue, turned out I had

  "files.associations": {
    "*.inc": "php"
  }

And it was indexing only the *.inc files.

@bmewburn - is it correct that files.associations is meant to replace the file associations and so I would need to list *.php here too?

Anyway, can confirm either removing the files.associations or adding "*.php": "php" seems to fix this issue for me.

I wonder @calebporzio, does this solve your issue too?

from vscode-intelephense.

bmewburn avatar bmewburn commented on May 23, 2024

@zorfling that's correct. It will use the php file association values when finding files and default to *.php if there are none.

from vscode-intelephense.

chrisatomix avatar chrisatomix commented on May 23, 2024

Thanks for posting that fix, I was getting either 0 files or 19 files indexed on a Laravel app, until I updated my settings to this:

    "files.associations": {
        ".php_cs": "php",
        "*.php": "php"
    },

Much better!
image

from vscode-intelephense.

bmewburn avatar bmewburn commented on May 23, 2024

Next release I'll include *.php regardless of files.associations setting as this issue seems pretty common.

from vscode-intelephense.

zorfling avatar zorfling commented on May 23, 2024

Thanks @bmewburn

On further reading it seems like that might be how files.associations is supposed to work (an addition, not a replacement).

VS Code docs don't seem to suggest you need to add *.php in there as well.

Anyway, thanks very much! Loving Intelephense now it's indexing 👍

from vscode-intelephense.

lefrankleal avatar lefrankleal commented on May 23, 2024

I have added the following

"files.associations": {
        ".php_cs": "php",
        "*.php": "php"
    },

And I'm still seeing this when I try to index my laravel project.
screen shot 2018-05-21 at 4 26 59 pm

Anyone able to give me some more info?

EDIT: Turns out I needed to run the PHP Intelephense "Clear Cache and Reload" command.
screen shot 2018-05-23 at 1 50 34 pm

Then I was in business.

[Info  - 13:29:25] Initialising
[Info  - 13:29:30] Initialised in 4892 ms
[Info  - 13:29:30] Intelephense 0.8.6
[Info  - 13:29:30] Indexing started.
[Info  - 13:31:59] Indexing ended | 9630 files | 148.796 s

this worked for me, Clear Cache and Reload, thanks!

from vscode-intelephense.

marioawad avatar marioawad commented on May 23, 2024

As of now only the solution provided by @msankhala works!
However, some of the extensions are preceded with *. and other with just .
Is there are reason for that? (I did normalize to *. on my end and things are working fine).

from vscode-intelephense.

ctf0 avatar ctf0 commented on May 23, 2024

@bmewburn Clear Cache and Reload is not available anymore, if there away to force reindex the workspace ?

from vscode-intelephense.

bmewburn avatar bmewburn commented on May 23, 2024

@ctf0 it's now Index workspace

from vscode-intelephense.

ctf0 avatar ctf0 commented on May 23, 2024

@bmewburn using the command doesnt force the reindex "the ext output remains the same", i think this is related to the smart indexing that u mentioned earlier.
but what i expected is that the ext will remove the cache and start reindexing

from vscode-intelephense.

bmewburn avatar bmewburn commented on May 23, 2024

@ctf0 what is the issue you are trying to solve? The command above will start the workspace indexing and overwrite the cache.

from vscode-intelephense.

ctf0 avatar ctf0 commented on May 23, 2024

sometimes i can ctrl+click or get autocomplete for traits & the output i get always remains

[Info  - 1:26:36 AM] Initialising intelephense 1.0.14
[Info  - 1:26:36 AM] Reading state from c:\Users\abc\AppData\Roaming\Code\User\workspaceStorage\89758ba8bd8845fd29027fd75b534fb3\bmewburn.vscode-intelephense-client\72cba44c.
[Info  - 1:26:36 AM] Initialised in 161 ms
[Info  - 1:26:42 AM] Indexing started.
[Info  - 1:26:42 AM] Indexing ended. 3 files indexed in 0s.

so i thought using the command will clear all and give a different output

from vscode-intelephense.

bmewburn avatar bmewburn commented on May 23, 2024

The file count is just the number of files that needed to be indexed outside of what has already been indexed previously, not necessarily all files in the workspace. If it's not picking up all your files then make sure you have all the php file extensions that you use listed in the intelephense.files.associations setting. If you really want to make sure the cache is removed then you can manually delete the dir listed in the output.

from vscode-intelephense.

ctf0 avatar ctf0 commented on May 23, 2024
  • intelephense.files.associations settings is the default
  • i've also set "search.useIgnoreFiles": false, to include the vendor folder into the global goto
  • and i've removed all the folders under workspaceStorage and the output is now
[Info  - 1:42:53 AM] Initialising intelephense 1.0.14
[Info  - 1:42:53 AM] Initialised in 11 ms
[Info  - 1:42:53 AM] Indexing started.
[Info  - 1:43:08 AM] Indexing ended. 194 files indexed in 15s.
[Info  - 1:43:08 AM] Writing state to c:\Users\abc\AppData\Roaming\Code\User\workspaceStorage\89758ba8bd8845fd29027fd75b534fb3\bmewburn.vscode-intelephense-client\72cba44c.
[Info  - 1:43:08 AM] Wrote state in 0.2s.

which is definitely incorrect.

if there is something i can offer to help debug, plz do tell

from vscode-intelephense.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.