linguist icon indicating copy to clipboard operation
linguist copied to clipboard

Add KCL, KFramework Languages

Open mihaigalos opened this issue 6 months ago • 6 comments

Description

This PR was initially produced to offer support for the KCL language. During review, we found out that the *.k file extension may conflict with other languages so the PR addresses both KCL and KFramework languages.

Checklist:

  • [x] I am adding a new language.

    • [x] The extension of the new language is used in hundreds of repositories on GitHub.com.
      • Search results for each extension:
        • https://github.com/search?type=code&q=NOT+is%3Afork+path%3A*.k+kcl
    • [x] I have included a real-world usage sample for all extensions added in this PR:
      • Sample source(s):
        • https://github.com/kcl-lang/examples
      • Sample license(s): Apache - https://www.kcl-lang.io/docs/community/intro/license
    • [x] I have included a syntax highlighting grammar: https://github.com/kcl-lang/vscode-kcl.git
    • [x] I have added a color
      • Hex value: ##00ADD8
      • Rationale: This color represents one of the 4 colours of the KCL logo.
    • [x] I have updated the heuristics to distinguish my language from others using the same extension.
  • [x] I am adding a new language.

    • [x] The extension of the new language is used in hundreds of repositories on GitHub.com.
      • Search results for each extension:
        • https://github.com/search?type=code&q=NOT+is%3Afork+path%3A*.k
    • [x] I have included a real-world usage sample for all extensions added in this PR:
      • Sample source(s):
        • https://github.com/runtimeverification/k/tree/master/pyk/regression-new
      • Sample license(s): BSD 3 Clause - https://github.com/runtimeverification/k/blob/master/LICENSE.md
    • [x] I have included a syntax highlighting grammar: https://github.com/LucianCumpata/K-VSCode
    • [x] I have added a color
      • Hex value: #4195c5
      • Rationale: This color represents the color used in the K Framework logo.
    • [x] I have updated the heuristics to distinguish my language from others using the same extension.

mihaigalos avatar Jul 12 '25 21:07 mihaigalos

@mihaigalos

Me and my team are heavy users of KCL, I am willing to provide any assistance for this feature if needed :)

alexdaima avatar Jul 13 '25 04:07 alexdaima

@lildude @mihaigalos

I can confirm the samples provided with the .k extension in this PR are very much KCL, a few references below show some of the documentation for the samples that were provided:

As for the property filenames: I agree that while .k should be removed, there should actually be the addition of kcl.mod and kcl.mod.lock, both of which are always called as such (KCL Package Manifest file) and are used heavily when installing/importing packages/modules from ArtifactHub.

Note that actually in Github kcl.mod files (Examples) are currently being incorrectly interpreted as AMPL.

Here are a few other resources that match against the .k extension in order to associate with KCL:

Other languages that seem to use .k:

  • K Framework does use .k files and is in active usage, but with a very different syntax. An example can be found here.
  • Was once used by K Language, which was commercialized by KX Systems, but the K language now just stands as a predecessor of the Q Language which is used in their kdb+ database.

alexdaima avatar Jul 13 '25 11:07 alexdaima

Hi @lildude, @alexdaima,

I've addressed your comments and added the KFramework as part of this PR. The jobs are failing because the license for K-VSCode.dev.yml is not yet allowed. Can you please have a look?

mihaigalos avatar Jul 13 '25 12:07 mihaigalos

@mihaigalos

As I see you added #00ADD8 for the color of the language, I just want to add that Go Lang uses this exact same color, and as KCL and Go are often used in the same project due to both used heavily in the DevOps setting, I propose the following which is based on what I see as the color in the KCL logo #7ABABF (which is then actually different to that of Go).

Screenshot 2025-07-13 at 20 19 55

alexdaima avatar Jul 13 '25 12:07 alexdaima

Hi @lildude - can you please have a look again? Thanks.

mihaigalos avatar Jul 24 '25 11:07 mihaigalos

@lildude

As checks are now passing, is the PR ready to be merged and included now?

alexdaima avatar Nov 02 '25 00:11 alexdaima