Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Completions are not suggested and fix doesn't work #30

Open
Cooperdale opened this issue Jun 23, 2016 · 12 comments
Open

Completions are not suggested and fix doesn't work #30

Cooperdale opened this issue Jun 23, 2016 · 12 comments

Comments

@Cooperdale
Copy link

Cooperdale commented Jun 23, 2016

Hi, I'm on Windows and latest version of Sublime. I get suggestions only if I force them, I tried the "scopes" fix adding this to the user settings:

{
    "scopes": [
        {
            "scope": ".",
            "auto": true,
            // add your extensions here:
            "extensions": ["css", "html", "js"]
        }
    ]
}

but it doesn't work. If I use keyboard shortcuts to insert paths it works. Can somebody help me with this?

@Cooperdale
Copy link
Author

Anyone?

@sagold
Copy link
Owner

sagold commented Jun 25, 2016

Hi Cooperdale.

Your settings seem correct for testing purposes. With auto: true, FuzzyFilePath responds to Sublimes completion query. Testing the above setting, Sublime does not trigger autocompletions in some html contexts, but within a css-file i immediately receive a popup. Maybe it would help testing it in a stylesheet file.

In any case, check the console for notifications or errors. But since it basically works, you should set debug: true in your FFP settings to receive some more information. To evaluate your current context (cursor position) you could also open a popup with more description as described here.

@Cooperdale
Copy link
Author

Thanks for the answer. It actually doesn't come up with css either, but I think it comes from some bigger problem, since suggestions don't automatically show up for css rules either. I have to press Ctrl+Alt+Space each time. That's strange because it's a new and totally clean install.

@sagold
Copy link
Owner

sagold commented Jun 28, 2016

Hi Cooperdale.

Just wondering, are the default completions (words occuring in the texfile or completion-list) opened? You can force them by control + space. Does your console show any relevant messages or errors?

@gautamz07
Copy link

@sagold ctrl + space also does't work :(

@jiayihu
Copy link

jiayihu commented Sep 5, 2016

Doesn't work for me too now. The console shows:

FFP  PROJECT rebuild filecache of  
FFP  cache START adding files in 
Exception in thread Thread-7:
Traceback (most recent call last):
  File "./python3.3/threading.py", line 901, in _bootstrap_inner
  File "project.FileCacheWorker in /Users/jiayi/Library/Application Support/Sublime Text 3/Installed Packages/FuzzyFilePath.sublime-package", line 33, in run
  File "project.FileCacheWorker in /Users/jiayi/Library/Application Support/Sublime Text 3/Installed Packages/FuzzyFilePath.sublime-package", line 49, in read
FileNotFoundError: [Errno 2] No such file or directory: ''

@sagold
Copy link
Owner

sagold commented Sep 10, 2016

@jiayihu is it possible that you have an invalid entry in your project settings? Something like

{
    "folders":
    [
        {
            "path": "."
        },
        {
            "path": ""
        }

@jiayihu
Copy link

jiayihu commented Sep 10, 2016

@sagold As far as I know I dont' have any project settings or .sublime-project file inside the folder, but it may be something related to the settings.

This is a more detailed console error:

FFP -WARNING-    PROJECT project directory in settings in not a valid folder
FFP  PROJECT new project created 
FFP  PROJECT Base directory at ''
FFP  cache START adding files in 
Exception in thread Thread-13:
Traceback (most recent call last):
  File "./python3.3/threading.py", line 901, in _bootstrap_inner
  File "project.FileCacheWorker in /Users/jiayi/Library/Application Support/Sublime Text 3/Installed Packages/FuzzyFilePath.sublime-package", line 33, in run
  File "project.FileCacheWorker in /Users/jiayi/Library/Application Support/Sublime Text 3/Installed Packages/FuzzyFilePath.sublime-package", line 49, in read
FileNotFoundError: [Errno 2] No such file or directory: ''

@sagold
Copy link
Owner

sagold commented Sep 10, 2016

The first line FFP -WARNING- PROJECT project directory in settings in not a valid folder refers to an invalid project_directory either in the user settings or some weird state that causes the directory to be empty.

Could you check your settings files for an entry "project_directory": "". This should either be an empty string or any valid folder (relative, based from your opened folder as is "app")? If it is missing, add it If everything seems fine, i require some detailed information:

  • sublime version
  • os
  • opened folderpath
  • multiple folders?

Thanks.

@sagold
Copy link
Owner

sagold commented Sep 11, 2016

@Cooperdale sublime may be further configured to open the autocompletion panel: https://www.granneman.com/webdev/editors/sublime-text/top-features-of-sublime-text/auto-completion-in-sublime-text/. i.e.

"auto_complete_triggers":
[
    {
        "characters": "abcdefghijklmnopqrstuvwxyz",
        "selector": "string.quoted.double.html"
    }
]

@Cooperdale
Copy link
Author

Cooperdale commented Sep 16, 2016

@sagold Thanks, after tinkering with those autocompletion setting it works quite better.
One more question, probably off topic but I have to ask: why does the plugin had a "/" in front of every root subfolder? That is, if I tell the plugin to go with "images/blog01.jpg", it will actually write "/images/blog01.jpg" and the image will not show on the page.

@sagold
Copy link
Owner

sagold commented Jan 20, 2017

Absolute paths start with a / to prevent any misinterpretation. adding a regex to replace_on_insert should work around the other cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants