For the sake of learning Closure.
Status: Work in Progress! Do not expect the app to work! Both backend and frontend are not implemented yet!
I recommend to use Nix.
Technically, if you have Clojure installed you could just run:
(cd backend && clojure -M -m clojure-todo-app.main --help)To build and run the app you can just do:
nix-build
result/bin/clojure-todo-app-backend --helpYou can build the development environment and make a GC root so its stays in the Nix Store and doesn’t get garbage collected.
nix-build -A env -o result-envdefault.nix provides clj2nix attribute
so you can just build it first and then run:
nix-build -A clj2nix -o result-clj2nix
result-clj2nix/bin/clj2nix backend/deps.edn backend/deps.nixWhen you enter a Nix Shell (nix-shell) you get clojure-lsp (you can also
install it manually if you don’t use Nix) in your PATH environment variable.
In case you are using (Neo)Vim and vim-lsp plugin then you can register the
LSP server like this:
if executable('clojure-lsp')
aug ClosureLsp
au! User lsp_setup cal lsp#register_server({
\ 'name': 'clojure-lsp',
\ 'cmd': {server_info->['clojure-lsp']},
\ 'allowlist': ['clojure'],
\ })
aug END
enIf you have clojure-lsp executable in your PATH the server should start
automagically when you open a *.clj file (make sure your Vim recognizes those
files as clojure file type).
Then you could try to run some commands like :LspReferences.
Viacheslav Lotsmanov