-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlsp_ext.txt
203 lines (157 loc) · 7.2 KB
/
lsp_ext.txt
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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
*lsp_ext.txt* Collection of utility, callback and autocomand for Nvim LSP.
*lsp_ext*
==============================================================================
CONTENTS *lsp_ext_contents*
Introduction |lsp_ext_introduction|
Install |lsp_ext_install|
Usage |lsp_ext_usage|
Functions |lsp_ext_functions|
Utility Functions |lsp_ext.util|
Options |lsp_ext.options|
==============================================================================
INTRODUCTION *lsp_ext_introduction*
lsp-ext.nvim is collection of utility, callback and autocomand for Nvim
built-in LSP client.
It provides utility function for dubugging Nvim built-in LSP client and viewing
status and callbacks to replace the default callbacks.
==============================================================================
INSTALL *lsp_ext_install*
Install the lsp-ext.nvim plugin. Below is a sample using vim-plug
>
Plug 'h-michael/lsp-ext.nvim'
==============================================================================
USAGE *lsp_ext_usage*
This plugin is written in Lua.
You can call Lua from Vim script like this. >
lua require"lsp_ext".util.pp_buf_clients()
With luaeval function >
luaeval("require'lsp_ext'.util.pp_buf_clients()")
With hear document >
lua << EOF
local ext = require"lsp_ext"
ext.util.pp_buf_clients()
<< EOF
And you can call Lua from command like this. >
:lua require"lsp_ext".util.pp_buf_clients()
With luaeval function >
:call luaeval("require'lsp_ext'.util.pp_buf_clients()")
==============================================================================
FUNCTIONS *lsp_ext_functions*
*lsp_ext.set_signature_help_autocmd*
lsp_ext.set_signature_help_autocmd({wait})
Override `textDocument/signatureHelp` default callback and set autocmd for
`textDocument/signatureHelp`.
That autocmd execute `textDocument/signatureHelp` request if necessary,
when |CursorMoved| event occurs.
Parameters: ~
{wait} delay time(ms)
*lsp_ext.unset_signature_help_autocmd*
lsp_ext.unset_signature_help_autocmd({wait})
Unset autocmd for `textDocument/signatureHelp`.
*lsp_ext.set_publish_diagnostics_autocmd*
lsp_ext.set_publish_diagnostics_autocmd({wait})
Override `textDocument/publishDiagnostics` default callback and set
autocmd for `textDocument/publishDiagnostics`.
That autocmd for showing publishDiagnostics`, when |CursorMoved| event
occurs.
Parameters: ~
{wait} delay time(ms)
*lsp_ext.unset_publish_diagnostics_autocmd*
lsp_ext.unset_publish_diagnostics_autocmd({wait})
Unset autocmd for `textDocument/publishDiagnostics`.
------------------------------------------------------------------------------
UTILITY FUNCTION *lsp_ext.util*
*lsp_ext.util.pp_buf_clients*
lsp_ext.util.pp_buf_clients()
Print active lsp clients in the current buffer.
Example: >
lua require"lsp_ext".util.pp_buf_clients()
<
*lsp_ext.util.buf_clients_config*
lsp_ext.util.buf_clients_config()
Return active lsp client configs in current buffer.
Return: ~
List of client info tables.
- Members
- name
- name of language server name
- filetype
- target filetype names
- client
- see |vim.lsp.client|
Example: >
lua require"lsp_ext".util.buf_clients()
<
*lsp_ext.util.pp_buf_clients_config()*
lsp_ext.util.pp_buf_clients_config()
Print active lsp client configs in current buffer
*lsp_ext.util.buf_servers_capabilities()*
lsp_ext.util.buf_servers_capabilities()
Return active language servers capabilities in current buffer.
Return: ~
List of language server capabilities
- Members
- name
- name of language server name
- filetype
- target filetype names
- server_capabilities
- table of language server capabilities
Example: >
lua require"lsp_ext".util.buf_servers_capabilities()
<
*lsp_ext.util.pp_buf_servers_capabilities()*
lsp_ext.util.pp_buf_servers_capabilities()
Print active language servers capabilities in current buffer.
*lsp_ext.util.buf_resolved_capabilities()*
lsp_ext.util.buf_resolved_capabilities()
Return list of resolve_capabilities.
Return: ~
List of resolve_capabilities
- Members
- name
- name of language server name
- filetype
- target filetype names
- resolve_capabilities
- see |vim.lsp.protocol.resolve_capabilities()|
Example: >
lua require"lsp_ext".util.buf_resolved_capabilities()
*lsp_ext.util.pp_buf_resolved_capabilities()*
lsp_ext.util.pp_buf_resolved_capabilities()
Print list of resolve_capabilities.
==============================================================================
OPTIONS *lsp_ext_options*
*g:lsp_publish_diagnostics_virtualtext*
g:lsp_publish_diagnostics_virtualtext
If you execute *lsp_ext.set_publish_diagnostics_autocmd()*, you can
chose whether showing diagnostic messages at the virtualtext or not.
Type: boolean
Default: true
*g:lsp_publish_diagnostics_display_method*
g:lsp_publish_diagnostics_display_method
If you execute *lsp_ext.set_publish_diagnostics_autocmd()*, you can
chose where showing diagnostic messages at the virtualtext or not.
Type: string
Members:
- "echo"
- "float"
Default: "float"
*lsp_publish_diagnostics_severity_string_error*
g:lsp_publish_diagnostics_severity_string_error
Type: string
Default: "E"
*lsp_publish_diagnostics_severity_string_warning*
g:lsp_publish_diagnostics_severity_string_warning
Type: string
Default: "W"
*lsp_publish_diagnostics_severity_string_info*
g:lsp_publish_diagnostics_severity_string_info
Type: string
Default: "I"
*lsp_publish_diagnostics_severity_string_hint*
g:lsp_publish_diagnostics_severity_string_hint
Type: string
Default: "H"
==============================================================================
vim:tw=78:ts=4:sts=4:sw=4:ft=help:norl: