summaryrefslogtreecommitdiffstats
path: root/runtime/doc/gnvim.txt
blob: fc21676783d1537a226fb41473ca5773b25cc22d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
*gnvim* GUI for Neovim.

                      ____ _   _       _             ~
                     / ___| \ | |_   _(_)_ __ ___    ~
                    | |  _|  \| \ \ / / | '_ ` _ \   ~
                    | |_| | |\  |\ V /| | | | | | |  ~
                     \____|_| \_| \_/ |_|_| |_| |_|  ~


================================================================================
CONTENTS                                                       *gnvim-contents*

            1. Cursor Tooltip.......................|gnvim-cursor-tooltip|
            2. Popupmenu............................|gnvim-popupmenu|
            3. Cursor...............................|gnvim-cursor|
            4. Ext options..........................|gnvim-ext-opts|

================================================================================
Cursor Tooltip                                           *gnvim-cursor-tooltip*

Gnvim comes with a cursor tooltip feature which allows users to render markdown
documents in a pupup element. This tooltip will render markdown documents into
html and displays them using webkit. Syntax highlighting is done by `syntect`,
which uses sublime syntax and themes. It is not possible to load custom
languages on the runtime - if support to some language is missing,
open an issue to the gnvim's github repo. Color themes can be loaded with
|gnvim#cursor_tooltip#load_style|.

For integration with lsp, see: https://github.com/vhakulinen/gnvim-lsp/

================================================================================
Popupmenu                                                *gnvim-popupmenu*
                                                         *gnvim-complete*

Gnvim utilizes neovim's ext_popupmenu to render the omni completion menu.

The popupmenu that gnvim has is inspired by vscode and thus has similar
`details` view. Basically, when this `details` view is enabled, gnvim will
split the completion menu in half, and display documentation on the right side.
Some of this documentation is displayed when the `details` view is not
enabled (all that there is room for).  To enabled this split, call
|gnvim#popupmenu#toggle_details|. By default, this is bind to <C-s>.

Popupmenu's width can be adjusted with |gnvim#popupmenu#set_width| and with
|gnvim#popupmenu#set_width_details|

`menu` property of the completion items might not be shown all the time. This
can be changed by calling |gnvim#popupmenu#show_menu_on_all_items|.

================================================================================
Cursor                                                           *gnvim-cursor*
                                                       *gnvim-cursor-blinking*

Gnvim's cursor can be set to blink with `guicursor`.

Make cursor blink: `set guicursor+=a:blinkon333`
Make cursor not to blink: `set guicursor+=a:blinkon0`

The cursor also has animated position movement, which is on by default. To
disable it, use `GnvimCursorEnableAnimations 0` .

================================================================================
Ext options                                                 *gnvim-ext-options*

Gnvim utilizes many of the externalized UI options nvim offers. Some of these
changes the visual representation of some nvim features and thus users might
want to revert back to the "default" (e.g. TUI) functionality. This can be
done either through cli flags or `gnvim#enable_ext_*` functions.

================================================================================
Commands                                                       *gnvim-commands*

CursorTooltipStyle                                         *CursorTooltipStyle*

    Set the current cursor tooltip style.

================================================================================
Functions                                                     *gnvim-functions*

gnvim#enable_ext_tabline                             *gnvim#enable_ext_tabline*
gnvim#enable_ext_cmdline                             *gnvim#enable_ext_cmdline*
gnvim#enable_ext_popupmenu                          *gnvim#enable_ext_popupmeu*

    Enable or disable the externalized tabline/cmdline/popupmenu.

    Example: >
        " disable:
        call gnivm#enable_ext_tabline(0)
        " enable:
        call gnivm#enable_ext_tabline(1)
<

gnvim#cursor_tooltip#load_style               *gnvim#cursor_tooltip#load_style*

    Loads `.tmTheme` file to be used in the cursor tooltip.

    Example:
        call gnivm#cursor_tooltip#load_style("~/nord.tmTheme")

gnvim#cursor_tooltip#get_styles               *gnvim#cursor_tooltip#get_styles*

    Returns list of available styles for the cursor tooltip.

gnvim#cursor_tooltip#show                           *gnvim#cursor_tooltip#show*

    Shows the cursor tooltip.
    Takes three parameters:

        - Markdown content (string)
        - Row (int)
        - Col (int)

gnvim#cursor_tooltip#hide                           *gnvim#cursor_tooltip#hide*

    Hides the cursor tooltip.

gnvim#popupmenu#toggle_details                 *gnvim#popupmenu#toggle_details*

    While in completion mode, opens the details view.

gnvim#popupmenu#set_width                           *gnvim#popupmenu#set_width*

    Set the width of the popupmenu, when the details view is not open. Takes
    one parameter `width`, which is width in pixels.

gnvim#popupmenu#set_width_details           *gnvim#popupmenu#set_width_details*

    Set the width of the popupmenu, when the details view is open. Takes one
    parameter `width`, which is width in pixels.

gnvim#popupmenu#show_menu_on_all_items *gnvim#popupmenu#show_menu_on_all_items*

    Instructs the popupmenu to show the `menu` item for all (e.g. inactive)
    completion items. Accepts one parameter, 0 or 1.

 vim:tw=78:ts=8:ft=help:norl: