Skip to content

Commit

Permalink
Add Getting Started page to calva.io
Browse files Browse the repository at this point in the history
Also update the start page to point to this quick start option

Fixes #1003
Fixes #855
Fixes #853
Fixes #811

[skip ci]
  • Loading branch information
PEZ committed Feb 14, 2021
1 parent 100eaed commit 5dd90a9
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 10 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -4,6 +4,7 @@ Changes to Calva.

## [Unreleased]
- Fix [Connect ”not in project” glitches](https://github.com/BetterThanTomorrow/calva/issues/814)
- [Add two ”Start Standalone REPL” commands](https://github.com/BetterThanTomorrow/calva/issues/1003)

## [2.0.171] - 2021-02-10
- Update clojure-lsp to version 2021.02.09-18.28.06 (Fix: [Auto completion does not work in clojure-lsp only mode (no repl connection)](https://github.com/BetterThanTomorrow/calva/issues/996#issuecomment-776148282))
Expand Down
2 changes: 1 addition & 1 deletion docs/site/commands-top10.md
Expand Up @@ -2,7 +2,7 @@

There are not all that many Calva commands. You can learn them all if you like, but here are the most important ones to know about for effective Clojure/ClojureScript coding:

* **Grow/expand selection**: `ctrl+w`
* **Grow/expand selection**: (Check the VS Code Command Palette for the keyboard shortcut)
* **Load current file**: `alt+ctrl+c enter`, evaluates the namespace code in the active editor tab. This also loads any required namespaces, and generally gives Calva what it needs to work.
* **Evaluate current form**: `ctrl+enter` finds the form from the cursor position, evaluates it and displays the result inline. Hit `esc` to dismiss the results display.
* **Evaluate current top-level form**: `alt+enter`: inline evaluate the current top-level form. This also works inside `(comment)` forms. Use it to (re)define vars and then inside comment forms you can verify that they do what you want them to do.
Expand Down
38 changes: 38 additions & 0 deletions docs/site/getting-started.md
@@ -0,0 +1,38 @@
# Getting Started

Depending on wether you want to just start a Clojure REPL or you have a project you want to work with, getting started looks similar but a bit different. Both start with:

0. You have VS Code started
1. You install Calva

## Start a Standalone REPL

If you are new to Calva, a good place to start is using the command **Start a standalone ”Hello World” REPL**.

![Command Palette Start Standaloe REPL](images/howto/start-hello-repl.png "Start a Standalone REPL")

It will open up a file named `hallo-repl.clj` in a temporary directory, and start and connect a REPL. The file contains some sample code and a few tips on how to evaluate code in a Calva editor.

![Hello REPL](images/howto/hello-repl.png "hello-repl.clj")


The only prerequisite here is that you have Java installed. _No pre-installed clojure tools required._ (You will want to install these tools later, of course.)

!!! Note
When you are more familiar with Calva, and want a standalone REPL, there is a separate command: **Start a standalone REPL (not in project)**. It will open up a `user.clj` in a temporary directory, containing only an `(ns user)` form, and start and connect the REPL.

## You have a Project?

If you are new to Calva, please consider the above option first. Then when it it will be time to get [Calva connected to the REPL of your project](connect.md).

## Clojure Resources

If you are new to Clojure or ClojureScript altogether, please check out the guide material on the respective official sites:

- [Getting Started with Clojure](https://clojure.org/guides/getting_started)
- [ClojureScript Quick Start](https://clojurescript.org/guides/quick-start)

There are also many great books on Clojure. [Clojure for the Brave and True](https://www.braveclojure.com/clojure-for-the-brave-and-true/) can be read for free online. It is a great resource for beginners.


Happy coding! ♥️
Binary file added docs/site/images/howto/hello-repl.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/site/images/howto/start-hello-repl.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 1 addition & 8 deletions docs/site/index.md
Expand Up @@ -6,14 +6,7 @@

## Getting Started

First thing you need to do is to get [Calva connected to the REPL of your project](connect.md). Then we suggest you check out [Something to Try First](try-first.md).

If you are new to Clojure or ClojureScript altogether, please check out the guide material on the respective official sites:

- [Getting Started with Clojure](https://clojure.org/guides/getting_started)
- [ClojureScript Quick Start](https://clojurescript.org/guides/quick-start)

There are also many great books on Clojure. [Clojure for the Brave and True](https://www.braveclojure.com/clojure-for-the-brave-and-true/) can be read for free online, and is a great resource for beginners.
[Let's start a REPL!](getting-started.md). 🚀

## How to Contribute to Calva?

Expand Down
3 changes: 2 additions & 1 deletion mkdocs.yml
Expand Up @@ -21,7 +21,8 @@ markdown_extensions:
- codehilite
nav:
- index.md
- Getting Started:
- Start Here:
- getting-started.md
- connect.md
- try-first.md
- finding-commands.md
Expand Down

0 comments on commit 5dd90a9

Please sign in to comment.