Release 3.3.0: navigation, offline checks and colours - #5
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Navigation. Go to Definition, Find All References, Document Highlight and Rename Symbol for functions, methods, types, enums, enum members, variables, parameters and import aliases. Resolution is scope aware: a global
lengthis left alone inside a function that takes its ownlengthparameter, and named arguments, import paths and type fields are never mistaken for references. Renaming a built-in is refused rather than half applied.Offline checks. Nine rules run as you type with no network, so every user gets feedback whether or not they opt into the TradingView compiler:
missing-version,old-version,legacy-name,local-scope-call,unknown-argument,duplicate-argument,unused-variable,unused-parameter,unused-import. Most carry a quick fix. Pine Script: Convert to v6 applies the migration fixes across a file and reports exactly what it changed.Colours. Swatches with a picker for hex literals, the built-in constants,
color.new()andcolor.rgb(). The constant values are read from the shipped reference data rather than hardcoded.Semantic highlighting. The identifiers a document declares are classified, so parameters, enum members, type fields and import aliases are coloured for what they are. Both themes gained matching
semanticTokenColorsand now enable semantic highlighting.Test plan
npm test(322 tests, 65 of them new)npm run buildandvsce packagelocal-scope-calland the colour model were derived from compiler probes rather than assumed