Skip to content

Commit

Permalink
Merge pull request #5 from DoCode/4-language-scope
Browse files Browse the repository at this point in the history
Language agnostic settings
  • Loading branch information
DoCode authored Feb 13, 2020
2 parents 2b463f4 + 762bdec commit 523710c
Show file tree
Hide file tree
Showing 5 changed files with 144 additions and 739 deletions.
28 changes: 25 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,31 @@

All notable changes to the "vscode-remove-final-newlines" extension will be documented in this file.

## [v1.1.1] - 2019-04-0

- Print only previous action on statusbar
## [v1.2.0] - 2020-02-13

- Support for language scope (file type) configuration
Now it's possible to override a global config for file types.

**Example:**

```json
. . .
"files.insertFinalNewline": false,
"files.removeFinalNewlines": true,
"files.trimFinalNewlines": false,
"files.trimTrailingWhitespace": true,
"[markdown]": {
"files.insertFinalNewline": true,
"files.removeFinalNewlines": false,
"files.trimFinalNewlines": true,
"files.trimTrailingWhitespace": false
},
. . .
```

## [v1.1.1] - 2019-04-06

- Print only previous action on the status bar

## [v1.1.0] - 2019-04-05

Expand Down
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ A [Visual Studio Code](https://code.visualstudio.com/) extension that removes fi

### Using Command Palette (CMD/CTRL + Shift + P)

```
```cmd
CMD + Shift + P -> Remove Final Newlines: Format document and remove final newlines
```

Expand All @@ -22,6 +22,23 @@ Enable or disable by setting `files.removeFinalNewlines` (default: `false`) in V
}
```

The setting `files.removeFinalNewlines` can be overridden by language specific settings:

```json
. . .
"files.insertFinalNewline": false,
"files.removeFinalNewlines": true,
"files.trimFinalNewlines": false,
"files.trimTrailingWhitespace": true,
"[markdown]": {
"files.insertFinalNewline": true,
"files.removeFinalNewlines": false,
"files.trimFinalNewlines": true,
"files.trimTrailingWhitespace": false
},
. . .
```

## Custom Keyboard Shortcut

Use the following shortcut in keybindings.json to execute the default Format Document command and then remove final newlines.
Expand Down
Loading

0 comments on commit 523710c

Please sign in to comment.