Closed Andrew1Medvedev closed 1 year ago
@Andrew1Medvedev thanks for the contribution. I made a couple of changes. Please take a look and let me know if those changes are ok for you.
Basically, I wanted to include the language configuration and the code snippets in the GrammarDefinitions, and the Language objects.
I also added unit tests for the new functionality.
Hi Daniel,
Could you please explain how GetGrammarDefinitionByName can be used? As I see it does not take into account case sensitivity. For example: SupportedGrammars: "CSharp" While Language.ID: "csharp"
Regards, Andrew
On Thu, May 4, 2023 at 9:01 PM Daniel Peñalba @.***> wrote:
@Andrew1Medvedev https://github.com/Andrew1Medvedev thanks for the contribution. I made a couple of changes. Please take a look and let me know if those changes are ok for you.
Basically, I wanted to include the language configuration and the code snippets in the GrammarDefinitions, and the Language objects.
I also added unit tests for the new functionality.
— Reply to this email directly, view it on GitHub https://github.com/danipen/TextMateSharp/pull/50#issuecomment-1534562675, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKGLIWBXDAIPE6DYKIYW4ATXEOD7BANCNFSM6AAAAAAXVEGQHY . You are receiving this because you were mentioned.Message ID: @.***>
Could you please explain how GetGrammarDefinitionByName can be used?
Well in fact... it's not used by the package itself. I exposed that API just in case someone needed it.
So If you don't need it, we can remove.
Basically the grammar name is the storage name (the name of the folder the grammar package is located)...
So for example in the case of markdown the grammar name is markdownbasics
... (the language name is markdown
)
A little bit confusing maybe ... So if that API is not needed for you let's remove.
Most of use cases I guess will be get the lang/grammar from the extension or from the scope name...
Hi Daniel,
All these changes are ok for me.
Regards, Andrew
On Fri, May 5, 2023 at 4:48 PM Daniel Peñalba @.***> wrote:
Basically the grammar name is the storage name (the name of the folder the grammar package is located)... So for example in the case of markdown the grammar name is markdownbasics ... (the language name is markdown)
A little bit confusing maybe ... So if that API is not needed for you let's remove.
Most of use cases I guess will be get the lang/grammar from the extension or from the scope name...
— Reply to this email directly, view it on GitHub https://github.com/danipen/TextMateSharp/pull/50#issuecomment-1535794344, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKGLIWD7CJKKYHWIWUJV2UDXESPCBANCNFSM6AAAAAAXVEGQHY . You are receiving this because you were mentioned.Message ID: @.***>
Great so I'll remove that API and will merge this PR into master and will generate a new nuget.
@Andrew1Medvedev a new version of TextMateSharp is available in nuget, including this PR: https://www.nuget.org/packages/TextMateSharp/1.0.54
Thanks for the contribution! 🙏
This PR includes
LanguageConfiguration
andCodeSnippets
in the grammar definition objects.Fixes #48.