Add basedpyright-langserver

This commit is contained in:
Shinya Ohyanagi
2025-10-10 19:44:51 +09:00
committed by mattn
parent 0f74a568b8
commit ed3613eab6
5 changed files with 45 additions and 0 deletions

View File

@@ -159,6 +159,7 @@ You can change the directory to install servers by set `g:lsp_settings_servers_d
| Python | ruff-lsp | Yes | Yes |
| Python | ty | Yes | Yes |
| Python | zuban | Yes | Yes |
| Python | basedpyright-langserver | Yes | Yes |
| Prisma | prisma-language-server | Yes | Yes |
| Qml | qmlls | Yes | Yes |
| R | languageserver | Yes | No |

View File

@@ -0,0 +1,3 @@
@echo off
call "%~dp0\pip_install.cmd" basedpyright-langserver basedpyright

View File

@@ -0,0 +1,5 @@
#!/bin/sh
set -e
"$(dirname "$0")/pip_install.sh" basedpyright-langserver basedpyright

View File

@@ -1521,6 +1521,22 @@
"requires": [
"python3"
]
},
{
"command": "basedpyright-langserver",
"url": "https://github.com/detachhead/basedpyright",
"description": "Basedpyright is a fork of pyright with various type checking improvements, pylance features and more.",
"requires": [
"py"
]
},
{
"command": "basedpyright-langserver",
"url": "https://github.com/detachhead/basedpyright",
"description": "Basedpyright is a fork of pyright with various type checking improvements, pylance features and more.",
"requires": [
"python3"
]
}
],
"qml": [

View File

@@ -0,0 +1,20 @@
augroup vim_lsp_settings_basedpyright_langserver
au!
LspRegisterServer {
\ 'name': 'basedpyright-langserver',
\ 'cmd': {server_info->lsp_settings#get('basedpyright-langserver', 'cmd', [lsp_settings#exec_path('basedpyright-langserver')]+lsp_settings#get('basedpyright-langserver', 'args', ['--stdio']))},
\ 'root_uri':{server_info->lsp_settings#get('basedpyright-langserver', 'root_uri', lsp_settings#root_uri('basedpyright-langserver'))},
\ 'initialization_options': lsp_settings#get('basedpyright-langserver', 'initialization_options', v:null),
\ 'allowlist': lsp_settings#get('basedpyright-langserver', 'allowlist', ['python']),
\ 'blocklist': lsp_settings#get('basedpyright-langserver', 'blocklist', []),
\ 'config': lsp_settings#get('basedpyright-langserver', 'config', lsp_settings#server_config('basedpyright-langserver')),
\ 'workspace_config': lsp_settings#get('basedpyright-langserver', 'workspace_config', {
\ 'python': {
\ 'analysis': {
\ 'useLibraryCodeForTypes': v:true
\ },
\ },
\ }),
\ 'semantic_highlight': lsp_settings#get('basedpyright-langserver', 'semantic_highlight', {}),
\ }
augroup END