I would like to enable a VSCode extension only for certain file types.
Specifically, I'd like to enable spell check only in markdown files and other text documents.
Enabling spellcheck by workspace doesn't meet my intent. I often want spellcheck in workspaces that have both markdown and other code files.
Potential lead:
I know languages activation events can be specified in an extension manifest. It doesn't appear that I can customize that manifest without creating a new plugin though.
Related
I'm using VSCode as a note-taking application relying heavily on markdown files. By default, editor.quickSuggestions is disabled for markdown files, which makes sense because the auto complete is way too aggressive. What I'd like is to only trigger quickSuggestions after I type a specific character or characters.
For example:
I've installed the extension kortina.vscode-markdown-notes to allow me to use wiki-links in my notes. When I type [[, I'd like quickSuggestions to pop up so I can select existing files I've created. I only want quickSuggestions to be enabled after typing those two characters specifically.
How can I configure VS Code settings so that the editor for an alternate file type (different file extension) that contains text in the format of a well-known existing editor type can reuse/share the existing editor and editor settings?
A couple of editors where this might be common are custom file extensions that might contain YAML, JSON, or XML. I have alternative file extensions with this content but want to use the existing editor and settings.
One example is essentially telling VS Code that a RAML file should be edited as YAML. There are many examples for each of YAML, JSON, and XML where this would be useful.
p.s. I know that if there is an editor extension available for a specific file extension, this would not be necessary. This is for the case where either there is no editor extension or the extension does not provide editor customization (tabs, etc.)
I'd like to do something like a project file. When the user opens it, the webview of my extension would welcome the user instead of the default VSCode editor.
I know I can workaround it by adding extra context menu items or buttons, but in this case I'm curious if it's possible to override that it by default tries to open in the editor.
Is this possible either manually or automatically?
What you're after sounds exactly like what the upcoming webview / custom editor API hopes to accomplish.
The custom editor API aims to allow extensions to create fully customizable read/write editors that are used in place of VS Code's standard text editor for specific resources. These editors will be based on webviews. We will support editors for both binary and text resources.
See the following issue for more info and further links to the proposed API, example extensions etc:
Custom webview editor API (#77131)
Note that it usually takes a while for new APIs to make it into stable releases after being made available as "proposed APIs".
I am exploring vscode after using atom for a long while. One of the things I'm missing is an equivalent of the lovely package advanced-open-file. Is there something similar to this in vscode?
I found the advanced-new-file extension, but it is only helpful when it comes to new files. I would like to be able to quickly open files from all over my local files (not only the workspace).
Edit: I found the option of workbench.action.quickOpen; but it doesn't allow opening files from the whole file system.
Sorry, but currently the answer is no. The problem is that input box doesn't provide a way to listen to key events:
GitHub issue,
so even the extensions can't do that currently. Here's the comment from advanced-new-file extension creator:
Because VSCode extensions don't yet have the ability to do type-ahead autocomplete within the text input box (See https://github.com/Microsoft/vscode/issues/426), we work around this limitation and provide autocomplete using a two-step workflow of selecting existing path, then providing new filename/path relative to the selection.
The good news is that there is a new API addressing this issue, but it's currently in 'proposed' state and can't be used for published extensions.
One workaround could be typing code -r some/path in integrated terminal and using 'tab' for autocomplete.
The Fuzzy search extension seems to work for me.
It adds a new action to the command palette which allows you to search for files in the current project and open them.
In gedit there is a plugin that completes an existing word in the same file and in different files if both are open.
Does VSCODE have any similar extension?
Yes, VSCode has auto-complete. Language extensions can provide customized auto-complete capabilities, such as context filtering, implicit vocabularies, etc. However, the level of capability will depend on which extensions you have installed and are active. If none of the active extensions provide auto-complete, then VSCode itself provides a very basic version automatically, which is limited to suggesting "words" that have already been entered in the current document.