Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
347 commits
Select commit Hold shift + click to select a range
90469c4
fix: Hover doesn't show up when a new line is behind nested prop with…
Dec 8, 2021
f658a9d
Merge branch 'fix/hover-with-new-line' into jigx
Dec 8, 2021
9858417
Merge branch 'main' into jigx
Dec 9, 2021
7735566
Merge branch 'main' into jigx
Dec 9, 2021
b32f6d8
fix: completion invoke in three different scenarios
Dec 10, 2021
471c1f0
Merge branch 'fix/completion-invoke-in-specail-cases' into jigx
Dec 10, 2021
2eff7c3
fix: include ut nested completion - some newLine after colon
Dec 10, 2021
522877f
Merge branch 'main' into feat/inline-code-completion
Dec 10, 2021
96e8d72
fix: inline completion in the middle of the prop
Dec 10, 2021
b4a8e73
Merge branch 'feat/inline-code-completion' into jigx
Dec 10, 2021
06afb98
fix: combine value and object completion if it is in array
Dec 14, 2021
cbda6ba
fix: validation expression detection
Dec 14, 2021
fe71065
Merge branch 'feat/inline-code-completion' into jigx
Dec 14, 2021
ce45814
fix: clear document cahce after document update in completion
Dec 15, 2021
1a74af7
Merge branch 'feat/inline-code-completion' into jigx
Dec 15, 2021
327a631
fix: clear cahce after each document update
Dec 21, 2021
ab81a12
Merge branch 'feat/inline-code-completion' into jigx
Dec 21, 2021
e612b56
Merge branch 'main' into feat/anyof-parent-completion
Dec 21, 2021
217cd70
Merge branch 'main' into jigx
Dec 21, 2021
46ade91
Merge branch 'main' into feat/anyof-parent-completion
Dec 29, 2021
da3f90e
feat: improve parent completion
Dec 31, 2021
b3f4f8a
fix: array inside array indent
Jan 4, 2022
bbbf878
fix: Autocomplete indent on array object when parent is array
Jan 4, 2022
407577e
fix: array indent on different index position
Jan 4, 2022
58547b6
Merge branch 'main' into jigx
Jan 5, 2022
db699ea
Merge branch 'feat/parent-completion' into jigx
Jan 5, 2022
ec14e6b
Merge branch 'fix/array-indent' into jigx
Jan 5, 2022
7d24894
Merge branch 'fix/array-indent-on-different-index-position' into jigx
Jan 5, 2022
545176d
Merge branch 'main' into feat/inline-code-completion
Jan 12, 2022
8ffbd88
Merge branch 'feat/inline-code-completion' into jigx
Jan 12, 2022
154d818
fix: suggestion item title
Feb 11, 2022
738cdb3
fix: suggestion item test
Feb 11, 2022
4d4daa5
Merge branch 'main' into jigx
Feb 11, 2022
cea4b67
Merge branch 'fix/suggestion-item-title' into jigx
Feb 11, 2022
74ea72e
feat: add schema description to the parent suggestion
Feb 14, 2022
bf11563
fix: schema title for hover
Feb 14, 2022
7fc0b89
Merge branch 'fix/suggestion-item-title' into jigx
Feb 14, 2022
49ac971
fix: hover detail layout
Feb 16, 2022
b9cae6b
fix: completion tmp document modification
Feb 18, 2022
037ea45
fix: codeAction to open schema
Mar 1, 2022
7295344
fix: test dynamic-schema
Mar 2, 2022
7eb2946
fix: test dynamic schema
Mar 2, 2022
0bcdfdf
Merge branch 'main' into jigx
Mar 3, 2022
93043c0
Merge branch 'fix/snippets' into jigx
Mar 4, 2022
43a1993
fix: snippets test
Mar 4, 2022
e815f5e
fix: add MD support into prop table and root description
Mar 7, 2022
8c009bb
feat: add custom request to revalidate file
Mar 8, 2022
bfe06cd
chore: hover: display enum values in single line if length gt 50
Mar 9, 2022
5875145
feat: change custom request to revalidate
Mar 10, 2022
2249560
feat: remove if schema from mathingSchemas
Mar 14, 2022
eb2e67c
Merge pull request #21 from p-spacek/feat/remove-if-from-possible-sch…
p-spacek Mar 14, 2022
1e9f7c4
fix: tmp fix for if/then/else schemas
Mar 16, 2022
3d79d2b
fix: remove empty type from hover info
Mar 16, 2022
1fa070c
Merge branch 'main' into jigx
Mar 17, 2022
b2b8c11
fix: clean up
Mar 17, 2022
8c266a2
Merge branch 'main' into jigx
Mar 21, 2022
eb44f9c
Merge branch 'feat/select-parent-skeleton-first' into jigx
Mar 21, 2022
144eaee
Merge branch 'feat/select-parent-skeleton-first' into jigx
Mar 21, 2022
5d9ce49
chore: remove log in hoverDetail
Mar 23, 2022
cf1ffe5
Merge branch 'main' into jigx
Apr 1, 2022
44e5421
fix: hover markdownDescription
Apr 4, 2022
3c0a96e
fix: yaml folding
Apr 5, 2022
d2dace8
fix: array autocompletion indent
Apr 7, 2022
dc3f2f4
Merge branch 'fix/completion-array-in-the-middle-of-the-empty-text' i…
Apr 7, 2022
dbf2096
Merge branch 'fix/completion-in-the-middle-of-the-empty-text' into jigx
Apr 7, 2022
15cf8d1
Merge branch 'fix/completion-just-after-array-simbol' into jigx
Apr 7, 2022
ff974b7
fix: object completion on the same line with cursor in the middle of …
Apr 7, 2022
41ace6f
Merge branch 'main' into jigx
Apr 10, 2022
33af400
chore: rename arrayPrefixIndentation
Apr 11, 2022
3406b5a
Merge branch 'main' into jigx
Apr 11, 2022
faf0c24
fix/array ctx completion
May 16, 2022
1a77557
Merge pull request #22 from p-spacek/fix/ctx-array-completion
p-spacek May 17, 2022
244a06d
refactor: inline expression completion (#23)
p-spacek May 17, 2022
9872e45
Merge branch 'main' into jigx
May 19, 2022
bba862e
Merge branch 'fix/object-with-additional-properties' into jigx
May 19, 2022
6f81b23
Merge branch 'feat/add-completion-for-additionalProperties-propertyNa…
May 30, 2022
86ce1f3
fix: remove lint warning import/no-duplicates
May 31, 2022
d160963
Merge branch 'fix/indented_comment' into jigx
rickcowan Jun 2, 2022
7ba0be9
Merge branch 'main' into jigx
rickcowan Jun 2, 2022
ef250d7
fix: suggest prop of the object -based on not completed prop name
Jun 3, 2022
5418317
Merge branch 'jigx' of https://github.com/p-spacek/yaml-language-serv…
Jun 3, 2022
5bab278
Merge branch 'fix/neste-object-props' into jigx
Jun 3, 2022
7368497
Merge branch 'main' into jigx
Jun 6, 2022
249c116
Merge branch 'fix/extra-space-after-position' into jigx
Jun 9, 2022
f460c20
fix: edit overwrite range if trailing spaces
jim-jigx Jun 22, 2022
b76cbab
fix: remove console log, better checking
jim-jigx Jun 22, 2022
f45e649
fix: one more console message
jim-jigx Jun 22, 2022
8dcef0c
fix: fix code for failing unit tests
jim-jigx Jun 24, 2022
c57c192
Merge branch 'main' into jigx
Jun 27, 2022
6c3637b
fix: minor tweak to regex, unit tests
jim-jigx Jun 27, 2022
6823e30
fix: trailing spaces v2
Jun 28, 2022
ab62401
fix: line with only spaces
jim-jigx Jun 28, 2022
406dfae
Update src/languageservice/services/yamlCompletion.ts
jim-jigx Jun 29, 2022
f900805
Update test/autoCompletionFix.test.ts
jim-jigx Jun 29, 2022
6e2d130
Merge pull request #2 from jigx-com/fix/463-cursor-issues-with-intell…
jim-jigx Jun 29, 2022
e237ccb
Merge branch 'fix/extra-space-aftre-position-key' into jigx
Jun 30, 2022
cbc5cff
fix: proper identing of snippet within an array (#3)
rickcowan Jul 6, 2022
fcf6e12
Merge branch 'main' into jigx
Jul 18, 2022
e7ff997
fix: added code to create suggestions for an array when no hypen (#4)
rickcowan Jul 19, 2022
111d926
fix: autocomplete indent on object within an array (#5)
rickcowan Jul 26, 2022
777d15d
fix: default snippet in array
rickcowan Jul 27, 2022
18bbbff
fix: default snippet in array
rickcowan Jul 27, 2022
50242bc
fix: ctx inside the expression
Jul 27, 2022
9510376
fix: add restrictions
Jul 27, 2022
a43565f
Cleaned up collectDefaultSnippets call
rickcowan Jul 27, 2022
5a61129
Merge pull request #7 from jigx-com/fix/ctx-inside-the-expression
p-spacek Jul 27, 2022
9726605
Cleaned up collectDefaultSnippets call
rickcowan Jul 27, 2022
938ac54
Merge pull request #6 from jigx-com/fix/wrong-chart-options
p-spacek Jul 28, 2022
bde47f0
fix: remove duplicity test
Aug 1, 2022
7f0164e
Merge branch 'main' into jigx
Aug 1, 2022
8912e49
Merge branch 'fix/completion-array-falt' into jigx
Aug 1, 2022
873e978
feat: add if filePatternAssociation
Aug 4, 2022
b4d5225
Merge branch 'main' into feat/if-filePatternAssociation
Aug 4, 2022
98a2d6f
Merge branch 'main' into jigx
Aug 4, 2022
8d9dd11
Merge branch 'feat/if-filePatternAssociation' into jigx
Aug 4, 2022
cba7ebe
fix: dont put error to validation result
Aug 4, 2022
bdffee0
Merge branch 'feat/if-filePatternAssociation' into jigx
Aug 4, 2022
6b70e6d
Fixed issue where there were trailing spaces after the cursor on a li…
rickcowan Aug 5, 2022
e193340
Moved unit test to correct file.
rickcowan Aug 8, 2022
ff6d1a4
Added array of arrays unit tests
rickcowan Aug 9, 2022
33f7fe0
Merge pull request #9 from jigx-com/fix/wrong-autocomplete-indentation
p-spacek Aug 9, 2022
3ddb218
feat: add support for custom yaml validation by schema
Sep 1, 2022
4ec1391
Merge pull request #10 from jigx-com/feat/custom-yaml-validation-by-s…
p-spacek Sep 1, 2022
6ac264f
Merge branch 'main' into jigx
Sep 5, 2022
6a22579
Merge branch 'feat/add-diagnostic-data-with-missing-properties' into …
Sep 5, 2022
2e72311
Merge branch 'main' into jigx
Sep 22, 2022
dfa4b8c
chore: skip 'merged the hover results' test
Sep 22, 2022
1b9e268
fix: schemaValidation with didCallFromAutoComplete
Sep 22, 2022
c6c9a2d
Merge branch 'main' into fix/main-default-snippet-in-array
Nov 11, 2022
2056485
Merge branch 'main' into fix/main-default-snippet-in-array
Nov 22, 2022
3c0e7b5
Merge branch 'main' into fix/main-default-snippet-in-array
Nov 22, 2022
9404bb7
Merge branch 'fix/main-default-snippet-in-array' into jigx
Nov 22, 2022
56911f3
feat: remove images from hover description
p-spacek Nov 25, 2022
34d8e0a
Merge pull request #11 from jigx-com/feat/remove-img-from-mardownDesc…
p-spacek Nov 25, 2022
c1e1514
fix: equal ctx compensation
p-spacek Jan 3, 2023
ead8082
Merge pull request #12 from jigx-com/fix/equal-ctx-componsation
p-spacek Jan 3, 2023
50a9ad7
feat: add possibility to define multiple patterns
p-spacek Jan 9, 2023
6123303
Merge branch 'main' into jigx
p-spacek Jan 10, 2023
d271328
Merge branch 'feat/schema-patterns-validation' into jigx
p-spacek Jan 10, 2023
5042cd1
feat: simplify hover detail
p-spacek Jan 10, 2023
af52384
feat: remove unused tsBlock style
p-spacek Jan 10, 2023
18ec365
Merge pull request #13 from jigx-com/feat/simplify-hover-detail
p-spacek Jan 10, 2023
8c3fa4f
feat: merge snippet props with existing props in yaml
p-spacek Jan 11, 2023
ec3e22e
Merge branch 'feat/merge-snippet-props-with-existing-props-in-yaml' i…
p-spacek Jan 12, 2023
4fd5bd9
fix: completion value with dash
p-spacek Jan 17, 2023
f4335f9
feat: exclude deprecated schema from autocompletion
p-spacek Jan 17, 2023
d776e87
Merge branch 'fix/completion-item-value-with-dash' into jigx
p-spacek Jan 17, 2023
c8c0f01
Merge branch 'feat/exclude-deprecated-schema-from-autocompletion' int…
p-spacek Jan 17, 2023
6cc6c5b
fix: remove deprecated from hoverDetail
p-spacek Jan 18, 2023
efda9bd
Merge pull request #14 from jigx-com/fix/remove-deprecated-from-hover…
p-spacek Jan 18, 2023
8339c84
fix:schema description section newLine tab replacement
p-spacek Jan 18, 2023
b14aa07
Merge pull request #15 from jigx-com/fix/schema-description-newLine-tab
p-spacek Jan 18, 2023
6e80f91
fix: value completion with trailing spaces
p-spacek Jan 19, 2023
454810b
fix: value completion regex condition
p-spacek Jan 19, 2023
6834f24
Merge branch 'fix/value-completion-with-trailing-spaces' into jigx
p-spacek Jan 19, 2023
1e48892
fix: replace only ending $1
p-spacek Jan 24, 2023
3fc9eb5
Merge branch 'main' into jigx
p-spacek Mar 21, 2023
10fe246
fix: previous merge
p-spacek Mar 21, 2023
e35e96d
feat: move expression completion to the builder (#16)
p-spacek Mar 28, 2023
ad91a76
Merge branch 'main' into jigx
p-spacek Apr 13, 2023
e9707b5
fix: lint errors
p-spacek Apr 13, 2023
d7f5f50
fix: conditional Schema without space after colon (#17)
p-spacek Apr 17, 2023
0ae036d
fix: lint
p-spacek Apr 18, 2023
6127da6
fix: exclude deprecated schema in valueCompletion
p-spacek Apr 26, 2023
5a3726e
fix: lint
p-spacek May 2, 2023
2b9ebd4
fix(indentation): hover behavior when indentation not set
Kasama Mar 26, 2023
8c40066
remove travis ci status (#873)
gorkem May 3, 2023
ce2c859
Bump yaml from 2.2.1 to 2.2.2
dependabot[bot] Apr 25, 2023
407d9f6
updated changelog.md for release 1.13.0 (#883)
msivasubramaniaan May 22, 2023
1c73afa
bump YAML LS 1.14.0 (#884)
msivasubramaniaan May 22, 2023
85530c6
fix: nested anyof const
p-spacek Jun 2, 2023
62767e7
fix: prettier issue
p-spacek Jun 23, 2023
11bd212
fix: anyOf performance and process only subSchemas with mustMatch pro…
p-spacek Jul 11, 2023
f1c07dc
fix: array completion after colon (#19)
p-spacek Jul 11, 2023
aa0f390
fix: doNotSuggest
p-spacek Aug 10, 2023
519f984
fix: suggest hyphen in array
p-spacek Jul 11, 2023
d0872b1
fix: schemaProvider in test
p-spacek Sep 5, 2023
cc3cf93
fix: schema loading performance (#20)
p-spacek Sep 14, 2023
780f9ca
Merge branch 'main' into jigx
p-spacek Sep 14, 2023
6baa064
fix: test schemaProvider
p-spacek Sep 14, 2023
328643d
fix: revert back schemaId vs document.name pairing hack
p-spacek Sep 15, 2023
d96d81c
fix: undefined error in mergingResult.problemArgs
p-spacek Sep 18, 2023
e5f1c46
Merge branch 'release/22' into release/23
p-spacek Sep 18, 2023
b88e5d6
fix: schema source undefined error
p-spacek Sep 18, 2023
4ba4252
fix: add null check to avoid error
p-spacek Sep 19, 2023
3217817
Merge branch 'release/22' into release/23
p-spacek Sep 20, 2023
0432be8
fix: suggest hyphen in array
p-spacek Jul 11, 2023
86a72ed
fix: schemaProvider in test
p-spacek Sep 5, 2023
f7df5fc
Merge branch 'fix/suggest-hyphen-in-arrays' of github.com:jigx-com/rh…
p-spacek Oct 11, 2023
1e7779b
Merge branch 'main' into release/23
p-spacek Oct 11, 2023
8e4d05f
fix: hyphen for array item
p-spacek Oct 13, 2023
4a50bef
Merge branch 'fix/suggest-hyphen-in-arrays' into release/23
p-spacek Oct 13, 2023
a8bcc54
feat: quickFix for enum, const, property (#24)
p-spacek Nov 6, 2023
a1be171
fix: array item with existing property (#25)
p-spacek Nov 7, 2023
bda342c
fix: correct indent when cursor is just after hyphen with trailing sp…
p-spacek Nov 29, 2023
c01968c
feat: chain single properties (#27)
p-spacek Jan 3, 2024
b5c96ca
fix: custom validation should use debounced validation
p-spacek Feb 6, 2024
9674dc9
fix: allows pattern error in mustMatchProperty functionality (#28)
p-spacek Feb 12, 2024
b4642d2
fix: snippets in additionalProperties - JIGX
p-spacek Feb 13, 2024
0e3ce42
fix: default value with special chars with anyOf
p-spacek May 2, 2024
070074b
chore: accept null,0,emptyString in default or const property
p-spacek May 2, 2024
944ad29
fix: not schema error message
p-spacek May 7, 2024
37ab7f0
fix: array default value
p-spacek May 15, 2024
8f2aef5
feat: unify string insert text for array and property (#29)
p-spacek May 20, 2024
f68a447
feat: add extra data with solutionTitle to property completion
p-spacek May 28, 2024
a5139a2
feat: add jsonata hover support (#30)
p-spacek Oct 8, 2024
782c588
fix: hover duplicities (#31)
p-spacek Oct 22, 2024
1d3485e
Merge branch 'main' into jigx
p-spacek Oct 24, 2024
dbbd039
Merge branch 'main' into jigx
p-spacek Oct 24, 2024
5cebbe2
Merge remote-tracking branch 'origin/fix/default-value-with-special-c…
p-spacek Oct 24, 2024
c3dc3a6
Squashed commit of the following:
p-spacek Oct 25, 2024
c9b2cad
feat: anyOf-improvements (#33)
p-spacek Nov 6, 2024
e24803e
Fix: improve any of mustMatch 2 for onedrive data (#34)
p-spacek Nov 12, 2024
6df2db4
add fast-uri to avoid errors often in the builder
p-spacek Feb 12, 2025
0e7c3ad
Merge branch 'main' into fix/suggest-hyphen-in-arrays
p-spacek Mar 6, 2025
26cefd1
Merge branch 'main' into jigx
p-spacek Mar 10, 2025
0f1b49a
Merge branch 'main' into fix/suggest-hyphen-in-arrays
p-spacek Mar 10, 2025
e7ad867
feat: property snippets
p-spacek Mar 11, 2025
f1df123
Merge remote-tracking branch 'origin/fix/main-default-snippet-in-arra…
p-spacek Mar 12, 2025
d2d9bdd
fix: object property snippet - should not check existing props in the…
p-spacek Mar 17, 2025
a5e9d7f
feat: property snippets jigx (#35)
p-spacek Mar 19, 2025
c7a1315
Merge branch 'main' into feat/property-snippets
p-spacek Mar 21, 2025
022a1b1
fix: exclude templateRef from property snippets
p-spacek Mar 24, 2025
07b54f0
fix: do not suggest propertyNames if doNotSuggest is true
p-spacek Mar 25, 2025
1d1a1c5
feat: file patter association glob vs regexp customization (#37)
p-spacek Mar 27, 2025
a9aa9cc
fix: array snippets
p-spacek Apr 1, 2025
4209ab2
Merge branch 'main' into jigx
p-spacek Apr 1, 2025
dab963a
Merge branch 'feat/property-snippets' into feat/property-snippets-JIGX2
p-spacek Apr 1, 2025
52c8cfb
fix: improve doCompletionWithModification postprocessing
p-spacek Apr 2, 2025
9391764
fix: anyOfSnippets
p-spacek Apr 2, 2025
866c0de
Merge branch 'feat/property-snippets' into feat/property-snippets-JIGX2
p-spacek Apr 2, 2025
a5508d7
fix: exclude existing props in array snippet
p-spacek Apr 2, 2025
68aa869
Merge branch 'feat/property-snippets' into feat/property-snippets-JIGX2
p-spacek Apr 2, 2025
c1c1d54
fix: array snippet for 2nd position without hyphen
p-spacek Apr 3, 2025
e981244
Merge branch 'feat/property-snippets' into feat/property-snippets-JIGX2
p-spacek Apr 3, 2025
d737fc7
Squashed commit of the following:
p-spacek Apr 22, 2025
aecb44e
fix: list vs list-item (#38)
p-spacek Apr 28, 2025
47b2cde
Merge branch 'main' into jigx
p-spacek Apr 29, 2025
b751776
fix: undefined problemArgs
p-spacek Apr 29, 2025
7092d46
feat: add support for solution diagnostic (#39)
p-spacek May 12, 2025
b75e639
fix: flatten of nested anyOf - component. problem (#41)
p-spacek May 22, 2025
2f3a7d0
Fix/hover-detail-const-and-enum (#42)
p-spacek May 28, 2025
26a8a85
Revert "feat: remove images from hover description"
p-spacek Jun 9, 2025
c31f6f5
feat: allows filePatternAssociation pattern regexp
p-spacek Jun 9, 2025
55d3e7c
fix: resize hover image to 300px
p-spacek Jun 19, 2025
5e3cffd
feat: value-completion-condition-support (#43)
p-spacek Aug 18, 2025
1974d5e
feat: add expected properties to diagnostic message
p-spacek Sep 8, 2025
fffd470
merge main
p-spacek Sep 9, 2025
de13fa9
Merge branch 'main' into fix/merge-tmp
p-spacek Sep 9, 2025
8f139db
Merge branch 'jigx' into feat/add-expected-properties-to-diagnostic-m…
p-spacek Sep 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions l10n/bundle.l10n.de.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"maxItemsWarning": "Array hat zu viele Elemente. Erwartet: {0} oder weniger.",
"uniqueItemsWarning": "Array enthält doppelte Elemente.",
"DisallowedExtraPropWarning": "Eigenschaft {0} ist nicht erlaubt.",
"DisallowedExtraPropWarningWithExpected": "Eigenschaft {0} ist nicht erlaubt. Erwartet: {1}.",
"MaxPropWarning": "Objekt hat mehr Eigenschaften als das Limit von {0}.",
"MinPropWarning": "Objekt hat weniger Eigenschaften als die erforderliche Anzahl von {0}.",
"RequiredDependentPropWarning": "Objekt fehlt die Eigenschaft {0}, die von Eigenschaft {1} benötigt wird.",
Expand Down
1 change: 1 addition & 0 deletions l10n/bundle.l10n.fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"maxItemsWarning": "Le tableau contient trop d'éléments. On attend {0} ou moins.",
"uniqueItemsWarning": "Le tableau contient des éléments en double.",
"DisallowedExtraPropWarning": "La propriété {0} n'est pas autorisée.",
"DisallowedExtraPropWarningWithExpected": "La propriété {0} n'est pas autorisée. Attendu: {1}.",
"MaxPropWarning": "L'objet a plus de propriétés que la limite de {0}.",
"MinPropWarning": "L'objet a moins de propriétés que le nombre requis de {0}",
"RequiredDependentPropWarning": "L'objet ne possède pas la propriété {0} requise par la propriété {1}.",
Expand Down
1 change: 1 addition & 0 deletions l10n/bundle.l10n.ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"maxItemsWarning": "配列の項目数が多すぎます。{0} 項目以下にしてください。",
"uniqueItemsWarning": "配列に重複する項目があります。",
"DisallowedExtraPropWarning": "プロパティ {0} は許可されていません。",
"DisallowedExtraPropWarningWithExpected": "プロパティ {0} は許可されていません。期待される値: {1}。",
"MaxPropWarning": "オブジェクトのプロパティ数が制限値 {0} を超えています。",
"MinPropWarning": "オブジェクトのプロパティ数が必要数 {0} に満たないです。",
"RequiredDependentPropWarning": "プロパティ {1} によって必要とされるプロパティ {0} が存在しません。",
Expand Down
3 changes: 2 additions & 1 deletion l10n/bundle.l10n.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"maxItemsWarning": "Array has too many items. Expected {0} or fewer.",
"uniqueItemsWarning": "Array has duplicate items.",
"DisallowedExtraPropWarning": "Property {0} is not allowed.",
"DisallowedExtraPropWarningWithExpected": "Property {0} is not allowed. Expected: {1}.",
"MaxPropWarning": "Object has more properties than limit of {0}.",
"MinPropWarning": "Object has fewer properties than the required number of {0}",
"RequiredDependentPropWarning": "Object is missing property {0} required by property {1}.",
Expand All @@ -52,5 +53,5 @@
"flowStyleMapForbidden": "Flow style mapping is forbidden",
"flowStyleSeqForbidden": "Flow style sequence is forbidden",
"unUsedAnchor": "Unused anchor \"{0}\"",
"unUsedAlias": "Unresolved alias \"{0}\""
"unUsedAlias": "Unresolved alias \"{0}\""
}
1 change: 1 addition & 0 deletions l10n/bundle.l10n.ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"maxItemsWarning": "배열 항목 수가 너무 많습니다. 최대 {0}개 허용됩니다.",
"uniqueItemsWarning": "배열에 중복된 항목이 있습니다.",
"DisallowedExtraPropWarning": "속성 {0}은(는) 허용되지 않습니다.",
"DisallowedExtraPropWarningWithExpected": "속성 {0}은(는) 허용되지 않습니다. 예상: {1}.",
"MaxPropWarning": "객체에 허용된 속성 수 {0}을 초과했습니다.",
"MinPropWarning": "객체에 필요한 최소 속성 수 {0}보다 적습니다.",
"RequiredDependentPropWarning": "속성 {1}에 필요한 속성 {0}이 누락되었습니다.",
Expand Down
1 change: 1 addition & 0 deletions l10n/bundle.l10n.zh-cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"maxItemsWarning": "数组项数过多。应为 {0} 项或更少。",
"uniqueItemsWarning": "数组中包含重复项。",
"DisallowedExtraPropWarning": "属性 {0} 不被允许。",
"DisallowedExtraPropWarningWithExpected": "属性 {0} 不被允许。预期:{1}。",
"MaxPropWarning": "对象的属性数超过了限制 {0}。",
"MinPropWarning": "对象的属性数少于所需数量 {0}。",
"RequiredDependentPropWarning": "属性 {1} 依赖的属性 {0} 缺失。",
Expand Down
1 change: 1 addition & 0 deletions l10n/bundle.l10n.zh-tw.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"maxItemsWarning": "陣列項目數太多。應為 {0} 項或更少。",
"uniqueItemsWarning": "陣列中有重複項目。",
"DisallowedExtraPropWarning": "不允許的屬性 {0}。",
"DisallowedExtraPropWarningWithExpected": "不允許的屬性 {0}。預期:{1}。",
"MaxPropWarning": "物件的屬性數量超過限制 {0}。",
"MinPropWarning": "物件的屬性數量少於所需的 {0}。",
"RequiredDependentPropWarning": "缺少由屬性 {1} 所需的屬性 {0}。",
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"@vscode/l10n": "^0.0.18",
"ajv": "^8.17.1",
"ajv-draft-04": "^1.0.0",
"fast-uri": "^3.0.6",
"lodash": "4.17.21",
"prettier": "^3.5.0",
"request-light": "^0.5.7",
Expand Down
34 changes: 32 additions & 2 deletions src/languageserver/handlers/languageHandlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import { ResultLimitReachedNotification } from '../../requestTypes';
import * as path from 'path';

export class LanguageHandlers {
public isTest = false;
private languageService: LanguageService;
private yamlSettings: SettingsState;
private validationHandler: ValidationHandler;
Expand Down Expand Up @@ -84,6 +85,31 @@ export class LanguageHandlers {
return this.languageService.findLinks(document);
}

previousCall: { uri?: string; time?: number; request?: DocumentSymbol[] | SymbolInformation[] } = {};
documentSymbolHandlerFix(documentSymbolParams: DocumentSymbolParams): DocumentSymbol[] | SymbolInformation[] {
/**
* I had to combine server and client DocumentSymbol
* And if I use only client DocumentSymbol, outline doesn't work.
* So this is a prevent for double call.
*/
if (
!this.isTest && //don't use cache when testing
this.previousCall.request &&
this.previousCall.time &&
this.previousCall.uri === documentSymbolParams.textDocument.uri &&
new Date().getTime() - this.previousCall.time < 100
) {
return this.previousCall.request;
}

const res = this.documentSymbolHandler(documentSymbolParams);
this.previousCall = {
time: new Date().getTime(),
uri: documentSymbolParams.textDocument.uri,
request: res,
};
}

/**
* Called when the code outline in an editor needs to be populated
* Returns a list of symbols that is then shown in the code outline
Expand All @@ -101,7 +127,10 @@ export class LanguageHandlers {
'document symbols'
);

const context = { resultLimit: this.yamlSettings.maxItemsComputed, onResultLimitExceeded };
const context = {
resultLimit: this.yamlSettings.maxItemsComputed,
onResultLimitExceeded,
};

if (this.yamlSettings.hierarchicalDocumentSymbolSupport) {
return this.languageService.findDocumentSymbols2(document, context);
Expand Down Expand Up @@ -149,7 +178,8 @@ export class LanguageHandlers {
return Promise.resolve(undefined);
}

return this.languageService.doHover(document, textDocumentPositionParams.position);
return this.languageService.doHoverDetail(document, textDocumentPositionParams.position);
// return this.languageService.doHover(document, textDocumentPositionParams.position);
}

/**
Expand Down
110 changes: 107 additions & 3 deletions src/languageserver/handlers/requestHandlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,36 @@
* Copyright (c) Red Hat, Inc. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { Connection } from 'vscode-languageserver';
import { Connection, TextDocumentPositionParams } from 'vscode-languageserver';
import { TextDocument } from 'vscode-languageserver-textdocument';
import {
MODIFICATION_ACTIONS,
SchemaAdditions,
SchemaDeletions,
SchemaDeletionsAll,
} from '../../languageservice/services/yamlSchemaService';
import { LanguageService } from '../../languageservice/yamlLanguageService';
import { SchemaModificationNotification } from '../../requestTypes';
import {
CompletionYamlRequest,
GetDiagnosticRequest,
HoverDetailRequest,
HoverYamlRequest,
RevalidateBySchemaRequest,
RevalidateRequest,
SchemaModificationNotification,
VSCodeContentRequest,
} from '../../requestTypes';
import { SettingsState } from '../../yamlSettings';
import { ValidationHandler } from './validationHandlers';
import { yamlDocumentsCache } from '../../languageservice/parser/yaml-documents';

export class RequestHandlers {
private languageService: LanguageService;
constructor(
private readonly connection: Connection,
languageService: LanguageService
languageService: LanguageService,
private yamlSettings: SettingsState,
private validationHandler: ValidationHandler
) {
this.languageService = languageService;
}
Expand All @@ -25,6 +40,95 @@ export class RequestHandlers {
this.connection.onRequest(SchemaModificationNotification.type, (modifications) =>
this.registerSchemaModificationNotificationHandler(modifications)
);

/**
* Received request from the client that detail info is needed.
*/
this.connection.onRequest(HoverDetailRequest.type, (params: TextDocumentPositionParams) => {
const document = this.yamlSettings.documents.get(params.textDocument.uri);
// return this.languageService.doHover(document, params.position);
return this.languageService.doHoverDetail(document, params.position);
});

/**
* Received request from the client that revalidation is needed.
*/
this.connection.onRequest(RevalidateRequest.type, async (uri: string) => {
const document = this.yamlSettings.documents.get(uri);
if (!document) {
console.log('Revalidate: No document found for uri: ' + uri);
}
await this.validationHandler.validate(document);
});

/**
* Received request from the client that the diagnostic is needed.
* If the file hasn't been opened yet, we need to get the content from the client.
* It's used fot the builder solution diagnostic.
*/
this.connection.onRequest(GetDiagnosticRequest.type, async (uri: string) => {
let document = this.yamlSettings.documents.get(uri);
if (!document) {
const content = await this.connection.sendRequest(VSCodeContentRequest.type, uri);
if (typeof content !== 'string') {
console.log('Revalidate: No content found for uri: ' + uri);
return;
}
document = TextDocument.create(uri, 'yaml', 0, content);
}
const result = await this.languageService.doValidation(document, false);
return result;
});

/**
* Received request from the client that revalidation is needed.
*/
this.connection.onRequest(RevalidateBySchemaRequest.type, async (params: { yaml: string; schema: unknown }) => {
const yamlName = Math.random().toString(36).substring(2) + '.yaml';
const document = TextDocument.create(yamlName, 'yaml', 0, params.yaml);
this.languageService.addSchema(yamlName, params.schema);
try {
const result = await this.languageService.doValidation(document, false);
return result;
} finally {
yamlDocumentsCache.delete(document);
this.languageService.deleteSchema(yamlName);
}
});

/**
* Received request from the client that do completion for expression.
*/
this.connection.onRequest(
CompletionYamlRequest.type,
async (params: { yaml: string; position: TextDocumentPositionParams['position']; fileName: string }) => {
const { yaml, fileName, position } = params;
const document = TextDocument.create(fileName, 'yaml', 0, yaml);
try {
const result = await this.languageService.doComplete(document, position, false);
return result;
} finally {
yamlDocumentsCache.delete(document);
}
}
);

/**
* Received request from the client that do completion for expression.
*/
this.connection.onRequest(
HoverYamlRequest.type,
async (params: { yaml: string; position: TextDocumentPositionParams['position']; fileName: string }) => {
const { yaml, fileName, position } = params;
const document = TextDocument.create(fileName, 'yaml', 0, yaml);
try {
const result = await this.languageService.doHoverDetail(document, position);
return result;
} finally {
yamlDocumentsCache.delete(document);
}
}
);
}

private registerSchemaModificationNotificationHandler(
Expand Down
37 changes: 29 additions & 8 deletions src/languageserver/handlers/settingsHandlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { configure as configureHttpRequests, xhr } from 'request-light';
import { Connection, DidChangeConfigurationNotification, DocumentFormattingRequest } from 'vscode-languageserver';
import {
Connection,
DidChangeConfigurationNotification,
DocumentFormattingRequest,
DocumentSelector, // jigx
} from 'vscode-languageserver';
import { isRelativePath, relativeToAbsolutePath } from '../../languageservice/utils/paths';
import { checkSchemaURI, JSON_SCHEMASTORE_URL, KUBERNETES_SCHEMA_URL } from '../../languageservice/utils/schemaUrls';
import { LanguageService, LanguageSettings, SchemaPriority } from '../../languageservice/yamlLanguageService';
Expand Down Expand Up @@ -33,6 +38,23 @@ export class SettingsHandler {
this.connection.onDidChangeConfiguration(() => this.pullConfiguration());
}

private getDocumentSelectors(settings: Settings): DocumentSelector {
let docSelector: DocumentSelector = [
{ language: 'yaml' },
{ language: 'dockercompose' },
{ language: 'github-actions-workflow' },
{ pattern: '*.y(a)ml' },
];
if (settings.yaml.extraLanguage) {
docSelector = docSelector.concat(
settings.yaml.extraLanguage.map((l) => {
return { language: l };
})
);
}
return docSelector;
}

/**
* The server pull the 'yaml', 'http.proxy', 'http.proxyStrictSSL', '[yaml]' settings sections
*/
Expand Down Expand Up @@ -69,7 +91,7 @@ export class SettingsHandler {
this.yamlSettings.yamlShouldValidate = settings.yaml.validate;
}
if (Object.prototype.hasOwnProperty.call(settings.yaml, 'hover')) {
this.yamlSettings.yamlShouldHover = settings.yaml.hover;
this.yamlSettings.yamlShouldHover = false; //settings.yaml.hover;
}
if (Object.prototype.hasOwnProperty.call(settings.yaml, 'completion')) {
this.yamlSettings.yamlShouldCompletion = settings.yaml.completion;
Expand Down Expand Up @@ -115,6 +137,9 @@ export class SettingsHandler {
this.yamlSettings.yamlFormatterSettings.enable = settings.yaml.format.enable;
}
}
if (settings.yaml.propTableStyle) {
this.yamlSettings.propTableStyle = settings.yaml.propTableStyle;
}
this.yamlSettings.disableAdditionalProperties = settings.yaml.disableAdditionalProperties;
this.yamlSettings.disableDefaultProperties = settings.yaml.disableDefaultProperties;

Expand Down Expand Up @@ -163,12 +188,7 @@ export class SettingsHandler {
if (enableFormatter) {
if (!this.yamlSettings.formatterRegistration) {
this.yamlSettings.formatterRegistration = this.connection.client.register(DocumentFormattingRequest.type, {
documentSelector: [
{ language: 'yaml' },
{ language: 'dockercompose' },
{ language: 'github-actions-workflow' },
{ pattern: '*.y(a)ml' },
],
documentSelector: this.getDocumentSelectors(settings),
});
}
} else if (this.yamlSettings.formatterRegistration) {
Expand Down Expand Up @@ -260,6 +280,7 @@ export class SettingsHandler {
customTags: this.yamlSettings.customTags,
format: this.yamlSettings.yamlFormatterSettings.enable,
indentation: this.yamlSettings.indentation,
propTableStyle: this.yamlSettings.propTableStyle,
disableAdditionalProperties: this.yamlSettings.disableAdditionalProperties,
disableDefaultProperties: this.yamlSettings.disableDefaultProperties,
parentSkeletonSelectedFirst: this.yamlSettings.suggest.parentSkeletonSelectedFirst,
Expand Down
10 changes: 9 additions & 1 deletion src/languageservice/jsonSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

import { CompletionItemKind } from 'vscode-json-languageservice';
import { CompletionItemKind, DiagnosticSeverity } from 'vscode-json-languageservice';
import { SchemaVersions } from './yamlTypes';

export type JSONSchemaRef = JSONSchema | boolean;
Expand Down Expand Up @@ -50,6 +50,7 @@ export interface JSONSchema {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
enum?: any[];
format?: string;
inlineObject?: boolean;

// schema draft 06
// eslint-disable-next-line @typescript-eslint/no-explicit-any
Expand Down Expand Up @@ -81,6 +82,7 @@ export interface JSONSchema {

errorMessage?: string; // VSCode extension
patternErrorMessage?: string; // VSCode extension
patterns?: Pattern[]; // VSCode extension
deprecationMessage?: string; // VSCode extension
enumDescriptions?: string[]; // VSCode extension
markdownEnumDescriptions?: string[]; // VSCode extension
Expand All @@ -93,6 +95,12 @@ export interface JSONSchema {
filePatternAssociation?: string; // extension for if condition to be able compare doc yaml uri with this file pattern association
}

export interface Pattern {
pattern: string;
message: string;
severity?: DiagnosticSeverity;
}

export interface JSONSchemaMap {
[name: string]: JSONSchemaRef;
}
2 changes: 1 addition & 1 deletion src/languageservice/parser/ast-converter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ function toFixedOffsetLength(range: NodeRange, lineCounter: LineCounter): [numbe
const result: [number, number] = [range[0], range[1] - range[0]];
// -1 as range may include '\n'
if (start.line !== end.line && (lineCounter.lineStarts.length !== end.line || end.col === 1)) {
result[1]--;
// result[1]--;
}

return result;
Expand Down
Loading
Loading