232 Commits

Author SHA1 Message Date
Da-nie-elT
a92f6c9324 Use Object static 2025-08-21 13:57:45 +02:00
Da-nie-elT
3a91ebc454 Removed accidental whitespace 2025-08-21 13:44:14 +02:00
Da-nie-elT
215dbb213a Updated For-In Loops in snippets 2025-08-21 13:42:27 +02: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
RedCMD
ae5d91eeeb
Fix template.expression brackets #190564 (#245786) 2025-04-11 14:25:44 +00:00
zyoshoka
171bed57b6
Correct typescript-basics extension path 2025-03-18 16:33:14 +09: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 21c52a4a3ae29fac345c863b39c5fd44f4005862.
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
Alex Ross
210541906e
Update grammars (#232238) 2024-10-25 11:35:17 +02:00
Robo
b5a6aa14a8
feat: switch to npm as default package manager (#226927)
* feat: move from yarn to npm

* chore: skip yarn.lock files

* fix: playwright download

* chore: fix compile and hygiene

* chore: bump vsce@2.17.0

Refs 8b49e9dfdf

* test: update results for bat and sh colorizer tests

* fix: add missing lock files for windows

* fix: switch to legacy-peer-deps

* chore: update markdown-it@14.1.0

Refs 737c95a129

esbuild step in extensions-ci-pr was previously using markdown-it
from root which had userland punycode and was able to compile successfully.

* ci: increase pr timeout for windows integration tests

* chore: fix product build

* build: ignore extension dev dependency for rcedit

* build: fix working directory inside container

* build: fix dependency generation

* npm: update dependencies

* ci: use global npmrc

* ci: update cache

* ci: setup global npmrc for private npm auth

* build: fix extension bundling

* chore: sync npm dependencies

* ci: debug env variables for container

* ci: fix win32 cli pipeline

* build: fix npmrc config usage for build/ and remote/ dirs

* fix: windows build

* fix: container builds

* fix: markdown-language-features tests and bundling

```
[03:58:22] Error: Command failed: /Users/demohan/.nvm/versions/node/v20.15.1/bin/node /Users/demohan/github/vscode/extensions/markdown-language-features/esbuild-notebook.js --outputRoot /Users/demohan/github/vscode/.build/extensions/markdown-language-features
✘ [ERROR] Could not resolve "punycode"

    extensions/markdown-language-features/node_modules/markdown-it/lib/index.js:14:27:
      14 │ var punycode     = require('punycode');
         ╵                            ~~~~~~~~~~

  The package "punycode" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error.
```

Adds userland package based on beed9aee2c

* fix: container builds for distro

* chore: update yarn occurrences

* fixup! chore: bump vsce@2.17.0

Uses the closest version to `main` branch that does not
include d3cc84cdec
while still having the fix 8b49e9dfdf

* chore: sync npm dependencies

* chore: sync npm dependencies

* chore: sync npm dependencies

* chore: throw error when yarn is used for installation

* chore: add review feedback

* chore: switch exec => run where needed

* chore: npm sync dependencies

* fix: markdown-language-features bundling

```
✘ [ERROR] Could not resolve "punycode"

    extensions/markdown-language-features/node_modules/markdown-it/lib/index.js:14:27:
      14 │ var punycode     = require('punycode');
         ╵                            ~~~~~~~~~~

  The package "punycode" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error.
```

Adds missing userland package based on markdown-it/markdown-it@beed9ae,
can be removed once we update markdown-it >= 14.1.0

* ci: rename no-yarn-lock-changes.yml

* chore: sync npm dependencies

* ci: restore no-yarn-lock-changes.yml

We can disable it in a separate PR to keep the required
checks happy and also need workflow edit perms.

* chore: sync npm dependencies

* ci: rebuild cache

* ci: fix no-package-lock-changes.yml

* chore: bump distro

* chore: rm yarn.lock files

* chore: rm yarn.lock files without dependencies

* chore: add vscode-selfhost-import-aid to postinstall dirs

* chore: bump distro
2024-09-06 22:18:02 +09:00
Matt Bierner
d69a8fb36d
Align JS and TS snippets (#219917)
Mostly should be the same with a few small differences
2024-07-04 09:12:15 +02:00
Matt Bierner
ee8937a604
Rename snippet placeholder (#219904)
Fixes #214760
2024-07-03 17:02:21 -07: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
Alex Ross
35d97bc7e4
Update grammars (#203521) 2024-01-26 13:06:22 +01:00
Sandeep Somavarapu
1e0580ec23
Use categories for builtin extensions groups (#202453)
* support grouping of extensions

* remove grouping

* reuse categories parsing

* cleanup

* fix tests
2024-01-14 18:19:29 +01: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
Alpha Romer Coma
7ef754c2f6
Fix supported markdown-lint violations in markdown files (#190750)
docs: fix supported markdownlint violations
2023-08-24 08:37:25 +00:00
Remco Haszing
e0485e9d8f
Mark all .tsbuildinfo files as json (#189811)
TypeScript emits a `.tsbuildinfo` file whose file base name matches the
TypeScript configuration file. Typically this configuration file is
named `tsconfig.json`, meaning TypeScript will generate
`tsconfig.tsbuildinfo`. However, if the config file is named
differently, TypeScript will generate another `.tsbuildinfo` file.
2023-08-07 19:32:21 +00:00
Henning Dieterichs
fd63cf62b9
Merge branch 'main' into singleLineDeindent 2023-07-07 20:30:51 +02:00
Alex Ross
c778cc6117
Update grammars (#186752) 2023-06-30 09:14:40 -07:00
Matt Bierner
b242a8730c
Bump JS/TS grammars (#180160) 2023-04-17 21:27:38 +01:00
Matt Bierner
0461b885d5
Update JS/TS grammar (#179069) 2023-04-04 00:56:01 +02:00
Henning Dieterichs
e3cab63a12
Merge branch 'main' into singleLineDeindent 2023-02-28 11:16:22 +01:00
Alex Ross
cf4acb8050
Update grammars (#175350) 2023-02-24 17:22:41 +01:00
Henning Dieterichs
18b96f483c
Fixes #173997 (#175349) 2023-02-24 17:18:37 +01:00
Henning Dieterichs
d6259480f5
Fixes #173997 (#174067) 2023-02-10 15:29:40 +01:00
Alex Ross
166b8e2d90
Update grammars (#172807) 2023-01-30 06:27:20 -08:00
Matt Bierner
c1498b35dd
Fix includes check on jsdoc patching (#169446) 2022-12-16 23:36:22 +01:00
Matt Bierner
9ad5c4a205
Use JSX in display names of the TypeScript React and JavaScript React languages (#168368)
Use JSX in display names of the TypeScript React and JavaScript React languages

Fixes #138285

This changes the display name of the languages `JavaScript React` -> `JavaScript JSX` and `TypeScript React` -> `TypeScript JSX`

This only changes the display names and leaves the ids alone. Changing the ids would be a very breaking change for extensions with no real user benefits
2022-12-08 00:56:04 +01:00
Matt Bierner
cf01f3bb99
Update TS grammars (#167479)
Pulls in support for TS accessor syntax
2022-11-28 16:30:49 -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