Can't override default extensions option
See original GitHub issueClear and concise description of the problem
Can’t override default extensions option
Suggested solution
Replace basicSetup
with minimalSetup
or set the default extensions to []
Alternative
No response
Additional context
No response
Validations
- Check that there isn’t already an issue that request the same feature to avoid creating a duplicate.
Issue Analytics
- State:
- Created a year ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Why can't change the default program to open an extension in ...
Solution: Found the below reg key [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts.eml] Deleted the .eml key. Double clicked the .
Read more >Declarations from extensions cannot be overridden yet in Swift 4
But in the above scenario, I am not overriding the method isValid() in extension. It is overridden in the SampleCell class definition itself....
Read more >Chrome Extensions: Overriding Chrome pages
Note: A single extension can override only one page. For example, an extension can't override both the Bookmark Manager and History pages.
Read more >Allow `override` of `open` methods in & from extensions in ...
I use extension a lot to clarify my code, separating the main declaration of a class/struct and its properties from the methods I...
Read more >[snippets] Cannot override/disable snippets defined ... - GitHub
One of the Go Extension users talks about the ability to override/disable the snippets defined in the Go extension. vscode-go/#385.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
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
Top GitHub Comments
But what if I don’t want to install it globally? I don’t even want to import codemirror on page load, only when it’s needed.
Solution 1: Add a
useBasicSetup
(or similarily named) prop to the component with default value oftrue
to not break existing code. Handling reactivity for this would cause complications. But personally I would not mind if this prop wasn’t handled reactively.Solution 2: Expose the config injection symbol to be able to provide the “global” config in wrapper components. It’s uglier, but less expected to be reactive this way.
Hi @kabalage
Sorry for the late reply.
It’s true that creating a redundant concept is not elegant and can be ambiguous, but I need to confirm the difference between
props.extensions
andbasicExtensions
, which are consumed by passingEditorState.create({ extensions })
which may be contradictory to vue’s responsiveness, so it is not certain thatbasicExtensions
is a concept that can be ignored.