Skip to content

unclechu/clojure-todo-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TODO list application written in Closure

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!

How to build and run

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)

Using Nix

To build and run the app you can just do:

nix-build
result/bin/clojure-todo-app-backend --help

Build the environment

You 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-env

Update deps.nix file

default.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.nix

Development

vim-lsp

When 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
en

If 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.

Author

Viacheslav Lotsmanov

About

TODO list application written in Closure

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors