deanishe / alfred-sublime-text

Filter and open your Sublime Text (2 and 3) project files from Alfred.
MIT License
73 stars 10 forks source link

Cannot find projects #32

Closed redgluten closed 4 years ago

redgluten commented 4 years ago

I just setup a new computer and followed the instructions for Catalina, the workflow runs but is unable to find projects, I can see them myself in ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/User/Projects. Here’s the log for rescanning:

09:36:56 workflow.go:335: --- Sublime Text Projects/3.1.1 (AwGo/0.20.2) ----
09:36:56 util.go:57: 457.446µs ⧗ load config
09:36:56 main.go:62: &main.options{Search:false, Config:false, Ignore:false, Open:false, OpenProject:false, OpenFolder:false, Rescan:true, Force:true, Query:""}
09:36:56 main.go:64: args=[]string{"-rescan", "-force"} => []string{}
09:36:56 main.go:65: (*main.config)(0xc0000a4480)({
 FindInterval: (time.Duration) 5m0s,
 MDFindInterval: (time.Duration) 5m0s,
 LocateInterval: (time.Duration) 24h0m0s,
 VSCode: (bool) false,
 Excludes: ([]string) <nil>,
 Depth: (int) 2,
 SearchPaths: ([]*main.searchPath) {
 }
})
09:36:56 scan.go:133: [find] reloading ...
09:36:56 scan.go:133: [mdfind] reloading ...
09:36:56 scan.go:133: [locate] reloading ...
09:36:56 scan.go:460: [cache] saved 0 project(s) to sublime-projects-find.txt
09:36:56 scan.go:350: [locate] command failed: <nil>
09:36:56 util.go:57: 5.668752ms ⧗ locate scan
09:36:56 scan.go:460: [cache] saved 0 project(s) to sublime-projects-locate.txt
09:36:56 util.go:57: 248.437604ms ⧗ mdfind scan
09:36:56 scan.go:460: [cache] saved 0 project(s) to sublime-projects-mdfind.txt
09:36:56 scan.go:157: 0 total project(s) found
09:36:56 workflow.go:416: ------------------ 252.191232ms ------------------
[09:36:56.811] Sublime Text Projects[Run Script] Processing complete
[09:36:56.812] Sublime Text Projects[Run Script] Passing output 'Scan complete' to Post Notification
deanishe commented 4 years ago
SearchPaths: ([]*main.searchPath) {
 }

You haven't configured any paths to search.

Out-of-the-box, the workflow won't find any projects in ~/Library because it's not indexed by Spotlight (so mdfind find them), and the locate database isn't turned on.

You'll have to specifically configure the workflow to look there, as described in the README.

redgluten commented 4 years ago

My bad, I had tried something to that effect too but somehow I made a mistake in the configuration, probably the [[paths]] headers. You might want to consider another format for the settings? Sublime Text does not come with TOML support out of the box so the “Edit config file“ action will not work on most machines. Anyway thanks for the great work, this workflow is critical to me! 👏👏👏