Skip to content

Commit 2077007

Browse files
fix #54
1 parent f7784f0 commit 2077007

File tree

5 files changed

+189
-7
lines changed

5 files changed

+189
-7
lines changed

changelog/0.16.16.txt

Lines changed: 179 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,179 @@
1+
v0.16.16
2+
3+
## Fixes
4+
5+
- Fixed "Autocompletion does not work on files with non-latin chars" #54
6+
7+
8+
v0.16.15
9+
10+
## Improvements
11+
12+
- Updated flow-bin to 0.72.0
13+
14+
15+
v0.16.14
16+
17+
## Fixes
18+
19+
- Try to solve "Interoperability with sublimelinter" #47
20+
21+
## Improvements
22+
23+
- Updated flow-bin to 0.71.0
24+
25+
26+
v0.16.13
27+
28+
## Fixes
29+
30+
- Fixed "How to install flow typings?" #48
31+
32+
## Improvements
33+
34+
- Updated flow-bin to 0.70.0
35+
- Updated flow-typed to 2.4.0
36+
37+
38+
v0.16.12
39+
40+
## Fixes
41+
42+
- Trying to fix #41
43+
- Fixed "Plugin not honouring ST3 user settings - show_definitions" #42
44+
45+
## Improvements
46+
47+
- Updated flow-bin to 0.69.0
48+
- Improved unused variable feature
49+
50+
51+
v0.16.11
52+
53+
## Fixes
54+
55+
- Trying to fix #41
56+
57+
## Improvements
58+
59+
- Updated flow-bin to 0.68.0
60+
61+
62+
v0.16.1
63+
64+
## Fixes
65+
66+
- Fixed NameError: global name 'subprocess' is not defined on /src/libs/terminal.py - Windows OS
67+
- Fixed NoneType error on self.completions.append(completion) in /src/listeners/completion.py
68+
69+
70+
v0.16.0
71+
72+
## Fixes
73+
74+
- Fixed jsdoc generate command
75+
- Fixed error on refactor safe commands when the file name is empty
76+
- Fixed export refactor feature preview
77+
- Fixed some popup colors with different theme color scheme
78+
- Fixed completions and hover_description that starts with "$"
79+
- Fixed issue #36, keymap of next flow error feature changed from "super+alt+c" to "super+alt+b"
80+
81+
## Improvements
82+
83+
- Complete code plugin refactoring
84+
- Improved completions performance using 'flow ide' command
85+
- Added "code screenshot" feature using [carbon](https://carbon.now.sh/)
86+
- updated flow-bin to 0.67.1
87+
- Added initial support for Vue.js (see https://github.com/pichillilorenzo/JavaScriptEnhancements/wiki/Example-Vue.js-project)
88+
- Improved extract method feature
89+
- Improved completions detection from default_autocomplete.json
90+
- Added Flow warnings
91+
- Improved unused variable feature
92+
93+
## Misc
94+
- Changed gutter color (using other available sublime scopes) for errors and unused variable features.
95+
96+
=================================================================
97+
** THIS PLUGIN IS IN BETA! Thanks for your support in advance! **
98+
=================================================================
99+
100+
If you like it, remember to star it ⭐ on GitHub: https://github.com/pichillilorenzo/JavaScriptEnhancements
101+
102+
** USAGE **
103+
===========
104+
105+
See how it works on the Wiki: 👉👉 https://github.com/pichillilorenzo/JavaScriptEnhancements/wiki 👈👈
106+
107+
108+
** WHAT IS THIS? **
109+
===================
110+
111+
This plugin uses Flow (javascript static type checker from Facebook) under the hood.
112+
113+
It offers better javascript autocomplete and a lot of features about creating,
114+
developing and managing javascript projects, such as:
115+
116+
- Cordova projects (run cordova emulate, build, compile, serve, etc. directly from Sublime Text!)
117+
- Ionic v1 and v2 (it includes also v3) projects (same as Cordova projects!)
118+
- Angular v1 and v2 (it includes also v4 and v5) projects
119+
- Vue projects (only about the creation at this moment, see https://github.com/pichillilorenzo/JavaScriptEnhancements/wiki/Example-Vue.js-project)
120+
- React projects (only about the creation at this moment)
121+
- React Native projects (only about the creation at this moment. I will add also NativeScript support)
122+
- Express projects (only about the creation at this moment)
123+
- Yeoman generators
124+
- Local bookmarks project
125+
- JavaScript real-time errors
126+
- Code Refactoring
127+
- etc.
128+
129+
You could use it also in existing projects (see the Wiki - https://github.com/pichillilorenzo/JavaScriptEnhancements/wiki/Using-it-with-an-existing-project)!
130+
131+
It turns Sublime Text into a JavaScript IDE like!
132+
133+
This project is based on my other Sublime Text plugin JavaScript Completions (https://github.com/pichillilorenzo/JavaScript-Completions)
134+
135+
** NOTE **
136+
If you want use this plugin, you may want uninstall/disable the JavaScript Completions plugin, if installed.
137+
138+
** OS SUPPORTED **
139+
==================
140+
141+
👉 Linux (64-bit)
142+
👉 Mac OS X
143+
👉 Windows (64-bit): released without the use of TerminalView plugin. For each feature (like also creating a project) will be used the cmd.exe shell (so during the creation of a project don't close it until it finishes!). Unfortunately the TerminalView plugin supports only Linux-based OS 😞. Has someone any advice or idea about that? Is there something similar to the TerminalView plugin for Windows?? Thanks!
144+
145+
❗❗ Dependencies ❗❗
146+
=======================
147+
148+
In order to work properly, this plugin has some dependencies:
149+
150+
👉 Sublime Text 3 (build 3124 or newer)
151+
👉 Node.js and npm (https://nodejs.org or nvm (https://github.com/creationix/nvm))
152+
👉 TerminalView (only for Linux and Mac OS X) sublime text plugin (https://github.com/Wramberg/TerminalView)
153+
154+
Not required, but useful for typescript files (Flow wont work on this type of files):
155+
156+
👉 TypeScript sublime text plugin (https://github.com/Microsoft/TypeScript-Sublime-Plugin)
157+
158+
** Flow Requirements **
159+
=======================
160+
161+
It use [Flow](https://github.com/facebook/flow) for type checking and auto-completions.
162+
163+
👉 Mac OS X
164+
👉 Linux (64-bit)
165+
👉 Windows (64-bit)
166+
167+
Email me for any questions or doubts about this new project on: pichillilorenzo@gmail.com
168+
169+
** Donation **
170+
==============
171+
172+
If this project help you reduce time to develop and also you like it, please support it with a donation 😄👍. Thanks!
173+
174+
Open Collective: https://opencollective.com/javascriptenhancements/donate
175+
PayPal: https://www.paypal.me/LorenzoPichilli
176+
177+
Thanks anyway for your support! 😄😄
178+
179+
MIT License

messages.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,6 @@
2525
"0.16.12": "changelog/0.16.12.txt",
2626
"0.16.13": "changelog/0.16.13.txt",
2727
"0.16.14": "changelog/0.16.14.txt",
28-
"0.16.15": "changelog/0.16.15.txt"
28+
"0.16.15": "changelog/0.16.15.txt",
29+
"0.16.16": "changelog/0.16.16.txt"
2930
}

src/libs/flow/flow_ide_server.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,10 @@ def stop(self):
8787
del flow_ide_clients[self.root]
8888

8989
def prepare_json_rpc_message(self, json_rpc):
90-
json_rpc = json.dumps(json_rpc)
91-
message = """Content-Length: """ + str(len(json_rpc) + 1) + """
90+
json_rpc = json.dumps(json_rpc, ensure_ascii=False)
91+
# number of bytes in a string
92+
json_rpc_length = len(json_rpc.encode('utf-8'))
93+
message = """Content-Length: """ + str(json_rpc_length + 1) + """
9294
9395
""" + json_rpc + """
9496
"""
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
[{"id": "tools", "caption": "Tools", "children": [{"id": "npm_scripts", "caption": "Npm/Yarn Scripts", "children": []}]}]
1+
[{"id": "tools", "children": [{"id": "npm_scripts", "children": [], "caption": "Npm/Yarn Scripts"}], "caption": "Tools"}]

tests/test_completions.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def test_completions(self):
3535
else:
3636
raise TimeoutError("plugin is not ready in " + str(timeout) + " seconds")
3737

38-
self.view.run_command("insert", {"characters": "\ndocument."})
38+
self.view.run_command("insert", {"characters": "document.querySelector('嗨');\ndocument."})
3939

4040
JavascriptEnhancementsStartFlowIDEServerEventListener().start_server(self.view)
4141
self.view.run_command("auto_complete")
@@ -56,6 +56,6 @@ def test_completions(self):
5656

5757
self.view.run_command("commit_completion")
5858

59-
content = self.view.substr(sublime.Region(1, self.view.size()))
59+
content = self.view.substr(sublime.Region(0, self.view.size()))
6060

61-
self.assertEqual(content, "document.URL")
61+
self.assertEqual(content, "document.querySelector('嗨');\ndocument.URL")

0 commit comments

Comments
 (0)