-
Notifications
You must be signed in to change notification settings - Fork 0
/
nvim-lsp-autoimport.txt
71 lines (57 loc) · 1.96 KB
/
nvim-lsp-autoimport.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
*nvim-lsp-autoimport.txt* nvim-lsp autoimport
Author: Ttayu
License: MIT license
CONTENTS *nvim-lsp-autoimport-contents*
Introduction |nvim-lsp-autoimport-introduction|
Install |nvim-lsp-autoimport-install|
Examples |nvim-lsp-autoimport-examples|
==============================================================================
INTRODUCTION *nvim-lsp-autoimport-introduction*
This function automatically imports missing modules suggested by the nvim-lsp
completion items in neovim.
==============================================================================
INSTALL *nvim-lsp-autoimport-install*
To use autoimport,
>
:lua require("autoimport")
<
You must use neovim with nvim-lsp configuration.
==============================================================================
EXAMPLES *nvim-lsp-autoimport-examples*
"dein.toml":
>
[[plugins]]
repo = 'Shougo/ddc.vim'
on_event = 'InsertEnter'
hook_source = '''
call ddc#custom#patch_global('sources', ['nvim-lsp'])
call ddc#custom#patch_global('sourceOptions', {
\ 'nvim-lsp': {
\ 'mark': 'lsp',
\ },
\}
call ddc#custom#patch_global('ui', 'pum')
inoremap <C-n> <Cmd>call pum#map#insert_relative(+1)<CR>
inoremap <C-p> <Cmd>call pum#map#insert_relative(-1)<CR>
inoremap <C-y> <Cmd>call pum#map#confirm()<CR>
'''
[[plugins]]
repo = 'Shougo/pum.vim'
[[plugins]]
repo = 'Shougo/ddc-ui-pum'
on_source = 'ddc.vim'
[[plugins]]
repo = 'Shougo/ddc-source-nvim-lsp'
on_source = 'ddc.vim'
[[plugins]]
repo = 'Ttayu/nvim-lsp-autoimport'
on_source = ['nvim-lspconfig', 'pum.vim']
lua_source = '''
require("autoimport")
'''
<
==============================================================================
NOTE
Currently, the function has only been tested with autoimport using `python-lsp/python-lsp-server` and rope.
==============================================================================
vim:tw=78:ts=8:ft=help:norl:noet:fen:noet: