atishay / vscode-allautocomplete

Autocomplete from open files for VSCode
MIT License
105 stars 25 forks source link

Autocompletion from specified file #15

Closed ghost closed 6 years ago

ghost commented 6 years ago

Hi, It would be nice to have an autocompletion based on specified file (from disk or by URL). For example, in settings, I'd like to specify certain file, which provides list of words used for autocompletion.

atishay commented 6 years ago

Good Idea. I have added to the backlog

atishay commented 6 years ago

Added support in 0.0.12. You can use AllAutocomplete.wordListFiles

erikverheij commented 6 years ago

Hi! Thx for this great extension :). Could you provide some examples on how to specify wordListFiles? I can't get it to work :( I'd like to include all files my project's app folder.

{
    "folders": [
        {
            "path": "C:\\repos\\project"
        }
    ],
    "settings": {
        "AllAutocomplete.wordListFiles": [
            "app"
        ]
    }
}
atishay commented 6 years ago

@erikverheij The wordListFiles are meant to be text files whose absolute path is specified in the settings. The extension does not directly read anything from disk and tried to use VSCode APIs for everything. Internally it is loading all those files in VSCode and therefore having a folder there would not be ideal. It would require a different implementation (See Ctags).

There are CTag extensions for VSCode. Adding that to this extension seems like an overkill. I have added an investigative item to the todo list(not sure when I can get to that). PRs are welcome.

max-kalganov commented 5 years ago

Hi! It would be great, if I can set extension to search in all files in the opened folder. Or how can I do the same thing now?