Skip to content

Commit a80c2f9

Browse files
heavenshellmattn
authored andcommitted
Add zuban(Python type checker and language server)
1 parent e8d6418 commit a80c2f9

File tree

5 files changed

+39
-0
lines changed

5 files changed

+39
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ You can change the directory to install servers by set `g:lsp_settings_servers_d
158158
| Python | ruff | Yes | Yes |
159159
| Python | ruff-lsp | Yes | Yes |
160160
| Python | ty | Yes | Yes |
161+
| Python | zuban | Yes | Yes |
161162
| Prisma | prisma-language-server | Yes | Yes |
162163
| Qml | qmlls | Yes | Yes |
163164
| R | languageserver | Yes | No |

installer/install-zuban.cmd

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
@echo off
2+
3+
call "%~dp0\pip_install.cmd" zuban zuban

installer/install-zuban.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/sh
2+
3+
set -e
4+
5+
"$(dirname "$0")/pip_install.sh" zuban zuban

settings.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1505,6 +1505,22 @@
15051505
"requires": [
15061506
"python3"
15071507
]
1508+
},
1509+
{
1510+
"command": "zuban",
1511+
"url": "https://zubanls.com",
1512+
"description": "The Python Language Server for Professionals. A Mypy-compatible Python Language Server built in Rust",
1513+
"requires": [
1514+
"py"
1515+
]
1516+
},
1517+
{
1518+
"command": "zuban",
1519+
"url": "https://zubanls.com",
1520+
"description": "The Python Language Server for Professionals. A Mypy-compatible Python Language Server built in Rust",
1521+
"requires": [
1522+
"python3"
1523+
]
15081524
}
15091525
],
15101526
"qml": [

settings/zuban.vim

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
augroup vim_lsp_settings_zuban
2+
au!
3+
LspRegisterServer {
4+
\ 'name': 'zuban',
5+
\ 'cmd': {server_info->lsp_settings#get('zuban', 'cmd', [lsp_settings#exec_path('zuban')]+lsp_settings#get('zuban', 'args', ['server']))},
6+
\ 'root_uri':{server_info->lsp_settings#get('zuban', 'root_uri', lsp_settings#root_uri('zuban'))},
7+
\ 'initialization_options': lsp_settings#get('zuban', 'initialization_options', v:null),
8+
\ 'allowlist': lsp_settings#get('zuban', 'allowlist', ['python']),
9+
\ 'blocklist': lsp_settings#get('zuban', 'blocklist', []),
10+
\ 'config': lsp_settings#get('zuban', 'config', lsp_settings#server_config('zuban')),
11+
\ 'workspace_config': lsp_settings#get('zuban', 'workspace_config', {}),
12+
\ 'semantic_highlight': lsp_settings#get('zuban', 'semantic_highlight', {}),
13+
\ }
14+
augroup END

0 commit comments

Comments
 (0)