Skip to content

Commit 8adc7fa

Browse files
committed
Merge branch 'tooltips' of https://github.com/Microsoft/TypeScript-Sublime-Plugin into tooltips
2 parents 43680bb + 4641013 commit 8adc7fa

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+272
-180
lines changed

Default.sublime-keymap

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -136,57 +136,6 @@
136136

137137
]
138138
},
139-
{
140-
"keys": [ "}" ],
141-
"command": "typescript_format_on_key",
142-
"args": { "key": "}" },
143-
"context": [
144-
{ "key": "selector", "operator": "equal", "operand": "source.ts" },
145-
{ "key": "setting.typescript_auto_format", "operator": "equal", "operand": true },
146-
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
147-
{ "key": "num_selections", "operator": "equal", "operand": 1},
148-
{ "key": "selection_empty", "operator": "equal", "operand": true },
149-
150-
{ "key": "preceding_text", "operator": "not_regex_contains", "operand": "\\{$" },
151-
{ "key": "following_text", "operator": "not_regex_contains", "operand": "^\\}" }
152-
]
153-
},
154-
// In case when auto match is disabled, format the block regardless
155-
{
156-
"keys": [ "}" ],
157-
"command": "typescript_format_on_key",
158-
"args": { "key": "}" },
159-
"context": [
160-
{ "key": "num_selections", "operator": "equal", "operand": 1},
161-
{ "key": "setting.typescript_auto_format", "operator": "equal", "operand": true },
162-
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
163-
{ "key": "selector", "operator": "equal", "operand": "source.ts" },
164-
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": false }
165-
]
166-
},
167-
{
168-
"keys": [ ";" ],
169-
"command": "typescript_format_on_key",
170-
"args": { "key": ";" },
171-
"context": [
172-
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
173-
{ "key": "setting.typescript_auto_format", "operator": "equal", "operand": true },
174-
{ "key": "selector", "operator": "equal", "operand": "source.ts" }
175-
]
176-
},
177-
{
178-
"keys": [ "enter" ],
179-
"command": "typescript_format_on_key",
180-
"args": { "key": "\n" },
181-
"context": [
182-
{ "key": "setting.typescript_auto_indent", "operator": "equal", "operand": true },
183-
{ "key": "auto_complete_visible", "operator": "equal", "operand": false },
184-
{ "key": "selector", "operator": "not_equal", "operand": "meta.scope.between-tag-pair" },
185-
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
186-
{ "key": "num_selections", "operator": "equal", "operand": 1},
187-
{ "key": "selector", "operator": "equal", "operand": "source.ts" }
188-
]
189-
},
190139
{
191140
"keys": [ "enter" ],
192141
"command": "typescript_go_to_ref",

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
TypeScript Plugin for Sublime Text
22
==================================
33

4+
[![Join the chat at https://gitter.im/Microsoft/TypeScript-Sublime-Plugin](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/Microsoft/TypeScript-Sublime-Plugin?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
5+
46
The plugin uses an IO wrapper around the TypeScript language services to provide
57
an enhanced Sublime Text experience when working with TypeScript code.
68

TypeScript Indent.YAML-tmPreferences

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# [PackageDev] target_format: plist, ext: tmPreferences
2+
---
3+
name: TypeScript Indent
4+
uuid: 77966fa8-af34-4f1e-8535-e556d5063853
5+
scope: source.ts
6+
settings:
7+
bracketIndentNextLinePattern:
8+
>
9+
(?x)
10+
^ \s* \b(if|while|else)\b [^;]* $
11+
| ^ \s* \b(for)\b .* $
12+
decreaseIndentPattern: ^(.*\*/)?\s*\}.*$
13+
increaseIndentPattern: ^.*\{[^}"']*$

TypeScript Indent.tmPreferences

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>name</key>
6+
<string>TypeScript Indent</string>
7+
<key>scope</key>
8+
<string>source.ts</string>
9+
<key>settings</key>
10+
<dict>
11+
<key>bracketIndentNextLinePattern</key>
12+
<string>(?x)
13+
^ \s* \b(if|while|else)\b [^;]* $
14+
| ^ \s* \b(for)\b .* $
15+
</string>
16+
<key>decreaseIndentPattern</key>
17+
<string>^(.*\*/)?\s*\}.*$</string>
18+
<key>increaseIndentPattern</key>
19+
<string>^.*\{[^}"']*$</string>
20+
</dict>
21+
<key>uuid</key>
22+
<string>77966fa8-af34-4f1e-8535-e556d5063853</string>
23+
</dict>
24+
</plist>

libs/global_vars.py

Lines changed: 0 additions & 31 deletions
This file was deleted.

listeners/format.py

Lines changed: 0 additions & 15 deletions
This file was deleted.

TypeScript.py renamed to main.py

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
11
import sys
2+
import os
23

3-
# Sublime/Python 2 & 3 differ in the name of this module, thus package import
4-
# needs to be handled slightly differently
54
if sys.version_info < (3, 0):
6-
from libs import *
7-
from libs.reference import *
8-
from libs.view_helpers import *
9-
from listeners import *
10-
from commands import *
5+
from typescript.libs import *
6+
from typescript.libs.reference import *
7+
from typescript.libs.view_helpers import *
8+
from typescript.listeners import *
9+
from typescript.commands import *
1110
else:
12-
from .libs import *
13-
from .libs.reference import *
14-
from .libs.view_helpers import *
15-
from .listeners import *
16-
from .commands import *
11+
from .typescript.libs import *
12+
from .typescript.libs.reference import *
13+
from .typescript.libs.view_helpers import *
14+
from .typescript.listeners import *
15+
from .typescript.commands import *
1716

1817
# Enable Python Tools for visual studio remote debugging
1918
try:

typescript/__init__.py

Whitespace-only changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)