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

No longer working 'ffp no filepaths found' #16

Open
bencrinkle opened this issue Sep 29, 2015 · 15 comments
Open

No longer working 'ffp no filepaths found' #16

bencrinkle opened this issue Sep 29, 2015 · 15 comments

Comments

@bencrinkle
Copy link

myself and a few other colleagues who have been using this package for a while have all recently noticed that it no longer works? It seems to be running but always fails with a 'no filepaths found' error bottom left. All using sublime text 3 on Windows.

@sagold
Copy link
Owner

sagold commented Sep 29, 2015

Hi bencrinkle.

Could you send me your Sublime Text build and Windows version too (About: Sublime Text)?

Thank you for your feedback.

@sagold sagold added the bug label Sep 29, 2015
@sagold
Copy link
Owner

sagold commented Sep 29, 2015

And i am curious if it is a problem with FFP. No filepaths found means FFP cannot match the given trigger. Is it possible you changed your syntax, import statements, etc? Could you also post the scope and import declaration you are trying to autocomplete?

Thanks again.

@bencrinkle
Copy link
Author

hi sagold it's Windows 10 pro Sublime Text 3083. The syntax is set as JavaScript and i'm trying to do...

var test = require('../../../test.js');

@sagold
Copy link
Owner

sagold commented Oct 11, 2015

Hi bencrinkle.

I tested your setup on a fresh install and it worked out of the box. I would suggest to remove and install FuzzyFilePath again via package control.

If the problem persists, the following points might help:

  • are files resolved in another project?
  • the current file is within the opened project
  • there is only one entry in your project settings "folders":[]"
  • add { "keys": ["alt+y"], "command": "ffp_show_context" }, to your key bindings and within the brackets of require() hit the shortcut. This will show you the details of the parameters used for evaluating the current path
  • if some of the settings might not be correct check the command palette for FuzzyFilePath: show current settings
  • check the console for errors

Let me know if you got some more details.

@Z-Clive
Copy link

Z-Clive commented Oct 14, 2015

@sagold Same problem here.

And for the points:

  1. no, all files are in the same project
  2. yes
  3. yes
  4. ffp_show_context:
    default
  5. current settings:
{
    "AUTO_TRIGGER": true,
    "BASE_DIRECTORY": false,
    "DEBUG": false,
    "DISABLE_AUTOCOMPLETION": false,
    "DISABLE_KEYMAP_ACTIONS": false,
    "ESCAPE_DOLLAR": "\\$",
    "EXCLUDE_FOLDERS": [
        "node\\_modules",
        "bower\\_components/.*/bower\\_components"
    ],
    "FFP_SETTINGS_FILE": "FuzzyFilePath.sublime-settings",
    "INSERT_ACTION": [
        "commit_completion",
        "insert_best_completion"
    ],
    "LOG": false,
    "POST_INSERT_MOVE_CHARACTERS": "^[\"'\\);]*",
    "PROJECT_DIRECTORY": "",
    "TRIGGER": [{
        "auto": true,
        "base_directory": false,
        "extensions": ["js"],
        "prefix": ["require", "define"],
        "relative": true,
        "replace_on_insert": [["\\.js$", ""], ["([^.])\\/index$", "\\1"] ],
        "scope": "source\\.js.*string"
    }, {
        "auto": true,
        "base_directory": true,
        "extensions": ["png", "gif", "jpg", "jpeg"],
        "prefix": ["src"],
        "relative": true,
        "scope": "source\\.js.*string"
    }, {
        "auto": true,
        "extensions": ["js"],
        "prefix": ["from"],
        "relative": true,
        "scope": "source\\.js"
    }, {
        "auto": true,
        "base_directory": true,
        "extensions": ["js", "png", "gif", "jpeg", "jpg", "svg"],
        "prefix": ["src", "url"],
        "relative": true,
        "scope": "meta.tag.*string.*\\.html"
    }, {
        "auto": true,
        "extensions": ["css"],
        "prefix": ["href"],
        "relative": true,
        "scope": "meta\\.tag.*string.*\\.html",
        "tagName": ["link"]
    }, {
        "auto": true,
        "base_directory": true,
        "extensions": ["png", "gif", "jpeg", "jpg", "woff", "ttf", "svg", "otf"],
        "prefix": ["url"],
        "relative": true,
        "scope": "meta\\.property.*\\.css"
    }, {
        "auto": true,
        "extensions": ["css", "scss", "less"],
        "prefix": ["import"],
        "relative": true,
        "replace_on_insert": [["\\.(scss|less)$", ""] ],
        "scope": ".*\\.(css|sass|less)"
    }, {
        "auto": false,
        "extensions": ["js", "html", "css", "scss", "less", "png", "gif", "jpeg", "jpg", "svg"],
        "relative": true,
        "scope": "source"
    }],
    "TRIGGER_ACTION": ["auto_complete", "insert_path"],
    "TRIGGER_STATEMENTS": ["prefix", "tagName", "style"]
}
  1. errors: none

When trying to type path in src, it says in the status bar: FFP no file path found for xxx.

@sagold
Copy link
Owner

sagold commented Oct 14, 2015

Strange. Even with the latest changes, FFP runs fine on my virtual-box/win10/ie11 install with the latest Sublime Text (portable) version.

I will look into it. Your project settings might help.

In the meantime you could add

    "debug": true,
    "log": true,

to your FFP-User-Settings and check the console for any hints.

@sagold sagold added the windows label Oct 14, 2015
@Z-Clive
Copy link

Z-Clive commented Oct 15, 2015

@sagold Well, I think I find out what's going on there. It works fine with the img and the style tag, but not script tag.

Well, in img or style tag, it says(search for these extensions):

FFP  search scan 89 files for i ['js', 'png', 'gif', 'jpeg', 'jpg', 'svg']
FFP  | => 2 completions found
FFP  

However, when in script tag, it says(search only for these extensions, without js):

FFP  search scan 89 files for c ['png', 'gif', 'jpg', 'jpeg']
FFP  | => 2 completions found
FFP  

Hopefully that would help.

@bencrinkle
Copy link
Author

@sagold I'm not working within a defined sublime project just an open folder which is how i've always done it. log just says...

FFP | => no valid files found for needle: a
FFP

@Z-Clive
Copy link

Z-Clive commented Oct 16, 2015

@sagold Well, it turns out the scope of <script src="..." ></script> is

text.html.basic source.js.embedded.html string.quote.double.html

I think that's why it does not complete the path there.

It applied this scope here:

        {
            // js - *.src = ""
            "scope": "source\\.js.*string",
            "prefix": ["src"],

            "auto": true,
            "base_directory": true,
            "extensions": ["png", "gif", "jpg", "jpeg"],
            "relative": true
        },

Also, require in js file works for me, but not src (scope: source.js string.quote.double.js).

@sagold
Copy link
Owner

sagold commented Oct 17, 2015

Hi.

We have to different problems here.

@bencrinkle Did you set debug to true? This should output the number of cached files. It may be that no files are indexed and thus no completions can be found. I would like to solve this issue, but as long as i cannot reproduce it locally i need some more information. I am also considering to add some more debugging helpers for this case.

@zmLGBBM the regex should match. Nevertheless i will try it out locally. Could you post a simple code example for using "src" in javascript?

Thank you for your help.

@Z-Clive
Copy link

Z-Clive commented Oct 17, 2015

@sagold I've noticed in the settings file, you've provided:

meta.tag.*string.*\\.html

to match the given scope (at least on my machine it says this)

text.html.basic source.js.embedded.html string.quote.double.html

I don't think that would match.

Yeah, sure, a sample html code, the link tag works fine, but not the script tag (which is also highlighted somehow in sublime):

  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
    <title></title>
    <!-- compiled css output -->
    <link href="css/ionic.app.css" rel="stylesheet">
    <!-- ionic/angularjs js -->
    <script src="lib/ionic/js/ionic.bundle.js"></script>
    <!-- cordova script (this will be a 404 during development) -->
    <script src="lib/ngCordova/dist/ng-cordova.js"></script>
    <script src="cordova.js"></script>
    <!-- your app's js -->
    <script src="js/app.js"></script>
    <script src="js/app.all.js"></script>
  </head>

@bencrinkle
Copy link
Author

@sagold just had a look at the console again and I'm getting a filenotfound error

FileNotFoundError: [WinError 3] The system cannot find the path specified:     'C:/Users/ben/Documents/Visual Studio 2013/Projects/Orsino/Orsino/Scripts\\Settings\\testing\\coverage\\PhantomJS 1.9.8 (Windows 8 0.0.0)\\Settings\\translated\\English-UnitedKingdom\\Apps\\Settings\\Components\\Account Settings\\Billing Details And Invoices\\Actions\\*.*'

can i manually exclude the coverage folder? how do i clear the cache?

@bencrinkle
Copy link
Author

@sagold don't worry...i read the manual :D added coverage to the excluded folders array and it now works as before! not sure what's causing the issue? maybe the path is too long?

@sagold
Copy link
Owner

sagold commented Oct 31, 2015

@bencrinkle Thank you for sharing the insights and offering your workaround

@sagold
Copy link
Owner

sagold commented Oct 31, 2015

@zmLGBBM I opened a specific issue for the script import here #20

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

3 participants