This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-07-23
Channels
- # beginners (20)
- # boot (7)
- # cider (115)
- # cljsrn (13)
- # clojars (1)
- # clojure (122)
- # clojure-italy (23)
- # clojure-spec (60)
- # clojurescript (74)
- # data-science (7)
- # datomic (26)
- # emacs (8)
- # graphql (1)
- # lumo (26)
- # music (1)
- # off-topic (1)
- # re-frame (9)
- # ring (3)
- # rum (1)
- # spacemacs (4)
- # uncomplicate (6)
- # vim (7)
is there an already existing syntax/indent solution for writing om-next without getting super indented?
Just as @U09LZR36F said, I have this in my init.vim for Om next:
" Stole this from:
let g:clojure_maxlines=300
let g:clojure_align_multiline_strings=1
let g:clojure_syntax_keywords = {
\ 'clojureMacro': ['defui', 'facts', 'fact', 'specification', 'behavior', 'provided', 'assertions', 'component', 'provided', 'when-mocking', 'render', 'query', 'ident', 'start', 'stop', 'defsyntax', 'defsynfn', 'synfn', 'defspawner', 'defread', 'defmutation']
\ }
let g:clojure_fuzzy_indent = 1
let g:clojure_fuzzy_indent_patterns = [
\ '^def.*', '^with.*', 'specification', 'behavior', 'assertions', 'component', 'provided',
\ 'start', 'stop', 'letfn', '-tx$', 'transact!', '^check.*', '^assert.*',
\ 'concat', '.*Exception.*', '.*Error.*', 'trace\|debug\|info\|warn\|error\|fatal',
\ '.*->>\?$', 'either', 'synfn', 'parse.*', 'spawn-*', 'load-data.*',
\ '!$', '^do', 'into', '^test-.*', '\..*', 'ui-*',
\ 'a', 'article', 'button', 'code', 'defs', 'div', 'footer', 'form',
\ 'h1', 'h2', 'h4', 'header', 'hr', 'img', 'input', 'label', 'li', 'linearGradient',
\ 'main', 'nav', 'node', 'ol', 'option', 'p', 'path', 'polygon',
\ 'section', 'select', 'small', 'span', 'stop', 'strong', 'svg',
\ 'table', 'tbody', 'td', 'textarea', 'th', 'thead', 'tr', 'ul',
\ 'fdef', 'reduce', 'merge', 'row', 'col', 'icon',
\ ]
let g:clojure_fuzzy_indent_blacklist = []
let g:clojure_special_indent_words = join([
\ 'defrecord', 'defui', 'reify', 'letfn', 'extend-type',
\ 'defprotocol', 'defmutation',
\ ], ',')
@uwo searching on github is the mostly likely place to bring up the docs on the macro you want to adjust the indent for 🙂.
@uwo I'm guessing this is the option you need to extend: https://github.com/guns/vim-clojure-static#gclojure_special_indent_words