runtime(hare): update for Hare 0.25.2
closes: #18222 Signed-off-by: Amelia Clarke <selene@perilune.dev> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
6bb16d2cee
commit
6d68508e62
@ -1,61 +1,52 @@
|
||||
" Vim filetype plugin.
|
||||
" Language: Hare
|
||||
" Maintainer: Amelia Clarke <selene@perilune.dev>
|
||||
" Last Updated: 2024 Oct 04
|
||||
" Upstream: https://git.sr.ht/~sircmpwn/hare.vim
|
||||
vim9script
|
||||
|
||||
# Vim filetype plugin.
|
||||
# Language: Hare
|
||||
# Maintainer: Amelia Clarke <selene@perilune.dev>
|
||||
# Last Updated: 2025 Sep 06
|
||||
# Upstream: https://git.sr.ht/~sircmpwn/hare.vim
|
||||
|
||||
if exists('b:did_ftplugin')
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
b:did_ftplugin = 1
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
# Use the Hare compiler.
|
||||
compiler hare
|
||||
b:undo_ftplugin = 'compiler make'
|
||||
|
||||
" Formatting settings.
|
||||
# Formatting settings.
|
||||
setlocal comments=://
|
||||
setlocal commentstring=//\ %s
|
||||
setlocal formatlistpat=^\ \\?-\
|
||||
setlocal formatlistpat=^\\s*-\
|
||||
setlocal formatoptions+=croqnlj/ formatoptions-=t
|
||||
b:undo_ftplugin ..= ' | setl cms< com< flp< fo<'
|
||||
|
||||
" Search for Hare modules.
|
||||
setlocal include=^\\s*use\\>
|
||||
setlocal includeexpr=hare#FindModule(v:fname)
|
||||
# Locate Hare modules.
|
||||
&l:include = '\v^\s*use\s+%(\h\w*\s*\=)?'
|
||||
setlocal includeexpr=hare#IncludeExpr()
|
||||
setlocal isfname+=:
|
||||
&l:path = ',,' .. hare#GetPath()
|
||||
setlocal suffixesadd=.ha
|
||||
b:undo_ftplugin ..= ' | setl inc< inex< isf< pa< sua<'
|
||||
|
||||
" Add HAREPATH to the default search paths.
|
||||
setlocal path-=/usr/include,,
|
||||
let &l:path .= ',' .. hare#GetPath() .. ',,'
|
||||
|
||||
let b:undo_ftplugin = 'setl cms< com< flp< fo< inc< inex< isf< pa< sua< mp<'
|
||||
|
||||
" Follow the Hare style guide by default.
|
||||
# Follow the official style guide by default.
|
||||
if get(g:, 'hare_recommended_style', 1)
|
||||
setlocal noexpandtab
|
||||
setlocal shiftwidth=0
|
||||
setlocal softtabstop=0
|
||||
setlocal tabstop=8
|
||||
setlocal textwidth=80
|
||||
let b:undo_ftplugin .= ' et< sts< sw< ts< tw<'
|
||||
b:undo_ftplugin ..= ' | setl et< sts< sw< ts< tw<'
|
||||
endif
|
||||
|
||||
augroup hare.vim
|
||||
autocmd!
|
||||
|
||||
" Highlight whitespace errors by default.
|
||||
if get(g:, 'hare_space_error', 1)
|
||||
# Highlight incorrect whitespace outside of insert mode.
|
||||
if get(g:, 'hare_space_error', 1)
|
||||
augroup HareSpaceError
|
||||
autocmd!
|
||||
autocmd InsertEnter * hi link hareSpaceError NONE
|
||||
autocmd InsertLeave * hi link hareSpaceError Error
|
||||
endif
|
||||
augroup END
|
||||
|
||||
if !exists('current_compiler')
|
||||
let b:undo_ftplugin .= "| compiler make"
|
||||
compiler hare
|
||||
augroup END
|
||||
endif
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
" vim: et sts=2 sw=2 ts=8
|
||||
# vim: et sts=2 sw=2 ts=8 tw=80
|
||||
|
@ -1,44 +1,51 @@
|
||||
" Vim filetype plugin.
|
||||
" Language: Haredoc (Hare documentation format)
|
||||
" Maintainer: Amelia Clarke <selene@perilune.dev>
|
||||
" Last Updated: 2024-05-02
|
||||
" Upstream: https://git.sr.ht/~selene/hare.vim
|
||||
vim9script
|
||||
|
||||
# Vim filetype plugin.
|
||||
# Language: Haredoc (Hare documentation format)
|
||||
# Maintainer: Amelia Clarke <selene@perilune.dev>
|
||||
# Last Updated: 2025 Sep 06
|
||||
# Upstream: https://git.sr.ht/~sircmpwn/hare.vim
|
||||
|
||||
if exists('b:did_ftplugin')
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
b:did_ftplugin = 1
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
# Use the Hare compiler.
|
||||
compiler hare
|
||||
b:undo_ftplugin = 'compiler make'
|
||||
|
||||
" Formatting settings.
|
||||
# Formatting settings.
|
||||
setlocal comments=:\
|
||||
setlocal formatlistpat=^\ \\?-\
|
||||
setlocal commentstring=\ %s
|
||||
setlocal formatlistpat=^-\
|
||||
setlocal formatoptions+=tnlj formatoptions-=c formatoptions-=q
|
||||
b:undo_ftplugin ..= ' | setl cms< com< flp< fo<'
|
||||
|
||||
" Search for Hare modules.
|
||||
setlocal includeexpr=hare#FindModule(v:fname)
|
||||
# Locate Hare modules.
|
||||
setlocal includeexpr=hare#IncludeExpr()
|
||||
setlocal isfname+=:
|
||||
&l:path = ',,' .. hare#GetPath()
|
||||
setlocal suffixesadd=.ha
|
||||
b:undo_ftplugin ..= ' | setl inex< isf< pa< sua<'
|
||||
|
||||
" Add HAREPATH to the default search paths.
|
||||
setlocal path-=/usr/include,,
|
||||
let &l:path .= ',' .. hare#GetPath() .. ',,'
|
||||
|
||||
let b:undo_ftplugin = 'setl com< flp< fo< inex< isf< pa< sua<'
|
||||
|
||||
" Follow the Hare style guide by default.
|
||||
# Follow the official style guide by default.
|
||||
if get(g:, 'hare_recommended_style', 1)
|
||||
setlocal noexpandtab
|
||||
setlocal shiftwidth=0
|
||||
setlocal softtabstop=0
|
||||
setlocal tabstop=8
|
||||
setlocal textwidth=80
|
||||
let b:undo_ftplugin .= ' et< sts< sw< ts< tw<'
|
||||
b:undo_ftplugin ..= ' | setl et< sts< sw< ts< tw<'
|
||||
endif
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
# Highlight incorrect whitespace outside of insert mode.
|
||||
if get(g:, 'hare_space_error', 1)
|
||||
augroup HaredocSpaceError
|
||||
autocmd!
|
||||
autocmd InsertEnter * hi link haredocSpaceError NONE
|
||||
autocmd InsertLeave * hi link haredocSpaceError Error
|
||||
augroup END
|
||||
endif
|
||||
|
||||
" vim: et sts=2 sw=2 ts=8
|
||||
# vim: et sts=2 sw=2 ts=8 tw=80
|
||||
|
Reference in New Issue
Block a user