summaryrefslogtreecommitdiffstats
path: root/ftplugin/fennel.vim
blob: 3dc46a7b8a704e33fe2ae6e9ad3d3130e45be7a6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
let files = filter(globpath(&rtp, 'ftplugin/fennel.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" })
if len(files) > 0
  exec 'source ' . files[0]
  finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'fennel') == -1

" Vim filetype plugin file
" Language: FENNEL
" Maintainer: Calvin Rose

if exists("b:did_ftplugin")
	finish
endif
let b:did_ftplugin = 1

let s:cpo_save = &cpo
set cpo&vim

"setlocal iskeyword+=!,_,%,?,-,*,!,+,/,=,<,>,.,:,$,^
setlocal iskeyword=!,$,%,#,*,+,-,.,/,:,<,=,>,?,_,a-z,A-Z,48-57,128-247,124,126,38,94

" There will be false positives, but this is better than missing the whole set
" of user-defined def* definitions.
setlocal define=\\v[(/]def(ault)@!\\S*

" Remove 't' from 'formatoptions' to avoid auto-wrapping code.
setlocal formatoptions-=t

setlocal comments=n:;
setlocal commentstring=;\ %s

let &cpo = s:cpo_save

endif