Skip to content

Releases: Olical/conjure

Fix make compile

03 Apr 06:56
5700d76

Choose a tag to compare

When running make compile without any existing classes dir it would fail because it can't rm a dir that doesn't exist. This fixes it. Thanks @jorinvo in #17 for pointing this out.

Omnicomplete

02 Apr 12:09
d57807d

Choose a tag to compare

I've added omnicompletion support through Compliment, you can see my thoughts on it in #8. There's definitely more I could do but this is a great start and frees up my time to go add the next feature.

Once the core features are down and there's a solid test suite I'll look into make each feature more powerful and integrated. Such as autocompletion popups and context for completion.

I hope omnicompletion works well for you! Let me know of any issues 😄

Internal cleanup and a small bug fix

27 Mar 22:28
9715f88

Choose a tag to compare

This is mainly just internal refactoring and renaming but I thought I'd release it anyway.

  • Replaced zprint with fipp for now since I value performance over absolute prettiness in the log window right now. Does a great job, may use zprint for code formatting in the future. #11
  • Lowered the max log buffer length to 3000 lines before it gets cut in half. It was 10,000.
  • Fixed a bug where if you tried to eval the current buffer when the last line was a ; comment it would error.

That's because it was commenting out the closing paren of some of my wrapper code that I wrap every eval inside for various reasons. You'd essentially end up with this...

(+ 10 10)
;; ohno

Becoming this (massively simplified)...

(do (+ 10 10)
;; ohno)

That last paren was being removed, thus, EOF.

Fixed and improved form-wise evaluation

26 Mar 13:46
556c41f

Choose a tag to compare

  • Fixed escaping things as they're sent across the prepl, was causing some subtle bugs when you had a bunch of \\\\ in use.
  • Fixed #4 and improved it a lot. So now if no form is found nothing happens and it handles every case I could throw at it.

The eval current / outer form issues were caused by some of the Neovim API being 0 indexed and some being 1 indexed. So some values have to be decremented or incremented in different cases while hunting for matching (){}[] pairs of forms. That function was hard to get right but it works well in every case I can think of now!

Next up is a bunch of repo changes around documentation and then probably an initial autocomplete. Maybe some configuration as mentioned in #5, feel free to add your feedback there too!

Default mappings and better form selection

24 Mar 18:03
ca0f9b4

Choose a tag to compare

  • The mappings that were mentioned in the README are now included by default, you can opt out with let g:conjure_default_mappings = 0.
  • ConjureEvalCurrentForm and ConjureEvalRootForm now take [] and {} pairs into account.
  • Merged #3 which cleaned up some JVM arguments.
  • Lots of code shuffling into autoload/lua files.

Complete rewrite in Clojure!

22 Mar 20:33
f83acad

Choose a tag to compare

This is the beginning of the new change log! Conjure used to be Rust, then I tried ClojureScript and finally settled on Clojure after throwing the two previous attempts away. The old attempts still live in branches.

The README contains everything you need to know so far. Here's to a long life of Conjure, v0.4.0 is a complete fresh start 😄

[Legacy Rust] Better completion, reload tools and subtle improvements

30 Jan 14:30
fa8495a

Choose a tag to compare

I'm still crawling towards a solid v1.0.0, this release is a big step in the right direction. I've got a long flight to Canada and back coming up so hopefully that'll give me more time to work on the key features as well as the documentation. The alpha trial gist is still relevant at the moment.

Slightly more complete completion

It won't spam you with errors if you try to complete without a connection and it will only refresh the completions if you've actually changed a Clojure file somewhere. This should stop my CPU from trying to melt through the laptop when I idly spam jkjkjkjkjk as I think about something (it updates completions on CursorHold).

Reload bindings!

You can now use <localleader>rr to reload changed namespaces and <localleader>rR to reload all namespaces. You can configure this reloading tool with settings in a .lvimrc or something:

" Check these directories for changed namespaces.
let g:conjure_refresh_dirs = ["src/clj", "src/cljc"]

" These args are tacked onto the tools namespace refresh call, this will call user/restart when done reloading.
let g:conjure_refresh_args = ":after 'user/restart"

This requires org.clojure/tools.namespace {:mvn/version "0.3.0-alpha4"} or greater in your project. Just ensure that you depend on it somewhere and it'll be required for you.

Bonus binding: Buffer eval

The new <localleader>rb will evaluate the buffer without touching the file on disk at all (unlike <localleader>rf). This works great if you're connected to a remote REPL in your live or staging environment.

Under the hood

I no longer pass the path to Rust so that it can work out the namespace etc since this required reading the file from disk, not cool. Now the Rust code works out your context by asking Neovim over the RPC interface. This means less stuff for VimL to worry about and no reliance on being able to read the file.

I've turned off the file logging by default, you can turn it on again easily:

" Log to ~/.config/nvim/plugged/conjure/target/debug/conjure.log
let g:conjure_logging = 1

I've also added a warning when you try to eval or do something without having a REPL connected for that operation. This prevents you trying to eval then sitting there for a while wondering why nothing happened.

[Legacy Rust] Completing and fixing things

11 Jan 16:48
b28bdf7

Choose a tag to compare

Completion!

There's omnicompletion now, it works really well for Clojure and will show all symbols / aliases / namespaces available to you. I haven't bothered with keywords yet but I suppose that could be added somehow?

ClojureScript isn't as good, it only completes your local namespace symbols and cljs.core because I don't have the functions I need to look things up in that environment. Maybe I'll find workarounds some day though! I just need a way to list aliases and all namespaces 🤔

I'm using these deoplete settings and they're working fairly well. Although sometimes the cursor flashes if it has no matches which is a bit weird, suggestions appreciated.

let g:deoplete#enable_at_startup = 1
autocmd InsertLeave,CompleteDone * if pumvisible() == 0 | pclose | endif
set completeopt-=preview

call deoplete#custom#option('omni_patterns', {
\ 'clojure': '\w\|-\|\.\|+\|*\|/',
\})

Completion is asynchronous and the cache is updated on cursor idle per-buffer. It should be extremely snappy. Let me know if it's really slow for you though! It may well be on large projects, I might need to rethink it if this lazy approach uses waaaay too much memory and CPU.

Go to fixes

Go to definition was a bit borked with some files, that should be fine now. It was inserting file: before some files when I looked them up in io/resources but I'm stripping that off now.

Subtle improvements

Stuff like using user as the default for Clojure and cljs.user for ClojureScript. Things that you'd only notice in some rare cases really but I improved them anyway. Much more to come in the "under the hood tidy ups" department.

[Legacy Rust] Hello, World!

09 Jan 22:42
dac7589

Choose a tag to compare

Initial extremely alpha release as documented in this gist.

Contains eval, documentation lookup and go to definition.