Skip to content

Commit

Permalink
added icon
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick Fode committed Apr 10, 2017
1 parent e930ef0 commit 4a5e923
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Change Log
All notable changes to the "latex-formatter" extension will be documented in this file.

## 1.0.2 - 2017-04-10
### Added
- Icon
## 1.0.1 - 2017-04-10
### Added
- GIF with Example
Expand Down
9 changes: 9 additions & 0 deletions img/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "latex-formatter",
"displayName": "latex-formatter",
"description": "Simple LaTex formatter.",
"icon": "img/icon.svg",
"version": "1.0.1",
"publisher": "nickfode",
"repository": {
Expand All @@ -12,7 +13,7 @@
"vscode": "^1.10.0"
},
"categories": [
"Other"
"latex","tex","formatter","beautify"
],
"activationEvents": [
"onLanguage:latex"
Expand Down
4 changes: 3 additions & 1 deletion src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ const LATEX_MODE: vscode.DocumentFilter = { language: 'latex', scheme: 'file' };
export class LaTexFormatter {
public formatDocument(document: vscode.TextDocument): Thenable<vscode.TextEdit[]> {
return new Promise((resolve, reject) => {
let formatter = 'latexindent';

let filename = document.fileName;
var edit = null;
cp.exec('latexindent ' + filename, (err, stdout, stderr) => {
cp.exec(formatter + filename, (err, stdout, stderr) => {
edit = [vscode.TextEdit.replace(fullRange(document), stdout)];
return resolve(edit);
});
Expand Down

0 comments on commit 4a5e923

Please sign in to comment.