SwiftKitten
SwiftKitten copied to clipboard
Autocomplete not working, but different issue than #2
Like issue #2, autocomplete doesn't work for me, except the errors I'm getting are different. Here are the logs:
First, when loading:
WARNING:root:failed to import yajl2_cffi backend for ijson. reverting to pure python backend.
(even after following directions to build)
After every keypress, I get:
Traceback (most recent call last):
File "/Users/saagarjha/Library/Application Support/Sublime Text 3/Packages/SwiftKitten/SwiftKitten.py", line 160, in handle_timeout
self.handle_timeout(view)
File "/Users/saagarjha/Library/Application Support/Sublime Text 3/Packages/SwiftKitten/SwiftKitten.py", line 112, in handle_timeout
self.on_idle(view)
File "/Users/saagarjha/Library/Application Support/Sublime Text 3/Packages/SwiftKitten/SwiftKitten.py", line 118, in on_idle
structure_info = self._get_structure_info(view)
File "/Users/saagarjha/Library/Application Support/Sublime Text 3/Packages/SwiftKitten/SwiftKitten.py", line 281, in _get_structure_info
cmd = self.get_structure_info_cmd(view, text)
File "/Users/saagarjha/Library/Application Support/Sublime Text 3/Packages/SwiftKitten/SwiftKitten.py", line 269, in get_structure_info_cmd
"sourcekitten_binary", "sourcekitten")
File "/Users/saagarjha/Library/Application Support/Sublime Text 3/Packages/SwiftKitten/SwiftKitten.py", line 244, in get_settings
return project_data.get(key, settings.get(key, default))
AttributeError: 'NoneType' object has no attribute 'get'
When you open Sublime with no project file, then project_data returns None. I'll add a fix for this.
Would project_data = view.window().project_data() or {} be a good enough fix?
Also getting the same issue on Build 3114.
Getting the same issue on ST3 Build 3126. No project, learn swift with single file and cli.