Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: language-server formatting of files. #1707

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

i4ki
Copy link
Contributor

@i4ki i4ki commented May 8, 2024

What this PR does / why we need it:

Language-Server code formatting.

Which issue(s) this PR fixes:

none

Special notes for your reviewer:

Does this PR introduce a user-facing change?

yes, new feature.

@i4ki i4ki requested a review from a team as a code owner May 8, 2024 14:24
@i4ki i4ki marked this pull request as draft May 8, 2024 14:24
@i4ki i4ki force-pushed the i4k-ls-format branch from be03c88 to 38ab7d9 Compare May 8, 2024 14:27
Copy link

github-actions bot commented May 8, 2024

metric: time/op
CloudReadLines-4: old 1.13ms ± 6%: new 1.12ms ± 5%: delta: 0.00%
CloudReadLine-4: old 6.80ms ± 2%: new 6.88ms ± 1%: delta: 1.11%
ListFiles-4: old 78.7µs ± 2%: new 78.7µs ± 0%: delta: 0.00%
Generate-4: old 2.58s ± 2%: new 2.60s ± 2%: delta: 0.92%
GenerateRegex-4: old 1.73s ± 2%: new 1.72s ± 2%: delta: 0.00%
TokensForExpressionComplex-4: old 1.25ms ± 0%: new 1.25ms ± 0%: delta: 0.00%
TokensForExpressionPlainStringNoNewline-4: old 803ns ± 0%: new 803ns ± 0%: delta: 0.00%
TokensForExpressionStringWith100Newlines-4: old 23.6µs ± 1%: new 23.5µs ± 0%: delta: -0.38%
TokensForExpressionObjectWith100KeysWithNumberValues-4: old 1.44ms ± 0%: new 1.44ms ± 0%: delta: -0.10%
TokensForExpression-4: old 1.25ms ± 0%: new 1.25ms ± 0%: delta: 0.00%
PartialEvalComplex-4: old 585µs ± 1%: new 586µs ± 1%: delta: 0.00%
PartialEvalSmallString-4: old 3.73µs ± 0%: new 3.72µs ± 0%: delta: -0.18%
PartialEvalHugeString-4: old 2.01ms ± 1%: new 2.01ms ± 0%: delta: 0.00%
PartialEvalHugeInterpolatedString-4: old 5.24ms ± 1%: new 5.25ms ± 1%: delta: 0.00%
PartialEvalObject-4: old 24.5µs ± 0%: new 24.3µs ± 1%: delta: -0.56%
TmAllTrueLiteralList-4: old 6.26ms ± 0%: new 6.27ms ± 1%: delta: 0.00%
TmAllTrueFuncall-4: old 161µs ± 0%: new 161µs ± 1%: delta: 0.00%
TmAnyTrueLiteralList-4: old 147ms ± 0%: new 147ms ± 0%: delta: 0.00%
TmAnyTrueFuncall-4: old 161µs ± 0%: new 161µs ± 1%: delta: 0.00%
TmTernary-4: old 2.81µs ± 0%: new 2.81µs ± 1%: delta: 0.33%
TmTry-4: old 53.3µs ± 0%: new 53.2µs ± 0%: delta: 0.00%
metric: alloc/op
CloudReadLines-4: old 3.12MB ± 0%: new 3.12MB ± 0%: delta: 0.00%
CloudReadLine-4: old 3.37MB ± 0%: new 3.37MB ± 0%: delta: -0.00%
ListFiles-4: old 22.0kB ± 0%: new 22.0kB ± 0%: delta: 0.00%
Generate-4: old 2.32GB ± 0%: new 2.32GB ± 0%: delta: 0.00%
GenerateRegex-4: old 955MB ± 0%: new 955MB ± 0%: delta: 0.00%
TokensForExpressionComplex-4: old 404kB ± 0%: new 404kB ± 0%: delta: 0.00%
TokensForExpressionPlainStringNoNewline-4: old 512B ± 0%: new 512B ± 0%: delta: 0.00%
TokensForExpressionStringWith100Newlines-4: old 12.4kB ± 0%: new 12.4kB ± 0%: delta: 0.00%
TokensForExpressionObjectWith100KeysWithNumberValues-4: old 394kB ± 0%: new 394kB ± 0%: delta: 0.00%
TokensForExpression-4: old 404kB ± 0%: new 404kB ± 0%: delta: 0.00%
PartialEvalComplex-4: old 408kB ± 0%: new 408kB ± 0%: delta: 0.00%
PartialEvalSmallString-4: old 1.74kB ± 0%: new 1.74kB ± 0%: delta: 0.00%
PartialEvalHugeString-4: old 166kB ± 0%: new 166kB ± 0%: delta: 0.00%
PartialEvalHugeInterpolatedString-4: old 4.38MB ± 0%: new 4.38MB ± 0%: delta: 0.00%
PartialEvalObject-4: old 21.9kB ± 0%: new 21.9kB ± 0%: delta: 0.00%
TmAllTrueLiteralList-4: old 1.74MB ± 0%: new 1.74MB ± 0%: delta: 0.00%
TmAllTrueFuncall-4: old 45.5kB ± 0%: new 45.5kB ± 0%: delta: 0.00%
TmAnyTrueLiteralList-4: old 37.9MB ± 0%: new 37.9MB ± 0%: delta: 0.00%
TmAnyTrueFuncall-4: old 45.6kB ± 0%: new 45.6kB ± 0%: delta: 0.00%
TmTernary-4: old 1.20kB ± 0%: new 1.20kB ± 0%: delta: 0.00%
TmTry-4: old 11.2kB ± 0%: new 11.2kB ± 0%: delta: 0.00%
metric: allocs/op
CloudReadLines-4: old 5.54k ± 0%: new 5.54k ± 0%: delta: 0.00%
CloudReadLine-4: old 60.0k ± 0%: new 60.0k ± 0%: delta: 0.00%
ListFiles-4: old 321 ± 0%: new 321 ± 0%: delta: 0.00%
Generate-4: old 25.9M ± 0%: new 25.9M ± 0%: delta: 0.00%
GenerateRegex-4: old 18.6M ± 0%: new 18.6M ± 0%: delta: 0.00%
TokensForExpressionComplex-4: old 4.84k ± 0%: new 4.84k ± 0%: delta: 0.00%
TokensForExpressionPlainStringNoNewline-4: old 20.0 ± 0%: new 20.0 ± 0%: delta: 0.00%
TokensForExpressionStringWith100Newlines-4: old 227 ± 0%: new 227 ± 0%: delta: 0.00%
TokensForExpressionObjectWith100KeysWithNumberValues-4: old 3.19k ± 0%: new 3.19k ± 0%: delta: 0.00%
TokensForExpression-4: old 4.84k ± 0%: new 4.83k ± 0%: delta: -0.01%
PartialEvalComplex-4: old 3.65k ± 0%: new 3.65k ± 0%: delta: 0.00%
PartialEvalSmallString-4: old 23.0 ± 0%: new 23.0 ± 0%: delta: 0.00%
PartialEvalHugeString-4: old 35.0 ± 0%: new 35.0 ± 0%: delta: 0.00%
PartialEvalHugeInterpolatedString-4: old 23.1k ± 0%: new 23.1k ± 0%: delta: 0.00%
PartialEvalObject-4: old 153 ± 0%: new 153 ± 0%: delta: 0.00%
TmAllTrueLiteralList-4: old 13.6k ± 0%: new 13.6k ± 0%: delta: 0.00%
TmAllTrueFuncall-4: old 460 ± 0%: new 460 ± 0%: delta: 0.00%
TmAnyTrueLiteralList-4: old 252k ± 0%: new 252k ± 0%: delta: 0.00%
TmAnyTrueFuncall-4: old 462 ± 0%: new 462 ± 0%: delta: 0.00%
TmTernary-4: old 28.0 ± 0%: new 28.0 ± 0%: delta: 0.00%
TmTry-4: old 147 ± 0%: new 147 ± 0%: delta: 0.00%

@i4ki i4ki force-pushed the i4k-ls-format branch from 38ab7d9 to 7604158 Compare May 10, 2024 13:26
@soerenmartius
Copy link
Contributor

How does it work / how can users use it? Do we need docs for this? LGTM! Thanks

@i4ki
Copy link
Contributor Author

i4ki commented Jul 22, 2024

This is not ready yet, the emitted textedits do not cover all cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants