psi-header icon indicating copy to clipboard operation
psi-header copied to clipboard

Compact mode not working

Open robross0606 opened this issue 6 months ago • 2 comments

I am trying to create a simple header using "Compact Mode" but it seems to be ignored. My config is:

  "psi-header.config": {
    "license": "custom",
    "forceToTop": true,
    "blankLinesAfter": 1
  },
  "psi-header.changes-tracking": {
    "isActive": true,
    "autoHeader": "autoSave",
    "enforceHeader": true
  },
  "psi-header.lang-config": [
    {
      "language": "*",
      "begin": "",
      "end": "",
      "prefix": "// "
    }
  ],
  "psi-header.templates": [
    {
      "language": "*",
      "template": [
        "Copyright (c) <<yeartoyear>> My Company. All Rights Reserved."
      ]
    }
  ]

However, created files end up with this:

/*
 * Copyright (c) 2025 My Company. All Rights Reserved.
 */

What am I doing wrong in terms of making "Compact Mode" work?

robross0606 avatar Jul 04 '25 11:07 robross0606

From what I can tell, it is not working if you set "language": "*" even though the documentation specifically says you can do this:

You can do this on the default language configuration (lang-config.language = "*") to apply to all languages.

If I set it to a specific language and save a file of that type, it does work. But setting language to "*" or "*DEFAULTS*" doesn't appear to work.

robross0606 avatar Jul 04 '25 11:07 robross0606

I'll take a closer look, but I think you are right that this is a bug.

Regards D

davidquinn avatar Jul 04 '25 17:07 davidquinn