Skip to content

Commit 2bb97d2

Browse files
authored
Replace references to pylsp with pyls (#1378)
The palantir pyls repository is no longer maintained, the documentation should not lead user down the path of configuring this dead end project. pylps is the actively maintained sucessor project forked from pyls.
1 parent 1dced33 commit 2bb97d2

File tree

4 files changed

+17
-17
lines changed

4 files changed

+17
-17
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ use vim compiled with lua or neovim v0.4.0+
1818
## Registering servers
1919

2020
```viml
21-
if executable('pyls')
22-
" pip install python-language-server
21+
if executable('pylsp')
22+
" pip install python-lsp-server
2323
au User lsp_setup call lsp#register_server({
24-
\ 'name': 'pyls',
25-
\ 'cmd': {server_info->['pyls']},
24+
\ 'name': 'pylsp',
25+
\ 'cmd': {server_info->['pylsp']},
2626
\ 'allowlist': ['python'],
2727
\ })
2828
endif

autoload/lsp.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ let s:notification_callbacks = [] " { name, callback }
1414
" "bingo": [ "first-line", "next-line", ... ]
1515
" },
1616
" 2: {
17-
" "pyls": [ "first-line", "next-line", ... ]
17+
" "pylsp": [ "first-line", "next-line", ... ]
1818
" }
1919
" }
2020
let s:file_content = {}

doc/vim-lsp.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -217,19 +217,19 @@ vim-lsp doesn't ship with any language servers. The user is responsible for
217217
configuring the language servers correctly.
218218

219219
Here is an example of configuring the python language server protocol based
220-
on pyls (https://github.com/palantir/python-language-server)
220+
on pylsp (https://github.com/python-lsp/python-lsp-server)
221221

222222
1. Make sure the language server is available locally in the machine.
223223
For python, pip package manager can be used to install the language server.
224224
>
225-
pip install python-language-server
225+
pip install python-lsp-server
226226
227227
2. Register the language server in your .vimrc
228228
>
229-
if (executable('pyls'))
229+
if (executable('pylsp'))
230230
au User lsp_setup call lsp#register_server({
231-
\ 'name': 'pyls',
232-
\ 'cmd': {server_info->['pyls']},
231+
\ 'name': 'pylsp',
232+
\ 'cmd': {server_info->['pylsp']},
233233
\ 'allowlist': ['python']
234234
\ })
235235
endif
@@ -1085,7 +1085,7 @@ Used to register the language server with vim-lsp. This method takes
10851085
one parameter which is a vim |dict| and is referred to as |vim-lsp-server_info|
10861086

10871087
Example: >
1088-
if (executable('pyls'))
1088+
if (executable('pylsp'))
10891089
au User lsp_setup call lsp#register_server({
10901090
\ 'name': 'name-of-server',
10911091
\ 'cmd': {server_info->['server-exectuable']},
@@ -1137,7 +1137,7 @@ The vim |dict| containing information about the server.
11371137
can be determined statically and |vim-lsp-server_info| is not necessary.
11381138

11391139
Example: >
1140-
'cmd': ['pyls']
1140+
'cmd': ['pylsp']
11411141
<
11421142
Function can be complex based on custom requirements.
11431143
For example:
@@ -1190,7 +1190,7 @@ The vim |dict| containing information about the server.
11901190
initialization. Configuration settings are language-server specific.
11911191

11921192
Example: >
1193-
'workspace_config': {'pyls': {'plugins': \
1193+
'workspace_config': {'pylsp': {'plugins': \
11941194
{'pydocstyle': {'enabled': v:true}}}}
11951195
<
11961196
* languageId:

minimal.vimrc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
2525
inoremap <expr> <cr> pumvisible() ? "\<C-y>\<cr>" : "\<cr>"
2626
autocmd! CompleteDone * if pumvisible() == 0 | pclose | endif
2727

28-
if executable('pyls')
29-
" pip install python-language-server
28+
if executable('pylsp')
29+
" pip install python-lsp-server
3030
au User lsp_setup call lsp#register_server({
31-
\ 'name': 'pyls',
32-
\ 'cmd': {server_info->['pyls']},
31+
\ 'name': 'pylsp',
32+
\ 'cmd': {server_info->['pylsp']},
3333
\ 'allowlist': ['python'],
3434
\ })
3535
endif

0 commit comments

Comments
 (0)