Skip to content

Commit

Permalink
Release version 0.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
PillFall committed May 7, 2020
2 parents 13a8cc6 + 0a1be9b commit e7faecf
Show file tree
Hide file tree
Showing 5 changed files with 183 additions and 59 deletions.
21 changes: 14 additions & 7 deletions ChangeLog.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
= Change Log
Joar Buitago <jebuitragoc@unal.edu.co>
v0.1.2, 2020-01-21
v0.2.0, 2020-01-21

All notable changes to this project will be documented in this file.

Expand All @@ -13,17 +13,24 @@ link:https://semver.org/spec/v2.0.0.html[Semantic Versioning].

== [Unreleased]

== [0.2.0]
=== Added
* Support for different error colourful faces: misspelling, grammar and style.

=== Fixed
* Jagged minibuffer message

== [0.1.2]
=== Fixed
- Correction fails if language is set.
* Correction fails if language is set.

== [0.1.1]
=== Fixed
- Redundant code for obtaining the java arguments.
* Redundant code for obtaining the java arguments.

== [0.1.0]
=== Added
- Comunication with LanguageTool.
- Functions for the user to use.
- Visual overlay to mark corrections.
- Correction throught minibuffer.
* Communication with LanguageTool.
* Functions for the user to use.
* Visual overlay to mark corrections.
* Correction through minibuffer.
58 changes: 35 additions & 23 deletions ReadMe.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
= languagetool.el
Joar Buitago <jebuitragoc@unal.edu.co>
v0.1.2, 2020-01-21
v0.2.0, 2020-01-21

[.text-center]
--
link:https://melpa.org/\#/languagetool[image:https://melpa.org/packages/languagetool-badge.svg[melpa]]
link:https://stable.melpa.org/\#/languagetool[image:https://stable.melpa.org/packages/languagetool-badge.svg[MELPA Stable]]
--

Use LanguageTool as your Emacs grammar and spelling corrector.

Expand All @@ -11,6 +17,9 @@ parse JSON output, making it incompatible with the original version,
that's why this package is not a forked version and it's made from
scratch.

LanguageTool is an open source proof-reading tool built in Java which
supports more than 30 languages.



== Getting Started
Expand All @@ -28,7 +37,7 @@ is the `languagetool-commandline.jar` file in your `.emacs` file like:
[source,lisp]
----
(setq languagetool-language-tool-jar
"~/.languagetool/languagetool-command-line-jar")
"~/.languagetool/languagetool-commandline-jar")
----

Or via customize. It's preferred to use full path instead.
Expand All @@ -49,25 +58,28 @@ your `.emacs` file like:
(setq languagetool-default-language "en-GB")
----

You can change this latter using `languagetool-set-language` function.



== Usage

There are 5 commands to use, and if you want you can bind they to a key.
There are 5 commands than can be used directly and bound to a key if
desired.

- `languagetool-check` To check the active region or the buffer.
- `languagetool-clear-buffer` To delete all the buffer highlights.
- `languagetool-correct-at-point` To correct the warning at point.
- `languagetool-correct-buffer` To correct the whole buffer.
- `languagetool-set-language` To change correction language.
* `languagetool-check` To check the active region or the buffer.
* `languagetool-clear-buffer` To delete all the buffer highlights.
* `languagetool-correct-at-point` To correct the warning at point.
* `languagetool-correct-buffer` To correct the whole buffer.
* `languagetool-set-language` To change correction language.

For this package the suggested keybinding is:

- `(global-set-key "\C-clc" 'languagetool-check)`
- `(global-set-key "\C-cld" 'languagetool-clear-buffer)`
- `(global-set-key "\C-clp" 'languagetool-correct-at-point)`
- `(global-set-key "\C-clb" 'languagetool-correct-buffer)`
- `(global-set-key "\C-cll" 'languagetool-set-language)`
* `(global-set-key "\C-clc" 'languagetool-check)`
* `(global-set-key "\C-cld" 'languagetool-clear-buffer)`
* `(global-set-key "\C-clp" 'languagetool-correct-at-point)`
* `(global-set-key "\C-clb" 'languagetool-correct-buffer)`
* `(global-set-key "\C-cll" 'languagetool-set-language)`

Once you are correcting with build in functions it will pop-up a
correction buffer at the minibuffer, you only need to choose.
Expand All @@ -76,12 +88,12 @@ correction buffer at the minibuffer, you only need to choose.

== Customizable Variables

For this package there is a few customizable variables that should be
For this package there are a few customizable variables that should be
set in order to take control of LanguageTool suggestions.

- `languagetool-java-bin` Sets the path to the JAVA executable, if it
is in `PATH` only it's name is needed.
- `languagetool-java-arguments` If you need to pass arguments to JAVA
* `languagetool-java-bin` Sets the path to the JAVA executable, if it
is in `PATH` only it's name is needed. Set to `"java"` by default.
* `languagetool-java-arguments` If you need to pass arguments to JAVA
set this variable. It must be a list of strings, one string for
each argument without spaces.
+
Expand All @@ -93,9 +105,9 @@ e.g.
;; or
(setq languagetool-java-arguments '("-flag" "argumentforflag")
----
- `languagetool-language-tool-jar` Sets the path of the LanguageTool
* `languagetool-language-tool-jar` Sets the path of the LanguageTool
command line jar file. It's recommended to put the full path.
- `languagetool-language-tool-arguments` Sets arguments to pass to
* `languagetool-language-tool-arguments` Sets arguments to pass to
LanguageTool. It must be a list of strings, one string for each
argument without spaces.
+
Expand All @@ -107,15 +119,15 @@ e.g.
;; or
(setq languagetool-language-tool-arguments '("-flag" "argumentforflag")
----
- `languagetool-default-language` Sets the LanguageTool correction
* `languagetool-default-language` Sets the LanguageTool correction
language. It can be changed via command with
`languagetool-set-language`.
- `languagetool-mother-tongue` If set LanguageTool behaviour change to
* `languagetool-mother-tongue` If set LanguageTool behaviour change to
correct using `languagetool-default-language` but being aware of
false friends.
- `languagetool-disabled-rules` Tells LanguageTool to ignore these
* `languagetool-disabled-rules` Tells LanguageTool to ignore these
rules when checking text.
- `languagetool-local-disabled-rules` As `languagetool-disabled-rules`
* `languagetool-local-disabled-rules` As `languagetool-disabled-rules`
tells LanguageTool to ignore these rules when checking text but it's
buffer local, so if you want you can set it in your local variables
comment.
86 changes: 86 additions & 0 deletions languagetool-issue-faces.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
;;; languagetool-issue-faces.el --- LanguegeTool correction faces -*- lexical-binding: t; -*-

;; Copyright (C) 2020 Joar Buitrago

;; Author: Joar Buitrago <jebuitragoc@unal.edu.co>
;; Keywords: grammar text docs tools
;; URL: https://github.com/PillFall/Emacs-LanguageTool.el
;; Version: 0.2.0
;; Package-Requires: ((emacs "25.1"))

;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.

;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.

;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <https://www.gnu.org/licenses/>.

;;; Commentary:

;; LanguageTool correction faces. Get from LanguageTool API.
;;
;; Addition, Characters, Duplication, Formatting, Grammar,
;; Inconsistency, InconsistentEntities, Internationalization, Legal,
;; Length, LocaleSpecificContent, LocaleViolation, Markup,
;; Misspelling, Mistranslation, NonConformance, Numbers, Omission,
;; Other, PatternProblem, Register, Style, Terminology, Typographical,
;; Uncategorized, Untranslated, Whitespace

;;; Code:

;; Faces:

(defface languagetool-default-face
'((((class mono))
:inverse-video t
:underline t)
(((class color))
:background "yellow"
:foreground "black")
(t (:bold t)))
"Default error face."
:group 'languagetool)

(defface languagetool-misspelling-face
'((((class mono))
:inverse-video t
:underline t)
(((class color))
:background "red"
:foreground "white")
(t :bold t))
"LanguageTool misspelling error face."
:group 'languagetool)

(defface languagetool-grammar-face
'((((class mono))
:inverse-video t
:underline t)
(((class color))
:background "green"
:foreground "black")
(t :bold t))
"LanguageTool grammar error face."
:group 'languagetool)

(defface languagetool-style-face
'((((class mono))
:inverse-video t
:underline t)
(((class color))
:background "blue"
:foreground "white")
(t :bold t))
"LanguageTool style error face."
:group 'languagetool)


(provide 'languagetool-issue-faces)

;;; languagetool-issue-faces.el ends here
Loading

0 comments on commit e7faecf

Please sign in to comment.