Commit graph

21 commits

Author SHA1 Message Date
Remco Haszing
ccfbbbe9d8
Use extensions for directly importing files
For better ESM compatibility, this adds a file extension for nested
package files.

This also removes the nested special handling of
`vscode-languageserver-types` and `vscode-languageserver-document`
imports. This is unnecessary, because they use the `"module"` field in
`package.json`.
2021-11-20 12:05:44 +01:00
Remco Haszing
786cdb5dbb
Implement definition provider 2021-11-10 22:28:06 +01:00
Remco Haszing
7313780510
Extract languageId into constants
It was defined once, but it was passed into various functions. This
added unnecessary complexity.

It is now defined in a constants file, which is imported where
necessary.
2021-09-17 16:21:27 +02:00
Remco Haszing
26173cdbad
Remove logic for unloading the language
It’s not supported in `monaco-editor` nor is it planned.

See https://github.com/microsoft/monaco-editor/issues/2642
2021-09-01 21:23:26 +02:00
Remco Haszing
0da9f2cdfd
Resolve JSON pointers as links 2021-08-25 17:39:53 +02:00
Remco Haszing
8fa3ca4252
Convert classes to factory functions
TypeScript is better at inferring types when using simple functions and
objects instead of classes. As a result many type annotations have now
been removed without impacting type safety.

Some other benefits are this can be minified better and private fields
are now truly private variables.
2021-08-19 17:06:42 +02:00
Remco Haszing
df88461b0c
Merge pull request #78 from remcohaszing/remove-commented-code
Remove commented code
2021-08-19 08:50:21 +02:00
Remco Haszing
3dc04e2150
Remove commented code 2021-08-18 16:04:56 +02:00
Remco Haszing
288c34cd37
Remove DocumentRangeFormattingEditProvider
The YAML language service doesn’t support formatting ranges.

In practice this means the “Format Selection” option which does the same
as “Format Document” is no longer available in the menu that’s opened
when pressing F1.
2021-08-18 15:47:50 +02:00
Remco Haszing
ac7b6fe307
Introduce ESLint
The ESLint preset `eslint-config-remcohaszing` is used.
2021-07-17 17:12:17 +02:00
Remco Haszing
52c457a196
Use monaco-editor/esm/vs/editor/editor.api
This doesn’t enforce users to pull in all of monaco-editor.
2021-04-22 20:00:34 +02:00
Remco Haszing
c4a95e2dd5
Replace monaco namespace with monaco-editor imports
This is a preparation for `monaco-editor@^0.22.0`. In this version the global
`monaco` object was removed for ESM users.

A choice was made to use `monaco-editor` imports, because this probably has
best compatibility for most users. If users want to use `monaco-editor-core`,
they will have to create an alias in their own build process.
2021-04-13 21:18:18 +02:00
Himanshu Kapoor
cf610df47e Remove usage of monaco.Promise
It was removed in Monaco 16.0
2020-07-02 14:46:45 +05:30
Kristen Mills
3503cacea0
Update to the latest version of yaml-language-service (#1) 2020-01-12 17:27:33 -08:00
Peng Xiao
0229f023b0 test: add jest for testing 2018-12-14 18:00:45 +08:00
Peng Xiao
a478bef722 feat: some adjustment to auto completion 2018-12-14 12:16:10 +08:00
Peng Xiao
0784a4311e fix: disable completion for now 2018-11-30 15:05:02 +08:00
Peng Xiao
d80ea14fe0 build: migrate latest json language service implementation 2018-11-23 10:04:33 +08:00
Peng Xiao
a0db642717 chore: align with pengx17/master branch 2018-10-25 10:12:07 +08:00
Kevin Decker
16750098e4 Remove unused tokenization module 2018-02-26 00:02:32 -06:00
Kevin Decker
ad350d08b2 Convert json implementation to yaml libs 2018-02-25 23:36:05 -06:00
Renamed from src/jsonMode.ts (Browse further)