Add importMap option to deno Initialization Options #3827
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces the addition of
importMap
key used in the Deno LSP to be able to map URLs into module names. Import maps manual can be found here and the json file found in their tests useimportMap
as part of theInitializationOptions
which can be found here.By default,
import_map.json
file will be searched in the project root directory and be used, if found, and gives the user the choice to use another filename to identify theimportMap
file.In addition to that, I've also added deno as a linter option forjavascript
, let me know if you'd like that as a separate PR instead.For tests, I've added two different import map files (default and a user defined file) in the
test/test-files/typescript
directory.Edit: I've removed deno as a linter for javascript for now, making a separate PR for it. This will just focus on adding
importMap
option to deno lsp initialization options.