No longer working 'ffp no filepaths found'
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.
Hi bencrinkle.
Could you send me your Sublime Text build and Windows version too (About: Sublime Text)?
Thank you for your feedback.
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.
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');
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 ofrequire()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.
@sagold Same problem here.
And for the points:
- no, all files are in the same project
- yes
- yes
ffp_show_context:![]()
- 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"]
}
- errors: none
When trying to type path in src, it says in the status bar: FFP no file path found for xxx.
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 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.
@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
@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).
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.
@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>
@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?
@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?
@bencrinkle Thank you for sharing the insights and offering your workaround
@zmLGBBM I opened a specific issue for the script import here https://github.com/sagold/FuzzyFilePath/issues/20