Skip to content

Commit 44203c7

Browse files
committed
Merge branch 'dev'
2 parents b9095aa + 8f33f26 commit 44203c7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

99 files changed

+802
-54
lines changed

.circleci/config.yml

+10-10
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
- checkout
1111
- restore_cache:
1212
name: Restore dependencies
13-
key: ts-{{ checksum "package.json" }}-cljs-{{ checksum "shadow-cljs.edn" }}-grammar-{{ checksum "calva/calva-fmt/atom-language-clojure/package.json" }}
13+
key: ts-{{ checksum "package.json" }}-cljs-{{ checksum "shadow-cljs.edn" }}-grammar-{{ checksum "src/calva-fmt/atom-language-clojure/package.json" }}
1414
- run:
1515
name: Install node_modules
1616
command: cp package.json /tmp && npm install && cp /tmp/package.json .
@@ -19,7 +19,7 @@ jobs:
1919
command: npx shadow-cljs classpath
2020
- save_cache:
2121
name: Save dependencies
22-
key: ts-{{ checksum "package.json" }}-cljs-{{ checksum "shadow-cljs.edn" }}-grammar-{{ checksum "calva/calva-fmt/atom-language-clojure/package.json" }}
22+
key: ts-{{ checksum "package.json" }}-cljs-{{ checksum "shadow-cljs.edn" }}-grammar-{{ checksum "src/calva-fmt/atom-language-clojure/package.json" }}
2323
paths:
2424
- ./node_modules
2525
- ~/.m2
@@ -38,7 +38,7 @@ jobs:
3838
- checkout
3939
- restore_cache:
4040
name: Restore dependencies
41-
key: ts-{{ checksum "package.json" }}-cljs-{{ checksum "shadow-cljs.edn" }}-grammar-{{ checksum "calva/calva-fmt/atom-language-clojure/package.json" }}
41+
key: ts-{{ checksum "package.json" }}-cljs-{{ checksum "shadow-cljs.edn" }}-grammar-{{ checksum "src/calva-fmt/atom-language-clojure/package.json" }}
4242
- run:
4343
name: Update system package lists
4444
command: sudo apt-get update
@@ -52,21 +52,21 @@ jobs:
5252
- run:
5353
name: Download Atom build script
5454
command: |
55-
cd calva/calva-fmt/atom-language-clojure
55+
cd src/calva-fmt/atom-language-clojure
5656
curl -s -O https://raw.githubusercontent.com/atom/ci/master/build-package.sh
5757
- run:
5858
name: Make build script executable
5959
command: |
60-
cd calva/calva-fmt/atom-language-clojure
60+
cd src/calva-fmt/atom-language-clojure
6161
chmod u+x build-package.sh
6262
- run:
6363
name: Run package tests
6464
command: |
65-
cd calva/calva-fmt/atom-language-clojure
65+
cd src/calva-fmt/atom-language-clojure
6666
./build-package.sh
6767
- save_cache:
6868
name: Save dependencies
69-
key: ts-{{ checksum "package.json" }}-cljs-{{ checksum "shadow-cljs.edn" }}-grammar-{{ checksum "calva/calva-fmt/atom-language-clojure/package.json" }}
69+
key: ts-{{ checksum "package.json" }}-cljs-{{ checksum "shadow-cljs.edn" }}-grammar-{{ checksum "src/calva-fmt/atom-language-clojure/package.json" }}
7070
paths:
7171
- ~/.atom/packages
7272
- ./node_modules
@@ -79,7 +79,7 @@ jobs:
7979
path: ~/calva
8080
- restore_cache:
8181
name: Restore dependencies
82-
key: ts-{{ checksum "package.json" }}-cljs-{{ checksum "shadow-cljs.edn" }}-grammar-{{ checksum "calva/calva-fmt/atom-language-clojure/package.json" }}
82+
key: ts-{{ checksum "package.json" }}-cljs-{{ checksum "shadow-cljs.edn" }}-grammar-{{ checksum "src/calva-fmt/atom-language-clojure/package.json" }}
8383
- run:
8484
name: Compile and Run Tests
8585
command: npm run compile-cljs
@@ -92,7 +92,7 @@ jobs:
9292
path: ~/calva
9393
- restore_cache:
9494
name: Restore dependencies
95-
key: ts-{{ checksum "package.json" }}-cljs-{{ checksum "shadow-cljs.edn" }}-grammar-{{ checksum "calva/calva-fmt/atom-language-clojure/package.json" }}
95+
key: ts-{{ checksum "package.json" }}-cljs-{{ checksum "shadow-cljs.edn" }}-grammar-{{ checksum "src/calva-fmt/atom-language-clojure/package.json" }}
9696
- run:
9797
name: "Create artifacts workspace"
9898
command: mkdir /tmp/artifacts
@@ -182,7 +182,7 @@ jobs:
182182
path: ~/calva
183183
- restore_cache:
184184
name: Restore dependencies
185-
key: ts-{{ checksum "package.json" }}-cljs-{{ checksum "shadow-cljs.edn" }}-grammar-{{ checksum "calva/calva-fmt/atom-language-clojure/package.json" }}
185+
key: ts-{{ checksum "package.json" }}-cljs-{{ checksum "shadow-cljs.edn" }}-grammar-{{ checksum "src/calva-fmt/atom-language-clojure/package.json" }}
186186
- run:
187187
name: Publish to the marketplace
188188
command: |

.vscode/launch.json

+21-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,26 @@
1010
"request": "launch",
1111
"runtimeExecutable": "${execPath}",
1212
"args": [
13-
"--extensionDevelopmentPath=${workspaceRoot}"
13+
"--extensionDevelopmentPath=${workspaceRoot}",
14+
],
15+
"stopOnEntry": false,
16+
"sourceMaps": true,
17+
"env": {
18+
"CALVA_DEV_GA": "FUBAR-69796730-4",
19+
"DEBUG": "no-debug-universal-analytics"
20+
},
21+
"outFiles": [
22+
"${workspaceFolder}/dist/**/*.js"
23+
]
24+
},
25+
{
26+
"name": "Launch w/ test folder",
27+
"type": "extensionHost",
28+
"request": "launch",
29+
"runtimeExecutable": "${execPath}",
30+
"args": [
31+
"--extensionDevelopmentPath=${workspaceRoot}",
32+
"${workspaceFolder}/test-data"
1433
],
1534
"stopOnEntry": false,
1635
"sourceMaps": true,
@@ -22,5 +41,6 @@
2241
"${workspaceFolder}/dist/**/*.js"
2342
]
2443
}
44+
2545
]
2646
}

CHANGELOG.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ Changes to Calva.
44
## When time allows, this will be worked on
55
- [Support for custom project/workflow commands](https://github.com/BetterThanTomorrow/calva/issues/281)
66

7-
## Being distilled
8-
97
## [Unreleased]
108

9+
## [2.0.43] - 03.10.2019
10+
- [Insourcing @tonsky's Clojue Warrior, now named Calva Highlight](https://github.com/BetterThanTomorrow/calva/pull/362)
11+
- [Update status bar when configuration changed](https://github.com/BetterThanTomorrow/calva/issues/358)
12+
1113
## [2.0.42] - 29.09.2019
1214
- [Adding selected calva commands to the editors context menu](https://github.com/BetterThanTomorrow/calva/issues/338)
1315
- [Fix bug with painting all existing result decoration with the same status](https://github.com/BetterThanTomorrow/calva/issues/353)

README.md

+24-10
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@ When something doesn't work and you think there might be a workaround for it, pl
4444
## Features
4545

4646
### At a glance
47+
- Syntax highlighting, plus:
48+
- Rainbow parens
49+
- Highlights misplaced brackets
50+
- LISP friendly bracket matching
51+
- Ignore form (`#_`) dimming and `(comment)` form highlighting
52+
- Clojure code formatting
4753
- Quickly and easily get your REPL connected
4854
- Evaluate code inline
4955
- Run tests
@@ -102,7 +108,7 @@ Currently [`cider-nrepl` does not provide its test functionality for ClojureScri
102108

103109
## Calva Paredit and Calva Formatter included
104110

105-
With Calva you also get structural editing using [Paredit](/calva/paredit/README.md) and [formatting](/calva/calva-fmt/README.md).
111+
With Calva you also get structural editing using [Paredit](/src/paredit/README.md) and [formatting](/src/calva-fmt/README.md).
106112

107113
You really should have a look at the READMEs for those as well. One thing to note about it is that Calva Formatter sets the default keybinding of the **Format Current Form** command to `tab`. Good to know, right?
108114

@@ -112,19 +118,27 @@ To make slurping and barfing forward really easy to perform they are bound to `c
112118

113119
![Disable Mission Control Shortcuts](/assets/mission-control-shortcuts.gif)
114120

115-
### Conflicting with Parinfer extension
121+
## Calva Highlight
116122

117-
There have been reports of the Parinfer extension and Calva not working too well together. You might to some extent get away with switching off Calva's formatting as-you-type, but also you might not. With Calva it is probably better to learn to use Paredit **slurp** and **barf** and generally rely on Calva's automatic formatting.
123+
Calva takes care of syntax highlighting, and also provides some features not available through VS Code's highlighting mechanism. These extras inclode rainbow parens, sane bracket matching, and comment form dimming/highlighting.
124+
125+
You are in charge of how brackets and comments are highlighted:
118126

119-
## Clojure Warrior included
127+
| Setting | Meaning | Example |
128+
| --- | ------- | ------- |
129+
| `"calva.highlight.enableBracketColors"` | Enable rainbow colors | `true` |
130+
| `"calva.highlight.bracketColors"` | Which colors to use | `["#000", "#999"]` |
131+
| `"calva.highlight.cycleBracketColors"` | Whether same colors should be reused for deeply nested brackets | `true` |
132+
| `"calva.highlight.misplacedBracketStyle"` | Style of misplaced bracket | `{ "border": "2px solid #c33" }` |
133+
| `"calva.highlight.matchedBracketStyle"` | Style of bracket pair highlight | `{"backgroundColor": "#E0E0E0"}` |
134+
| `"calva.highlight.ignoredFormStyle"` | Style of `#_...` form | `{"textDecoration": "none; opacity: 0.5"}` |
135+
| `"calva.highlight.commentFormStyle"` | Style of `(comment ...)` form | `{"fontStyle": "italic"}` |
120136

121-
This extension bundles [@tonsky](https://tonsky.me)'s [Clojure Warrior](https://marketplace.visualstudio.com/items?itemName=tonsky.clojure-warrior). Bringing you, amongst other things, rainbow parens and sane bracket matching.
137+
The extras are built from **Clojure Warrior**, created by [Nikita Prokopov, a.k.a. @tonsky](https://tonsky.me)'s. Please note that the default styling for `(comment ...)` forms now is to italicize them (instead of dimming). This is to promote using `comment` forms to work with the REPL. See **Something to try first**, above for more on evaluating code in `comment` forms.
122138

123-
Note: If you for some reason do not want rainbow colors, put this in your `settings.json`:
139+
## Conflicting with Parinfer extension
124140

125-
```json
126-
"clojureWarrior.enableBracketColors": false
127-
```
141+
There have been reports of the Parinfer extension and Calva not working too well together. You might to some extent get away with switching off Calva's formatting as-you-type, but also you might not. With Calva it is probably better to learn to use Paredit **slurp** and **barf** and generally rely on Calva's automatic formatting.
128142

129143
## How to contribute
130144

@@ -136,7 +150,7 @@ Calva is built using a combination of TypeScript and ClojureScript. The ClojureS
136150

137151
Many people have contributed to Calva. Here are the ones who have engaged in the project as such.
138152

139-
## Current Maintainers:
153+
### Current Maintainers:
140154

141155
* [Peter Strömberg](https://github.com/PEZ)
142156
* [Kevin Stehn](https://github.com/kstehn)

assets/cw_screenshot.png

163 KB
Loading

clojure.tmLanguage.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"information_for_contributors": [
3-
"This file is generated from ./calva/calva-fmt/atom-language-clojure/grammars/clojure.cson"
3+
"This file is generated from ./src/calva-fmt/atom-language-clojure/grammars/clojure.cson"
44
],
55
"name": "Clojure",
66
"scopeName": "source.clojure",

docs/pull_request_template.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ I have:
2020

2121
<!-- Remove the checkboxes that do not apply, as Github reports how many are not ticked. 😀-->
2222

23-
Ping: @pez, @kstehn
23+
Ping: @pez, @kstehn, @cfehse

docs/things-to-do.md

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Things to be done with Calva
2+
3+
The major themes are:
4+
* Documentation
5+
* Squash Bugs
6+
* The Right Features
7+
* Development Workflow
8+
* Code Maintainability
9+
10+
## Documentation
11+
* Video, How to get started with Calva, to support the text on the wiki
12+
* The Calva settings (which ones are not documented on the wiki?)
13+
* Replace some outdated GIFs used in the README.
14+
* Make clear what Calva is about, what stances it takes and where it is heading
15+
16+
## Squash Bugs
17+
* The test runner sometimes just doesn't work
18+
* The REPL window can't handle large output. Ideas:
19+
* Fix the performance issues (might be a tricky job)
20+
* Truncate large output in the REPL window and print it in an untitled Clojure-enabled editor window instead.
21+
* Alternative approach:
22+
* Integrate the [Monaco Editor](https://microsoft.github.io/monaco-editor/) on which the whole vscode thing is based on in two ways
23+
* As the editing area on the bottom
24+
* As a readonly content display of the output
25+
* This should probably fix some performance issues
26+
* This should improve the editing capabilities of the editing area
27+
* All language spezific support (formating, rainbowcolors, intellisense, etc) should be integratable in the editor.
28+
* Implement something like CIDER inspect: https://github.com/BetterThanTomorrow/calva/issues/228
29+
* Make it super easy to use Calva with REBL
30+
* Fix the statusbar button default colors (or remove this feature if we don't think it is valuable enough).
31+
32+
## The Right Features
33+
* Support clj-fmt indent settings.
34+
* Enable clj-kondo as default Calva linter ([clj-kondo](https://github.com/borkdude/clj-kondo/releases/tag/v2019.09.22-alpha) does support Windows but distributes no binary for Windows)
35+
* Enable using nrepl in streaming mode
36+
* Use this for the test runner
37+
* Add some basic refactorings support
38+
* Use ”last opened in” column when opening the REPL window at jack in. (example? I do not fully understand.)
39+
* Consider not opening the REPL window at jack-in / make it an option.
40+
* Bettter connection life-cycle control fo shadow-cljs. Either:
41+
1. Tap in to the shadow message bus (THeller said that there is such a thing that we can quyery about what shadow-cljs is doing.)
42+
1. Run Jack-in in a Task proper and see if we can somehow catch the output. (This is needed for shadow-cljs Jack-in.)
43+
* Consider supporting REBL out-of-the-box.
44+
* Add more Calva extension context statuses and use it for more precise command and shortcut enablements.
45+
* A way to get output pasted in a Clojure-enabled editor window.
46+
47+
## Development Workflow
48+
* Write a basic smoke test checklist
49+
* Write an issues template
50+
* Get a unit test framework in place for the TypeScript code base.
51+
* Get an integration test framework in place, for automatic smoke testing.
52+
53+
## Code Maintainability
54+
* We have two ParEdit implementations, we should scrap paredit.js
55+
* We have two formatters, cljs-lib ormatter and the one in docmirror.
56+
* It mmight make sense to keep both for different purposes, but we should fix whatever it is that makes us still keep the `newIndentEngine` setting.
57+
* Organize Calva functionality in ”components”, more like we do with calva-fmt, ParEdit, and Clojure Warrior.
58+
* Get better control of Calva state.
59+
* Clean up extra messy parts of the code. Candidates:
60+
* The evaluations module
61+
* The annotations module (this is particularly brittle)

package-lock.json

+6-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)