Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding support for different comment styles + multi-line notes #13

Closed
wants to merge 2 commits into from
Closed

Conversation

kosude
Copy link

@kosude kosude commented Dec 12, 2022

Languages that don't use // or /* */ for comments, such as Python, may now be supported. Python and Shell scripts have currently been added. This would solve #8.


The note can now contain multiple lines (possible by setting copyrighter.note in the JSON preferences instead of UI). Previously attempting to do so would result in the comment prefix not being added to each line.

Languages like Python which use # for comments instead of // can now be supported. I've specified Python files and Shell scripts as options
for this currently, but the process of adding more is hopefully relatively self-explanatory (but instead of adding the lang-id to the configuredLanguages enum,
add it to the appropriate language style enum).
@moyarich
Copy link

moyarich commented Apr 5, 2023

could we get support for the comment style
/** */

/**
 * Copyright 2023.
 */

@moyarich
Copy link

moyarich commented Apr 5, 2023

this is how i am currently using the plugin for work, but it would be nice to be able to get comments starting with double asterisks

Current: Copyrighter settings:

{
  "copyrighter.author": "Amazon.com, Inc. and its affiliates.",
  "copyrighter.license": "none",
  "copyrighter.note": "\n *   Licensed under the Amazon Software License (the \"License\").\n *   You may not use this file except in compliance with the License.\n *   A copy of the License is located at\n *\n *   http://aws.amazon.com/asl/\n *\n *   or in the \"license\" file accompanying this file. This file is distributed\n *   on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n *   express or implied. See the License for the specific language governing\n *   permissions and limitations under the License.",
  
}

The above settings gives me this result
image

but i would love to have this instead
image

@kosude
Copy link
Author

kosude commented Apr 8, 2023

I also wouldn't mind having the feature you've proposed, however...

I realise this repo hasn't been maintained in a while, and I doubt my PR will be merged anyway as I'm sure it isn't very high priority for the devs who likely have other (probably more important) things to do.

For what it's worth, though, I have started a rewrite (fork? not sure what the best term is) of it in a way that might accommodate options like this a little better. It's currently pretty barebones obviously, but I'll try and make time to work on it more.

@moyarich
Copy link

moyarich commented Apr 24, 2023

i love that i can change the comment style to what I want in neocopyrighter

@moyarich
Copy link

moyarich commented Apr 24, 2023

The feature that i really need "Custom body text" . I assume it is the same as copyrighter.note

It is not implemented yet in neocopyrighter . could you send an update when it is ready

@kosude
Copy link
Author

kosude commented Apr 30, 2023

I think the latest version of the extension on GH has the sort of thing you're looking for.

A custom body text can be achieved by setting neocopyrighter.licence.identifier to "use custom", and then you can set neocopyrighter.licence.customLicenceBody to the body text you want. Make sure you have neocopyrighter.licence.includeFullForm also set to true so that the custom body text is shown.

Correct me if this isn't what you have in mind. I know its a pretty convoluted way of doing it and I might re-do the settings for it at some point, unfortunately I'm pretty busy with things at the moment.

If you have any other implementation requests, please make an issue or PR on that repo instead of this PR, so I can track it a bit better. Thanks!

@kosude kosude closed this May 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants