summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorShaun Duncan <shaun.duncan@gmail.com>2022-08-23 07:22:52 -0400
committerGitHub <noreply@github.com>2022-08-23 20:22:52 +0900
commit6996d1c14dd109cc5112d1a60c86683e5308d14c (patch)
tree10e39b7a944f2096bebea6fc3c14dad060d18483 /doc
parentd93bc2baf7532818e83bf2fac61fcd591beb6151 (diff)
downloadale-6996d1c14dd109cc5112d1a60c86683e5308d14c.zip
Allow callbacks for floating preview popups (#4247)
* Add extra config options for virtualtext * Undo virtualtext changes and move to floating preview * revert changes to pass hightlight group to floating preview * rename var * Document changes * Add updates based on feedback * Check for string type and attempt to call the function * Fix lint errors Co-authored-by: Shaun Duncan <shaun@speedscale.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/ale.txt23
1 files changed, 23 insertions, 0 deletions
diff --git a/doc/ale.txt b/doc/ale.txt
index 48088e62..c9cb8585 100644
--- a/doc/ale.txt
+++ b/doc/ale.txt
@@ -1234,6 +1234,29 @@ g:ale_floating_preview *g:ale_floating_preview*
|g:ale_detail_to_floating_preview| to `1`.
+g:ale_floating_preview_popup_opts *g:ale_floating_preview_popup_opts*
+
+ Type: |String| or |Dictionary|
+ Default: `''`
+
+ Either a dictionary of options or the string name of a function that returns a
+ dictionary of options. This will be used as an argument to |popup_create| for
+ Vim users or |nvim_open_win| for NeoVim users. Note that in either case, the
+ resulting dictionary is merged with ALE defaults rather than expliciting overriding
+ them. This only takes effect if |g:ale_floating_preview| is enabled.
+
+ NOTE: for Vim users see |popup_create-arguments|, for NeoVim users see
+ |nvim_open_win| for argument details
+
+ For example, to enhance popups with a title: >
+
+ function! CustomOpts() abort {
+ let [l:info, l:loc] = ale#util#FindItemAtCursor(bufnr(''))
+ return {'title': ' ALE: ' . (l:loc.linter_name) . ' '}
+ endfunction
+<
+
+
g:ale_floating_window_border *g:ale_floating_window_border*
Type: |List|