Open
Conversation
The plugin only works properly for ´.ini´, ´.cfg´ and ´.reg´ files. With these changes it will work for any file being opened with language mode = 'ini' (regardless its file extension).
|
This fix in this pull request would be very welcomed. I have INI files on platforms with case-sensitive file systems that do not work with this extension because the file extension is uppercase (.INI) or even some other file extension that is not one of the default extensions. Also, the fix could be simplified even further by just checking if the language is 'ini'. There is no need for the second line that also checks if the language is 'ini' and the scheme is 'untitled'. The following is sufficient to activate the extension for any INI document whether it is opened from a file or is an untitled/unsaved document: function activate(context) {
context.subscriptions.push(vscode.languages.registerDocumentSymbolProvider([
{ language: 'ini' },
], new documentSymbolProvider_1.IniDocumentSymbolProvider()));
context.subscriptions.push(vscode.languages.registerFoldingRangeProvider([
{ language: 'ini' },
], new foldingRangeProvider_1.IniFoldingRangeProvider()));
} |
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.
The plugin only works properly for ´.ini´, ´.cfg´ and ´.reg´ files.
With these changes it will work for any file being opened with language mode = 'ini' (regardless its file extension).