danipen / TextMateSharp

A port of tm4e to bring TextMate grammars to dotnet ecosystem
MIT License
87 stars 15 forks source link

Add Theme name #50

Closed Andrew1Medvedev closed 1 year ago

Andrew1Medvedev commented 1 year ago

This PR includes LanguageConfiguration and CodeSnippets in the grammar definition objects.

Fixes #48.

danipen commented 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.

Andrew1Medvedev commented 1 year ago

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: @.***>

danipen commented 1 year ago

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.

danipen commented 1 year ago

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...

Andrew1Medvedev commented 1 year ago

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: @.***>

danipen commented 1 year ago

Great so I'll remove that API and will merge this PR into master and will generate a new nuget.

danipen commented 1 year ago

@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! 🙏