robin/laufey
git clone https://git.robinwobin.dev/robin/laufey
7945732ed7
master
1" Vim filetype plugin. 2" Language: Hare 3" Maintainer: Amelia Clarke <selene@perilune.dev> 4" Last Updated: 2024 Oct 04 5" 2026 Jun 27 by Vim Project (normalize recommended style guard) 6" Upstream: https://git.sr.ht/~sircmpwn/hare.vim 7 8if exists ( 'b:did_ftplugin' ) 9finish 10endif 11let b: did_ftplugin = 1 12 13let s: cpo_save = & cpo 14set cpo & vim 15 16" Formatting settings. 17setlocal comments = :// 18setlocal commentstring = //\ %s 19setlocal formatlistpat = ^\ \\?-\ 20setlocal formatoptions += croqnlj/formatoptions -= t 21 22" Search for Hare modules. 23setlocal include = ^\\s*use\\> 24setlocal includeexpr = hare #FindModule(v:fname) 25setlocal isfname += : 26setlocal suffixesadd = .ha 27 28" Add HAREPATH to the default search paths. 29setlocal path -= /usr/include,, 30let & l: path .= ',' .. hare#GetPath () .. ',,' 31 32let b: undo_ftplugin = 'setl cms< com< flp< fo< inc< inex< isf< pa< sua< mp<' 33 34" Follow the Hare style guide by default. 35if get ( g:, 'hare_recommended_style' , get ( g:, 'filetype_recommended_style' , 1 )) 36setlocal noexpandtab 37setlocal shiftwidth = 0 38setlocal softtabstop = 0 39setlocal tabstop = 8 40setlocal textwidth = 80 41let b: undo_ftplugin .= ' et< sts< sw< ts< tw<' 42endif 43 44augroup hare .vim 45autocmd ! 46 47" Highlight whitespace errors by default. 48if get ( g:, 'hare_space_error' , 1 ) 49autocmd InsertEnter * hi link hareSpaceError NONE 50autocmd InsertLeave * hi link hareSpaceError Error 51endif 52augroup END 53 54if ! exists ( 'current_compiler' ) 55let b: undo_ftplugin .= "| compiler make" 56compiler hare 57endif 58 59let & cpo = s: cpo_save 60unlet s: cpo_save 61 62" vim: et sts=2 sw=2 ts=8