-
-
Notifications
You must be signed in to change notification settings - Fork 219
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #362 from BetterThanTomorrow/wip/clojure-warrior-i…
…nline Move Clojure Warrior into Calva
- Loading branch information
Showing
13 changed files
with
702 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
# 0.2.4 - July 12, 2019 | ||
|
||
- Fixed trailing whitespace in comment, symbols with word comment in them (#15, #17) | ||
|
||
# 0.2.3 - July 10, 2019 | ||
|
||
- Do not merge defaults for `commentFormStyle` and `ignoredFormStyle` | ||
|
||
# 0.2.2 - July 10, 2019 | ||
|
||
- Comment decoration (#14 by @PEZ) | ||
|
||
# 0.2.1 - July 4, 2019 | ||
|
||
- Removed `configurationDefault` as it was conflicting with Calva (#13) | ||
|
||
# 0.2.0 | ||
|
||
- Option to disable rainbow brackets `clojureWarrior.enableBracketColors` (#12) | ||
- Handle setting `clojureWarrior.bracketColors` to empty array (#12) | ||
- Handle config changes when done from Setting GUI | ||
- Disable default `editor.matchBrackets` for Clojure files | ||
|
||
# 0.1.8 | ||
|
||
- Highlight and match compound brackets: `#()`, `#{}`, `#?()`, `#?@()` (#10, thx @maratynsky) | ||
|
||
# 0.1.7 | ||
|
||
- Show mismatched brackets on scrollbar (#7, #8) | ||
|
||
# 0.1.6 | ||
|
||
- Avoid bracket styles bleeding into text typed next to them | ||
|
||
# 0.1.5 | ||
|
||
- Don’t show matched brackets inside selection (#4) | ||
- Do not alter `editor.matchBrackets` in config dynamically (#3) | ||
- Showing matching bracket immediately since it’s fast (#5) | ||
- Jump to match should scroll if needed (#2) | ||
|
||
# 0.1.4 | ||
|
||
- More distinct rainbow colors by default | ||
- Default settings support both dark and light themes | ||
|
||
# 0.1.3 | ||
|
||
- New command: `clojureWarrior.jumpToMatchingBracket` | ||
- New command: `clojureWarrior.selectToMatchingBracket` | ||
- `editor.matchBrackets` is set to false only for Clojure editors | ||
- `matchPairs` is scheduled asynchronously not to slow down text editing | ||
|
||
# 0.1.2 | ||
|
||
- Highlight bracket pairs | ||
- Added config param: `"clojureWarrior.matchedBracketStyle": {"backgroundColor": "#E0E0E0"}` | ||
|
||
# 0.1.1 | ||
|
||
Added configuration parameters: | ||
- `"clojureWarrior.bracketColors": ["#000", "#999", ...]` | ||
- `"clojureWarrior.cycleBracketColors": true` | ||
- `"clojureWarrior.misplacedBracketStyle": { "border": "2px solid #c33" }` | ||
|
||
# 0.1.0 | ||
|
||
- Initial release | ||
- Rainbow Brackets |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2017 Nikita Prokopov | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
# Clojure Warrior | ||
|
||
<img src="https://raw.githubusercontent.com/tonsky/clojure-warrior/master/extras/icon.png" width="128px" height="128px"> | ||
|
||
Visual Studio Code extension for Clojure development | ||
|
||
## Features | ||
|
||
Rainbow brackets: | ||
|
||
- Chooses bracket color based on nesting level | ||
- Distinct bracket colors, plays well with [Alabaster theme](https://marketplace.visualstudio.com/items?itemName=tonsky.theme-alabaster) | ||
- Properly handles strings, comments and escaped characters | ||
- Highlights misplaced brackets | ||
|
||
Bracket pair matching: | ||
|
||
- Higlights corresponding bracket pair to the one under the cursor | ||
- Considers bracket directon and cursor position relative to it | ||
- Only highlights pair when cursor is standing _outside_ the expression (right after the closed bracket or right before opening one) | ||
|
||
Jump to matching bracket commands: | ||
|
||
- Jump to corresponding bracket pair (same rules as in bracket pair matching): `clojureWarrior.jumpToMatchingBracket` | ||
- Select a region between cursor and matching bracket (including brackets): `clojureWarrior.selectToMatchingBracket` | ||
|
||
![Screenshot](https://raw.githubusercontent.com/tonsky/clojure-warrior/master/extras/screenshot.png) | ||
|
||
## Configuration | ||
|
||
| Key | Meaning | Example | | ||
| --- | ------- | ------- | | ||
| `"clojureWarrior.enableBracketColors"` | Enable rainbow colors | `true` | | ||
| `"clojureWarrior.bracketColors"` | Which colors to use | `["#000", "#999"]` | | ||
| `"clojureWarrior.cycleBracketColors"` | Whether same colors should be reused for deeply nested brackets | `true` | | ||
| `"clojureWarrior.misplacedBracketStyle"` | Style of misplaced bracket | `{ "border": "2px solid #c33" }` | | ||
| `"clojureWarrior.matchedBracketStyle"` | Style of bracket pair highlight | `{"backgroundColor": "#E0E0E0"}` | | ||
| `"clojureWarrior.commentFormStyle"` | Style of `(comment ...)` form | `{"textDecoration": "none; opacity: 0.5"}` | | ||
| `"clojureWarrior.ignoredFormStyle"` | Style of `#_...` form | `{"textDecoration": "none; opacity: 0.5"}` | | ||
|
||
To disable VS Code default bracket matching for Clojure files, add this to `settings.json`: | ||
|
||
``` | ||
"[clojure]": { | ||
"editor.matchBrackets": false | ||
} | ||
``` | ||
|
||
## Installation | ||
|
||
1. Go to `Extensions` | ||
2. Search for `Clojure Warrior` | ||
3. Install | ||
4. Restart Visual Studio Code (or click `Reload window`) | ||
5. Open a Clojure/ClojureScript/EDN file | ||
|
||
## Workign on Clojure Warrior | ||
|
||
Compiling: | ||
|
||
``` | ||
cd clojure-warrior | ||
npm install | ||
npm run watch | ||
``` | ||
|
||
Installing dev version locally: | ||
|
||
``` | ||
ln -s `pwd` ~/.vscode/extensions/tonsky.clojure-warrior-0.2.0 | ||
``` | ||
|
||
Publishing: | ||
|
||
``` | ||
vsce publish | ||
``` | ||
|
||
## License | ||
|
||
[MIT License](https://github.com/tonsky/clojure-warrior/blob/master/./LICENSE.txt) |
Oops, something went wrong.