Coder Social home page Coder Social logo

rlnt / vscode-keepachangelog Goto Github PK

View Code? Open in Web Editor NEW
13.0 2.0 3.0 3.96 MB

A VSCode extension that provides snippets for markdown files to create a changelog with the ruleset of Keep a Changelog.

License: GNU Lesser General Public License v3.0

TypeScript 100.00%

vscode-keepachangelog's Introduction

Keep a Changelog

A Visual Studio Code extension that provides snippets for markdown files to create a changelog with the ruleset of Keep a Changelog.

Version Downloads Workflow Status License

Marketplace | Releases

๐Ÿ“‘ Overview

This is an extension for Visual Studio Code.

It lets you easily create changelogs with snippets which follow the ruleset of Keep a Changelog.
It is recommended to use it with Semantic Versioning.

Key Features:

  • several snippets to save time when creating a changelog
  • snippet preview in IntelliSense
  • customizable date format via extension settings
  • more extension settings to fit your needs
  • tab autofill mechanics to overwrite key values
  • automatic cursor positioning after the snippet was pasted

Preview:

preview

Includes Snippets:

Snippet Description
cl-init Initiates a new changelog with the header, needed links and a place for your releases and tags.
cl-version Creates a standalone version tag. The version number and the date can be overwritten by using tabs. The current date is pasted by default.
cl-version-full Same as changelog-version but additionally pastes all entries: added, changed, deprecated, removed, fixed, security.
cl-entries Only pastes all entries without the version tag: added, changed, deprecated, removed, fixed, security.
cl-added Creates an added entry.
cl-changed Creates a changed entry.
cl-deprecated Creates a deprecated entry.
cl-removed Creates a removed entry.
cl-fixed Creates a fixed entry.
cl-security Creates a security entry.
cl-link-first Creates a reference link for your first version tag. The version number and the keys for the URL can be overwritten by using tabs.
cl-link-compare Creates a reference link to compare two versions. This should be used for any version past the first version. The version numbers and the keys for the URL can be overwritten by using tabs.

๐Ÿ”ง Installation

Go to the Visual Studio Code Marketplate and click the install button on the top of the site. You should be prompted to open Visual Studio Code in order to install the extension.

You can also use the integrated extension browser in VSCode to install it.

If you want to manually install the extension, check out the releases to download the latest .vsix file.

๐Ÿ“– Usage

By default, snippets will only be available in Markdown files which are called changelog.md (case-insensitive).
If you want to change that, you can do this in the extension settings. Keep in mind that only Markdown files are supported though.

This ensures that you only have the changelog snippets in the files you want them so they are not suggested in all Markdown documents.
You can also configure if the snippets should be suggested in unnamed files.

All snippets of this extension are prefixed with cl-.
The - is a trigger character which means that as soon as you write the -, you will get suggestions with snippets from the extension.

If you don't want this, you can disable the trigger character in the extension settings as well.

Furthermore, you can manually trigger the snippet suggestions because they mostly stay hidden in Markdown files as a standard behaviour of VSCode itself.
To do that, press CTRL + Spacebar after writing cl and you should see the snippets.

This is the default keybind for suggestions. If this doesn't work for you, make sure you check which keybind you have set for editor.action.triggerSuggest.

Take a look at the additional settings and configure the extension to your liking.

โฐ Changelog

Everything related to versions and their release notes can be found in the changelog.

๐ŸŽ“ License

This project is licensed under the LGPL-3.0.

vscode-keepachangelog's People

Contributors

dependabot[bot] avatar egfx-notifications avatar imgbotapp avatar rlnt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

vscode-keepachangelog's Issues

Generated markdown does not pass lint test

There are some minor formatting issues with the generated markdown. Mainly has to do with insufficient newlines.

Tests were performed with the markdownlint extension installed in VS Code. I also edit my CHANGELOG.md file in VS Code.

Steps to reproduce

  1. Open your MARKDOWN.md file in VS Code.
  2. Put your caret after the [Unreleased] header, as shown in FIGURE1 (at the bottom of this issue).
  3. Type c, then CTRL+SPACE (to auto-complete) and select cl-added. Press ENTER.

The generated markdown (FIGURE2 below) has several markdown lint violations of type MD022/blanks-around-headings/blanks-around-headers:

Headings should be surrounded by blank lines

Expected Output

The markdown (based on FIGURE2) that is expected is below:

## [Unreleased]

### Added

-

### Changed

- Unrecognized or unwanted YAML properties in configuration YAML (`trash.yml`) now result in an
  error. This is to help users more easily identify mistakes.

Specifically:

  • A blank line between ## [Unreleased] and ### Added
  • A blank line between ### Added and - (the first bullet point item in the list of added items)
  • A blank line between the - and the next section header, which is ### Changed in my case.

Supporting Attachments

FIGURE1:

image

FIGURE2:

image

Suggestions cannot be displayed using the "cl" character

I used to be able to use the "cl" prefix to get suggestions when using plugins, but recently I've found that I can only use "cl-" to get suggestions. Could you add a setting that triggers suggestions with a custom prefix?

I tried set "keep-a-changelog.triggerCharacter" to false, but that won't trigger any suggestions (unless you use the suggestions shortcuts).

image

image

Completions don't remove the cl- prefix, mangling the output

It seems like the cl- prefix before a command is getting left behind when the command is replaced, which results in mangled markdown and requires that the user deletes the cl- before each section, which is a pain.

Screen.Recording.2023-05-16.at.14.27.31.mov

Ideally the entire prompt phrase should be removed and replaced with the markdown snippet, as shown in the demo for the extension.

No automatic suggestions

When I write cl- I do not get a list of suggestions automatically. What could be the reason for this?

Snippets autocomplete doesn't appear

Describe the bug
Autocomplete snippets doesn't appear on VSCODE

To Reproduce

  1. Create a CHANGELOG.md file in a project
  2. Try to use a snippet es. changelog-init

Expected behavior
Suggestion must appear above the text

Screenshots & Logs
If applicable, add screenshots and/or logs to help explain your problem.

Versions (please complete the following information):
Version: 1.50.1
Commit: d2e414d9e4239a252d1ab117bd7067f125afd80a
Date: 2020-10-13T14:44:48.716Z
Electron: 9.2.1
Chrome: 83.0.4103.122
Node.js: 12.14.1
V8: 8.3.110.13-electron.0
OS: Linux x64 5.8.0-7625-generic

Additional extensions
Vue Snippets (sdras.vue-vscode-snippets)
Vuetify-vscode
Vscode Nestjs Snippets (ashinzekene)

Auto generate the chnagelog from the git history

It would be nice to be able to auto generate a changelog entry for a release from a git history.

Select a commit or a tag and the extension just extracts all commit messages to generate the release changelog entry.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.