From 3d39ea3ea9b6e66640e59731d155d731218e7e62 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sun, 26 May 2024 07:11:50 +0800 Subject: vim-patch:9.1.0442: hare runtime files outdated (#29011) Problem: hare runtime files outdated Solution: runtime(hare): update hare.vim to match upstream (Amelia Clarke) closes: vim/vim#14836 https://github.com/vim/vim/commit/35dfe58a540e2fb0eff953630f8e4fcbf4bc26ca Co-authored-by: Amelia Clarke --- runtime/ftplugin/hare.vim | 56 +++++++++++++++++++++++++++++++++-------------- 1 file changed, 40 insertions(+), 16 deletions(-) (limited to 'runtime/ftplugin/hare.vim') diff --git a/runtime/ftplugin/hare.vim b/runtime/ftplugin/hare.vim index 0200ba5913..422bb7b4e8 100644 --- a/runtime/ftplugin/hare.vim +++ b/runtime/ftplugin/hare.vim @@ -1,35 +1,59 @@ -" Vim filetype plugin -" Language: Hare -" Maintainer: Amelia Clarke -" Previous Maintainer: Drew DeVault -" Last Updated: 2022-09-28 -" 2023 Aug 28 by Vim Project (undo_ftplugin) +" Vim filetype plugin. +" Language: Hare +" Maintainer: Amelia Clarke +" Last Updated: 2024-05-10 +" Upstream: https://git.sr.ht/~sircmpwn/hare.vim if exists('b:did_ftplugin') finish endif let b:did_ftplugin = 1 -" Formatting settings. -setlocal formatoptions-=t formatoptions+=croql/ +let s:cpo_save = &cpo +set cpo&vim + +" Set the default compiler. +compiler hare -" Miscellaneous. +" Formatting settings. setlocal comments=:// setlocal commentstring=//\ %s +setlocal formatlistpat=^\ \\?-\ +setlocal formatoptions+=croqnlj/ formatoptions-=t + +" Search for Hare modules. +setlocal include=^\\s*use\\> +setlocal includeexpr=hare#FindModule(v:fname) +setlocal isfname+=: setlocal suffixesadd=.ha -let b:undo_ftplugin = "setl cms< com< fo< sua<" +" Add HAREPATH to the default search paths. +setlocal path-=/usr/include,, +let &l:path .= ',' .. hare#GetPath() .. ',,' -" Hare recommended style. -if get(g:, "hare_recommended_style", 1) +let b:undo_ftplugin = 'setl cms< com< flp< fo< inc< inex< isf< pa< sua< mp<' + +" Follow the Hare style guide by default. +if get(g:, 'hare_recommended_style', 1) setlocal noexpandtab - setlocal shiftwidth=8 + setlocal shiftwidth=0 setlocal softtabstop=0 setlocal tabstop=8 setlocal textwidth=80 - let b:undo_ftplugin ..= " | setl et< sts< sw< ts< tw<" + let b:undo_ftplugin .= ' et< sts< sw< ts< tw<' endif -compiler hare +augroup hare.vim + autocmd! + + " Highlight whitespace errors by default. + if get(g:, 'hare_space_error', 1) + autocmd InsertEnter * hi link hareSpaceError NONE + autocmd InsertLeave * hi link hareSpaceError Error + endif +augroup END + +let &cpo = s:cpo_save +unlet s:cpo_save -" vim: et sw=2 sts=2 ts=8 +" vim: et sts=2 sw=2 ts=8 -- cgit From 88085c2e80a7e3ac29aabb6b5420377eed99b8b6 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Sat, 5 Oct 2024 17:41:54 +0200 Subject: vim-patch:7c3f9af: runtime(misc): unset compiler in various ftplugins just to foster best practices closes: vim/vim#15798 https://github.com/vim/vim/commit/7c3f9af0ed5dd7035f8a3fbb2f0bf965a453e359 Co-authored-by: Konfekt --- runtime/ftplugin/hare.vim | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'runtime/ftplugin/hare.vim') diff --git a/runtime/ftplugin/hare.vim b/runtime/ftplugin/hare.vim index 422bb7b4e8..6c61c818d1 100644 --- a/runtime/ftplugin/hare.vim +++ b/runtime/ftplugin/hare.vim @@ -1,7 +1,7 @@ " Vim filetype plugin. " Language: Hare " Maintainer: Amelia Clarke -" Last Updated: 2024-05-10 +" Last Updated: 2024 Oct 04 " Upstream: https://git.sr.ht/~sircmpwn/hare.vim if exists('b:did_ftplugin') @@ -12,9 +12,6 @@ let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim -" Set the default compiler. -compiler hare - " Formatting settings. setlocal comments=:// setlocal commentstring=//\ %s @@ -53,6 +50,11 @@ augroup hare.vim endif augroup END +if !exists('current_compiler') + let b:undo_ftplugin .= "| compiler make" + compiler hare +endif + let &cpo = s:cpo_save unlet s:cpo_save -- cgit