blob: d067f472b7ec954cec4ae8da3e0813213a8c85ea [file] [log] [blame]
Bram Moolenaarce001a32022-04-27 15:25:03 +01001" Elixir filetype plugin
2" Language: Elixir
3" Maintainer: Mitchell Hanberg <vimNOSPAM@mitchellhanberg.com>
Christian Brabandtd1cea032023-12-27 19:30:41 +01004" Last Change: 2023 Dec 27
Bram Moolenaarce001a32022-04-27 15:25:03 +01005
6if exists("b:did_ftplugin")
7 finish
8endif
9let b:did_ftplugin = 1
10
Bram Moolenaare1f3fd12022-08-15 18:51:32 +010011let s:save_cpo = &cpo
12set cpo&vim
13
14" Matchit support
15if exists('loaded_matchit') && !exists('b:match_words')
16 let b:match_ignorecase = 0
17
18 let b:match_words = '\:\@<!\<\%(do\|fn\)\:\@!\>' .
19 \ ':' .
20 \ '\<\%(else\|catch\|after\|rescue\)\:\@!\>' .
21 \ ':' .
22 \ '\:\@<!\<end\>' .
23 \ ',{:},\[:\],(:)'
24endif
25
Bram Moolenaar9fbdbb82022-09-27 17:30:34 +010026setlocal shiftwidth=2 softtabstop=2 expandtab iskeyword+=!,?
27setlocal comments=:#
Bram Moolenaarce001a32022-04-27 15:25:03 +010028setlocal commentstring=#\ %s
Bram Moolenaare1f3fd12022-08-15 18:51:32 +010029
George GuimarĂ£es7e274112023-12-27 15:06:05 -030030setlocal indentkeys=0#,!^F,o,O
31" Enable keys for blocks
32setlocal indentkeys+=0=after,0=catch,0=do,0=else,0=end,0=rescue
33" Enable keys that are usually the first keys in a line
34setlocal indentkeys+=0->,0\|>,0},0],0),>
35
Christian Brabandtd1cea032023-12-27 19:30:41 +010036let b:undo_ftplugin = 'setlocal sw< sts< et< isk< com< cms< indk<'
Bram Moolenaar9fbdbb82022-09-27 17:30:34 +010037
Bram Moolenaare1f3fd12022-08-15 18:51:32 +010038let &cpo = s:save_cpo
39unlet s:save_cpo