robin/laufey
git clone https://git.robinwobin.dev/robin/laufey
2e35161fa1
master
1*ft_hare.txt* Support for the Hare programming language 2 3============================================================================== 4CONTENTS *hare* 5 61. Introduction |hare-intro| 72. Filetype plugin |hare-plugin| 83. Settings |hare-settings| 9 10============================================================================== 11INTRODUCTION *hare-intro* 12 13This plugin provides syntax highlighting, indentation, and other functionality 14for the Hare programming language. Support is also provided for README files 15inside Hare modules, but this must be enabled by setting |g:filetype_haredoc|. 16 17============================================================================== 18FILETYPE PLUGIN *hare-plugin* 19 20This plugin automatically sets the value of 'path' to include the contents of 21the HAREPATH environment variable, allowing commands such as |gf| to directly 22open standard library or third-party modules. If HAREPATH is not set, it 23defaults to the recommended paths for most Unix-like filesystems, namely 24/usr/src/hare/stdlib and /usr/src/hare/third-party. 25 26============================================================================== 27SETTINGS *hare-settings* 28 29This plugin provides a small number of variables that you can define in your 30vimrc to configure its behavior. 31 32 *g:filetype_haredoc* 33This plugin is able to automatically detect Hare modules and set the "haredoc" 34filetype for any README files. As the recursive directory search used as a 35heuristic has a minor performance impact, this feature is disabled by default 36and must be specifically opted into: > 37 let g:filetype_haredoc = 1 38< 39See |g:haredoc_search_depth| for ways to tweak the searching behavior. 40 41 *g:hare_recommended_style* 42The following options are set by default, in accordance with the official Hare 43style guide: > 44 setlocal noexpandtab 45 setlocal shiftwidth=0 46 setlocal softtabstop=0 47 setlocal tabstop=8 48 setlocal textwidth=80 49< 50To disable this behavior: > 51 let g:hare_recommended_style = 0 52< 53 *g:hare_space_error* 54By default, trailing whitespace and tabs preceded by space characters are 55highlighted as errors. This is automatically turned off when in insert mode. 56To disable this highlighting completely: > 57 let g:hare_space_error = 0 58< 59 *g:haredoc_search_depth* 60By default, when |g:filetype_haredoc| is enabled, only the current directory 61and its immediate subdirectories are searched for Hare files. The maximum 62search depth may be adjusted with: > 63 let g:haredoc_search_depth = 2 64< 65 Value Effect~ 66 0 Only search the current directory. 67 1 Search the current directory and immediate 68 subdirectories. 69 2 Search the current directory and two levels of 70 subdirectories. 71 72The maximum search depth can be set to any integer, but using values higher 73than 2 is not recommended, and will likely provide no tangible benefit in most 74situations. 75 76 vim:tw=78:ts=8:noet:ft=help:norl: