diff options
| author | Mehmet Samet Duman <yongdohyun@projecttick.org> | 2026-04-02 18:44:22 +0300 |
|---|---|---|
| committer | Mehmet Samet Duman <yongdohyun@projecttick.org> | 2026-04-02 18:44:22 +0300 |
| commit | 934382c8a1ce738589dee9ee0f14e1cec812770e (patch) | |
| tree | f13715762efd06518f8aec3a2bf39ac8a615987f /uvim/runtime/ftplugin/haredoc.vim | |
| parent | 0b24459ac12b6cf9fd5a401d647796ca254a8fa8 (diff) | |
| parent | 7088926316d8d4a7572a242d0765e99adfc8b083 (diff) | |
| download | Project-Tick-934382c8a1ce738589dee9ee0f14e1cec812770e.tar.gz Project-Tick-934382c8a1ce738589dee9ee0f14e1cec812770e.zip | |
Add 'uvim/' from commit '7088926316d8d4a7572a242d0765e99adfc8b083'
git-subtree-dir: uvim
git-subtree-mainline: 0b24459ac12b6cf9fd5a401d647796ca254a8fa8
git-subtree-split: 7088926316d8d4a7572a242d0765e99adfc8b083
Diffstat (limited to 'uvim/runtime/ftplugin/haredoc.vim')
| -rw-r--r-- | uvim/runtime/ftplugin/haredoc.vim | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/uvim/runtime/ftplugin/haredoc.vim b/uvim/runtime/ftplugin/haredoc.vim new file mode 100644 index 0000000000..04cabfb4b5 --- /dev/null +++ b/uvim/runtime/ftplugin/haredoc.vim @@ -0,0 +1,50 @@ +vim9script + +# Vim filetype plugin. +# Language: Haredoc (Hare documentation format) +# Maintainer: Amelia Clarke <selene@perilune.dev> +# Last Change: 2026 Jan 24 +# Upstream: https://git.sr.ht/~sircmpwn/hare.vim + +if exists('b:did_ftplugin') + finish +endif +b:did_ftplugin = 1 + +# Use the Hare compiler. +compiler hare +b:undo_ftplugin = 'compiler make' + +# Formatting settings. +setlocal comments=:\ +setlocal commentstring=\ %s +setlocal formatlistpat=^\\s*-\\s\\+ +setlocal formatoptions+=tnlj formatoptions-=c formatoptions-=q +b:undo_ftplugin ..= ' | setl cms< com< flp< fo<' + +# Locate Hare modules. +&l:includeexpr = 'trim(v:fname, ":", 2)->substitute("::", "/", "g")' +setlocal isfname+=: +&l:path = ',,' .. hare#GetPath() +b:undo_ftplugin ..= ' | setl inex< isf< pa<' + +# Follow the official style guide by default. +if get(g:, 'hare_recommended_style', 1) + setlocal noexpandtab + setlocal shiftwidth=8 + setlocal softtabstop=0 + setlocal tabstop=8 + setlocal textwidth=80 + b:undo_ftplugin ..= ' | setl et< sts< sw< ts< tw<' +endif + +# 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 tw=80 |
