Skip to content

Instantly share code, notes, and snippets.

Avatar
😺
Clojure education and advocacy - and ClojureBridge London

John Practicalli practicalli-john

😺
Clojure education and advocacy - and ClojureBridge London
View GitHub Profile
View .gitignore-global.txt
# An example global gitignore file
#
# Place a copy if this at ~/.gitignore-global
# Run `git config --global core.excludesfile ~/.gitignore-global`
## General Editor Tooling ##
############################
.vscode
.idea
View keybase.md

Keybase proof

I hereby claim:

To claim this, I am signing this object:

@practicalli-john
practicalli-john / .lsp-config.edn
Last active Feb 23, 2021
Spacemacs Clojure and LSP - disable cljfmt
View .lsp-config.edn
;; Switch off cljfmt and let Cider do the formatting
;; see: https://gist.github.com/jr0cket/af47ebb02fb8cf808153b51ba412f4a3
;; add config to ~/.lsp/config.edn
{
:cljfmt {:indentation? false
:remove-trailing-whitespace? false
:remove-surrounding-whitespace? false
:remove-consecutive-blank-lines? false
@practicalli-john
practicalli-john / clojure-and-lsp-layer-config.el
Last active Feb 23, 2021
Spacemacs: Experimenting with Clojure and LSP to find an uncluttered developer experience
View clojure-and-lsp-layer-config.el
;; LSP layer configuration for Spacemacs
;; - uncluttered UI, Cider managing automatic formatting
;; References
;; https://emacs-lsp.github.io/lsp-mode/tutorials/clojure-guide/
;; Disable cljfmt (used by LSP by default) - use Cider formatting instead
;; https://gist.github.com/jr0cket/aecd45258b52b2e12b8dbfc94c5f4bd7
;; Cider layer configuration
View commands-list.org

Manage REPL session

, m . and , . calva.jackInOrConnect jack-in and connect menu commandPaletteeditor/context

, m c and , ” calva.connect Connect to a Running REPL Server in the Project Ctrl Alt C Ctrl Alt C | |

@practicalli-john
practicalli-john / VspaceCode clojure major mode key bindings.json
Created Jan 1, 2021
Finding the right syntax to conditionally add Clojure major mode key bindings
View VspaceCode clojure major mode key bindings.json
"vspacecode.bindingOverrides": [
{
"key": "m",
"name": "+Major",
"type": "conditional",
"bindings": [
{"key": "languageId:clojure",
"name": "Clojure",
"type": "bindings",
"bindings": [
@practicalli-john
practicalli-john / repl-driven-development-with-spacemacs.org
Last active Jul 9, 2021
Screencast script - REPL driven development with Spacemacs
View repl-driven-development-with-spacemacs.org

Introduction

Hello and thank you for watching this Practicalli screencast in which I’ll demonstrate a REPL driven development workflow for Clojure using Spacemacs

Spacemacs is a community configuration for Emacs, which uses the CIDER project as the Clojure development environment.

This workflow uses the Clojure CLI tools to run the Clojure REPL

View game_test.clj
(ns magicum.specs.game-test
(:require [clojure.test :refer [deftest is testing]]
[magicum.specs.game :as specs]))
(set! *warn-on-reflection* true)
;; (testing "manipulating zones"
;; (let [card {:card-name "My new card" :card-legal-text "This legal text is supposed to do something. However, it does nothing."}
;; non-empty-zone (list card)
;; empty-zone (list nil)]
View clojure-cli-tools-changes.md

Clojure CLI Tools Changes - under review

The previous stable release - 1.10.1.561 on 17 July 2020

Hint::Contains commentary and examples that need to be confirmed

The information in this page is not necessarily a correct understanding of the changes.

A redesign for the use of the Clojure CLI tools is in progress and this document contains feedback to the project maintainers. None of the following has been implemented in any release version of the CLI tools.

The point of view of the application developer is taken for all commentary (as opposed to the tools.deps or community tool maintainer).

View clojure-cli-tools-changes.md

Clojure CLI Tools Changes

A redesign for the use of the Clojure CLI tools is in progress and this document contains feedback to the project maintainers. None of the following has been implemented in any release version of the CLI tools.

The information in this page is not necessarily a correct understanding of the changes.

Concerns & Opportunities

Migrating from Leiningen Making the switch over path from Leiningen to Clojure CLI tools as simple as possible is a bonus. It should be more than just copying deps into a deps.edn file, but aligning the same developer experience where concepts align