Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add rules for Clojure

  • Loading branch information...
commit ae71371da9a6e5c20150cce8eb61236e5d64034f 1 parent 0100461
Kana Natsuno authored
Showing with 20 additions and 0 deletions.
  1. +3 −0  autoload/smartinput.vim
  2. +17 −0 t/api.vim
3  autoload/smartinput.vim
View
@@ -167,6 +167,9 @@ function! smartinput#define_default_rules() "{{{2
\ urules.table['```'],
\ urules.table['English'],
\ ],
+ \ 'clojure': [
+ \ urules.table['Lisp quote'],
+ \ ],
\ 'csh': [
\ urules.table[''''' as strong quote'],
\ ],
17 t/api.vim
View
@@ -1052,6 +1052,23 @@ describe 'The default configuration'
Expect getline(1, line('$')) ==# ['; (define filetype ''scheme)']
Expect [line('.'), col('.')] ==# [1, 27 - 1]
Expect b:getSynNames(line('.'), col('.')) ==# ['Comment']
+
+ setlocal filetype=clojure
+ setlocal syntax=lisp
+ Expect &l:filetype ==# 'clojure'
+ Expect &l:syntax ==# 'lisp'
+ normal S(def filetype 'clojure
+ Expect getline(1, line('$')) ==# ['(def filetype ''clojure)']
+ Expect [line('.'), col('.')] ==# [1, 23 - 1]
+ Expect b:getSynNames(line('.'), col('.')) ==# ['lispList', 'Identifier']
+ normal S(def filetype "'clojure
+ Expect getline(1, line('$')) ==# ['(def filetype "''clojure''")']
+ Expect [line('.'), col('.')] ==# [1, 24 - 1]
+ Expect b:getSynNames(line('.'), col('.')) ==# ['lispList', 'Constant']
+ normal S; (def filetype 'clojure
+ Expect getline(1, line('$')) ==# ['; (def filetype ''clojure)']
+ Expect [line('.'), col('.')] ==# [1, 25 - 1]
+ Expect b:getSynNames(line('.'), col('.')) ==# ['Comment']
end
it 'should have rules to expand a () block and a {} block'
Please sign in to comment.
Something went wrong with that request. Please try again.