CompletionProvider / IntelliSense
See original GitHub issueThe current CompletionProvider
based VSCode’s html extension needs improvement.
This is to write a new CompletionProvider
to satisfy the following goals:
- Scope based IntelliSense:
Region-based IS is already there (css using css IS, js using js IS). Scope not yet. For example:
<span v-text="|"></span>
here it should suggest all possible values (props, computed props) for the current component. - Correct import / export
- Importing js libs like lodash should add those methods to js region IS.
- Importing vue files should add component to template, like
FooBar.vue
-><foo-bar>
.
- Use
SnippetString
inCompletionItem
to provide Vue API- https://github.com/Microsoft/vscode/blob/master/src/vs/editor/contrib/snippet/common/snippet.md
- For both template region (directives) and js region.
- Possibly also add vuex / vue-router API
Things need to look into:
- Limitations of
SnippetString
for IS vscode-textmate
for getting scope info- How to utilize salsa
While doing it, maybe also add a custom Diagnostics that shows error, such as v-if
using non-existing prop.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:21
- Comments:13 (7 by maintainers)
Top Results From Across the Web
Creating a CompletionProvider to provide additional ...
CompletionProviders are IDE extensions that provide completion items in the intellisense list when user is editing code in the Visual Studio IDE:
Read more >Writing a Visual Studio Code Completion Provider - Blog
An overview of writing VSCode completion providers (intellisense) as an extension developer.
Read more >CompletionProvider Intellisense in extension working only for ...
I have added registerCompletionItemProvider with the triggerCharacters as ':' it works but when i change the triggerCharacters to dot '.' the ...
Read more >ICompletionSourceProvider Interface - Microsoft Learn
Intellisense. Assembly: Microsoft.VisualStudio.Language.Intellisense.dll. Important ... Creates a completion provider for the given context.
Read more >Roslyn Cookbook by Manish Vasani - O'Reilly
Creating a CompletionProvider to provide additional intellisense items while editing code. CompletionProviders are IDE extensions that provide completion ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
An update:
v-*
directives andslot
,key
, andref
IntelliSense are now supported. Upgrade to 0.5.0 to try it out.Thanks to @sandersn’s PR https://github.com/octref/vetur/pull/94, module resolution works now.
I’m planning to find a way to get props / data / computed / methods information from the exported component and use it to power IntelliSense (for both html template and js), and release 0.6 around this weekend.