RedCMD
4fea0d7662
Add TS/JS Template surrounding brackets ( #255972 )
2026-01-05 10:00:54 +00:00
RedCMD
2b7ad1a13f
TypeScript restrict Comment onEnterRules inside comment body ( #251692 )
...
* TypeScript: Restrict Comment onEnterRules cursor inside comment body
* TypeScript: Simply Comment onEnterRule
* polish
---------
Co-authored-by: Aiday Marlen Kyzy <amarlenkyzy@microsoft.com >
2025-06-17 13:52:11 +00:00
Stephen Sigwart
7c43b02d62
Update indentation for PHP, JS, and TS ( #251465 )
...
* Update indentation for PHP, JS, and TS.
Addresses https://github.com/microsoft/vscode/issues/136592
- For PHP, auto-indent after `if`, `elseif`, `else if`, `while`, `for` and `foreach`. This also fixes an issue where hitting Enter on a blank line below a single line `if` (or other) results in an extra tab.
- For PHP, extra dot after `*/` and blank line.
- For JS/TS, auto-indent for `else` to be consistent with handling of `if` statements
* polish
---------
Co-authored-by: Aiday Marlen Kyzy <amarlenkyzy@microsoft.com >
2025-06-17 09:41:12 +00:00
Aiday Marlen Kyzy
fb3a36133e
Removing double slash from wtihin regex in onEnter rule ( #242679 )
...
removing double slash from wtihin regex in onEnter rule
2025-03-05 12:28:46 +01:00
Aiday Marlen Kyzy
1430e1845c
Ignoring URLs when adding line comment onEnter ( #239576 )
...
removing urls from this regex
2025-02-04 10:38:17 +01:00
Aiday Marlen Kyzy
c0d25ffb56
Performance regression: revert "Ignoring double slashes inside of strings" ( #235742 )
...
Revert "onEnter Indentation Rules: Ignoring double slashes inside of strings …"
This reverts commit 21c52a4a3a .
2024-12-10 16:49:07 +01:00
Aiday Marlen Kyzy
21c52a4a3a
onEnter Indentation Rules: Ignoring double slashes inside of strings ( #235712 )
...
ignoring double slashes inside of strings
2024-12-10 11:02:51 +01:00
Aiday Marlen Kyzy
e8e5333cbb
Add comment on next line when not at the end of the line comment in onEnter rules ( #233219 )
...
adding line comment when not at the end of a line
2024-11-06 17:45:54 +01:00
Aiday Marlen Kyzy
da42cd4ffb
TypeScript: Adding slashes on new line when pressing enter from inside line comment with onEnter rules ( #233101 )
...
adding slashes on new line when pressing enter from inside line comment
2024-11-05 07:46:42 -08:00
Aiday Marlen Kyzy
d309e11579
Remove brackets from comments, strings and regexes before evaluating the indentation ( #210641 )
...
* wip
* polishing the code
* adding code
* adding the language
* reshuffling the code to avoid cyclic dependency
* polihsing code
* uncommenting tests
* also adopting the indentation rules within the reindentation operation
* using instead the sliced line tokens instead of the scoped line tokens
* polishing the code
* using start indices instead
* using value everywhere
* using the token data to type the tokens
* setting to number instead of standard token type
* using token data from autoindenttest.ts
* using same code in both test files
* placing instantiation service into the registerLanguage method
* copying object into the node js autoindent.ts
2024-05-27 11:18:00 +02:00
Aiday Marlen Kyzy
a00f2e64f4
Merge pull request #208291 from microsoft/aiday/addingIndentationForIfForWhile
...
Indent next line for if/for/while statement followed by whitespace
2024-03-22 11:07:52 +01:00
Aiday Marlen Kyzy
f2758ed8f7
making the regex more restrictive
2024-03-21 17:56:44 +01:00
Aiday Marlen Kyzy
d8a989efdd
adding rules to indent from within [], (), {}
2024-03-21 17:30:16 +01:00
Aiday Marlen Kyzy
20b54ec19e
making the regex pattern so that we don't match if/for/while inside of a word
2024-03-21 17:24:52 +01:00
Aiday Marlen Kyzy
5d1d7d98a6
adding parentheses aroudn the two different alternatives
2024-03-21 17:14:53 +01:00
Aiday Marlen Kyzy
0629845986
Merge branch 'main' into aiday/addingIndentationForIfForWhile
2024-03-21 17:10:29 +01:00
Aiday Marlen Kyzy
3aa12f6c38
simpler function is used in order to cover lambda functions
2024-03-21 15:07:52 +01:00
Aiday Marlen Kyzy
62275bbca6
changing to round brackets inside of the regex pattern
2024-03-21 12:43:17 +01:00
Aiday Marlen Kyzy
5228f5a8b6
adding dollar sign at the end of the regex to match the full line
2024-03-21 12:13:20 +01:00
Aiday Marlen Kyzy
32aaeac3d6
adding pattern for if for and while
2024-03-21 11:04:24 +01:00
Aiday Marlen Kyzy
69f9c7a2e1
adding pattern in order to indent the next line
2024-03-21 10:27:30 +01:00
Aiday Marlen Kyzy
946d53e850
Merge branch 'main' into fix-autoindent-on-closing-paren
2024-03-11 09:42:02 +01:00
rzvc
e7b03742b5
Fix docblock expansion in TS, when asterisk not preceded by a space ( #204400 )
...
Fixes issue #193263 .
2024-02-06 03:52:06 +00:00
Russell Davis
bac1926029
Fix decreaseIndentPattern for javascript and typescript
...
Fixes #201424
It wasn't matching closing parens, which resulted in these issues:
* Pressing enter with just a closing paren to the right of the caret
wouldn't result in a dedent on the next line
* With the caret at the start of the line below a line containing only a
closing paren, pressing tab would result in an extra level of
indentation
2023-12-22 20:15:13 -08:00
Stephen Sigwart
3894c48a02
JS/TS fixes
2022-11-21 21:41:18 -05:00
Stephen Sigwart
a9dac55c8a
Merge branch 'main' into singleLineDeindent
2022-11-21 20:46:58 -05:00
Matt Bierner
46caa3b490
Exclude @ from word pattern in js/ts ( #165764 )
...
Fixes #162862
#148874 Still seems to be working too after this change
2022-11-07 15:53:11 -08:00
Stephen Sigwart
10fe0823a3
Merge branch 'main' into singleLineDeindent
2022-10-27 08:19:18 -04:00
Bryan Lee
fac840f22c
Add support for angle bracket matching and colorization in Typescript
2022-06-29 01:59:31 +08:00
Stephen Sigwart
16f501ee33
Fix single line if/else and loop indentation
2022-06-04 23:55:58 -04:00
Matt Bierner
e6f42433cf
Include @ in JS/TS word pattern ( #148962 )
...
Fixes #148874
`@` is used both for decorators and in imports
2022-05-06 21:10:45 +00:00
Matt Bierner
2b92835853
Move js/ts language configs to json file
...
Fixes #125748
2022-02-03 11:38:09 -08:00
Henning Dieterichs
d6b2e78477
Fixes #132847 by configuring ${...} as bracket pair.
2021-09-21 12:28:25 +02:00
davidwu226
2e877e280a
Fix invalid JSON. ( #65447 )
2018-12-23 20:19:29 -08:00
Matt Bierner
30fb7804c9
Auto close <> in js/ts
...
Fixes #62864
2018-11-12 11:23:59 -08:00
Jackson Kearl
4dff8da77b
remove comments for more proper json
2018-08-08 10:43:16 -07:00
Jackson Kearl
1655e6eb23
Same specialization for ts
2018-07-24 00:42:18 -07:00
Matt Bierner
e23c58b3ab
Split out ts syntax and grammar to ts basics
2018-02-23 13:29:52 -08:00