runtime(idris2): include filetype,indent+syntax plugins for (L)Idris2 + ipkg
closes: #15993
Co-authored-by: Christian Clason <ch.clason+github@icloud.com>
Signed-off-by: Serhii Khoma <srghma@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/runtime/doc/filetype.txt b/runtime/doc/filetype.txt
index 88ec43f..8b4e25e 100644
--- a/runtime/doc/filetype.txt
+++ b/runtime/doc/filetype.txt
@@ -1,4 +1,4 @@
-*filetype.txt* For Vim version 9.1. Last change: 2024 Nov 09
+*filetype.txt* For Vim version 9.1. Last change: 2024 Nov 12
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -667,6 +667,19 @@
Since the text for this plugin is rather long it has been put in a separate
file: |ft_hare.txt|.
+IDRIS2 *ft-idris2-plugin*
+
+By default the following options are set: >
+
+ setlocal shiftwidth=2 tabstop=2 expandtab
+ setlocal comments=s1:{-,mb:-,ex:-},:\|\|\|,:--
+ setlocal commentstring=--\ %s
+ setlocal wildignore+=*.ibc
+
+To use tabs instead of spaces for indentation, set the following variable
+in your vimrc: >
+
+ let g:idris2#allow_tabchar = 1
JAVA *ft-java-plugin*
diff --git a/runtime/doc/indent.txt b/runtime/doc/indent.txt
index 9266f3a..8f347d7 100644
--- a/runtime/doc/indent.txt
+++ b/runtime/doc/indent.txt
@@ -1,4 +1,4 @@
-*indent.txt* For Vim version 9.1. Last change: 2024 Oct 05
+*indent.txt* For Vim version 9.1. Last change: 2024 Nov 12
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -813,6 +813,38 @@
: GetCSSIndent() else
<!-- --> : -1
+IDRIS2 *ft-idris2-indent*
+
+Idris 2 indentation can be configured with several variables that control the
+indentation level for different language constructs:
+
+The "g:idris2_indent_if" variable controls the indentation of `then` and `else`
+blocks after `if` statements. Defaults to 3.
+
+The "g:idris2_indent_case" variable controls the indentation of patterns in
+`case` expressions. Defaults to 5.
+
+The "g:idris2_indent_let" variable controls the indentation after `let`
+bindings. Defaults to 4.
+
+The "g:idris2_indent_rewrite" variable controls the indentation after `rewrite`
+expressions. Defaults to 8.
+
+The "g:idris2_indent_where" variable controls the indentation of `where`
+blocks. Defaults to 6.
+
+The "g:idris2_indent_do" variable controls the indentation in `do` blocks.
+Defaults to 3.
+
+Example configuration: >
+
+ let g:idris2_indent_if = 2
+ let g:idris2_indent_case = 4
+ let g:idris2_indent_let = 4
+ let g:idris2_indent_rewrite = 8
+ let g:idris2_indent_where = 6
+ let g:idris2_indent_do = 3
+<
MATLAB *ft-matlab-indent* *matlab-indent* *matlab-indenting*
diff --git a/runtime/doc/tags b/runtime/doc/tags
index f7ca8d2..00c131d 100644
--- a/runtime/doc/tags
+++ b/runtime/doc/tags
@@ -7333,6 +7333,8 @@
ft-html-syntax syntax.txt /*ft-html-syntax*
ft-htmlos-syntax syntax.txt /*ft-htmlos-syntax*
ft-ia64-syntax syntax.txt /*ft-ia64-syntax*
+ft-idris2-indent indent.txt /*ft-idris2-indent*
+ft-idris2-plugin filetype.txt /*ft-idris2-plugin*
ft-inform-syntax syntax.txt /*ft-inform-syntax*
ft-java-plugin filetype.txt /*ft-java-plugin*
ft-java-syntax syntax.txt /*ft-java-syntax*