Skip to content

clojure: treat #error { prefix the same as opening curly bracket { #155

Description

@agorgl

When using parinfer-rust along with conjure in neovim, conjure buffers use parinfer functionality by default (given they are simply temporary clojure files), as expected.

When showing the last exception with <leader>ve conjure mapping, the expected output is shown in the conjure buffer, something like:

#error {
 :cause "No matching clause: :input-exhausted"
 :via
 [{:type clojure.lang.ExceptionInfo
   :message "No matching clause: :input-exhausted"
...
}

When focusing the buffer though, parinfer kicks in and auto-indents the above output to something like:

#error {
        :cause "No matching clause: :input-exhausted"
        :via
        [{:type clojure.lang.ExceptionInfo
          :message "No matching clause: :input-exhausted"
...
}

Given that the #error {} output is part of the way clojure prints exceptions/throwables, can we tweak parinfer to treat it as a regular opening curly bracket (meaning #error { should be the same as {).

Even if we wanted to have a buffer local way to disable parinfer on conjure there isn't currently any and this isn't the best way to achieve this too, because conjure buffers are meant to be editable as a playground for editing/evaluating expressions.

Any thoughts?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions