This repo its meant to save exemples and explanations about programming in clojure.
Disclaimer: All done in Ubuntu based distribution
- scalar variables
- collections
- keywords and symbols
- aritmetic operators
- relational operators
- logical operators
- conditional operators
- functions
- built-in functions and utils
- loops
- scope
- parallelism
- first class
- -> operator
- # operator
- % %1 %3
- comment
- map objects
- functions map reduce filter some
- destructing
- importação
- scopo let, restrição de acessos
- utilizar funções java dentro do código clojure, com noitação de .
- namespace
- lazy things
- syn4tdf-reports
- issue 6391
- projeto https://git.synchro.com.br/componentes/syn4tdf-report
install
brew,vscodeandJDK with JAVA_HOME
in a terminal run
brew install clojure lein
in
vscodeinstall bracket-pair-colorizer-2 and calva to run clojure code statements inside .clj files
paste the config below in
~/.config/Code/User/settings.jsonto customize bracket colors and stop calva to override vscode keybindings
// brackets color and selection "editor.guides.bracketPairsHorizontal": false, "bracket-pair-colorizer-2.showHorizontalScopeLine": false, "bracket-pair-colorizer-2.showBracketsInGutter": true, "editor.guides.bracketPairs": true, // clojure "calva.enableJSCompletions": false, "calva.fmt.formatAsYouType": false, "editor.guides.bracketPairsHorizontal": false, "calva.highlight.enableBracketColors": false, "calva.highlight.highlightActiveIndent": false, "calva.showCalvaSaysOnStart": false, "calva.autoOpenJackInTerminal": false, "calva.evaluationSendCodeToOutputWindow": true, "calva.paredit.defaultKeyMap": "none", "calva.paredit.hijackVSCodeDefaults": false, "calva.keybindingsEnabled": false,
paste the config below in
~/.config/Code/User/keybindings.jsonto enable a calva keybinding to run clojure code in .clj files
{
"key": "ctrl+enter",
"command": "calva.evaluateSelection",
"when": "calva:connected && editorTextFocus && editorLangId == 'clojure'"
}
in a terminal run
lein new my-cloruje-project
open
my-cloruje-projectwith vscode
open command palette and run
then choose
then select uberjar and click in ok
on the right will appear the
output.calva-repltab
click/select on a line of code in any .clj file
then pressctrl + enterkeybinding to run the code and check its return on the right after the => symbol
on theoutput.calva-repltab will appear
output
code
return






