guns / vim-clojure-static

Meikel Brandmeyer's excellent Clojure runtime files

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

clojure_fuzzy_indent_patterns not working?

crsmithdev opened this issue · comments

Trying to add a pattern for 2-space indenting, and not having any success. I want to change this:

(dom/div #js {:className "myClass"}
         "Text")

to auto-indent like this:

(dom/div #js {:className "myClass"}
  "Text")

My .vimrc specifies:

let g:clojure_fuzzy_indent = 1
let g:clojure_fuzzy_indent_patterns = ['^dom']

...but indenting never changes. Incidentally, I am able to successfully add to :clojure_special_indent_words, and see indenting change, but this is not practical here as there are too many methods to add like that.

Is this my error, or a bug?

Hello, the fuzzy indent feature compares the ns-unqualified, non-macro-metacharacter part of a symbol when looking for indent matches since it is the most constant part of an identifier.

For example, a pattern of '^with' matches my.ns/with-macro, myalias/with-macro, #'with-macro, and #'my-ns-or-alias/with-macro.

I am going to close this issue, since the feature works as intended. If you'd like to discuss this further, feel free to re-open!