Skip to content

Commit 7eebc42

Browse files
oliverhrmattn
authored andcommitted
1 parent 6fcffcf commit 7eebc42

File tree

6 files changed

+46
-1
lines changed

6 files changed

+46
-1
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ You can change the directory to install servers by set `g:lsp_settings_servers_d
156156
| Python | pylyzer | Yes | Yes |
157157
| Python | ruff | Yes | Yes |
158158
| Python | ruff-lsp | Yes | Yes |
159+
| Python | ty | Yes | Yes |
159160
| Prisma | prisma-language-server | Yes | Yes |
160161
| Qml | qmlls | Yes | Yes |
161162
| R | languageserver | Yes | No |
@@ -437,7 +438,7 @@ directories from the qt install root.
437438
\}
438439
439440
By default, the qmlls server will search the QML_IMPORT PATH (-E option).
440-
```
441+
```
441442

442443
### [rubocop lsp mode (Ruby)](https://docs.rubocop.org/rubocop/usage/lsp.html)
443444

data/catalog.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4951,6 +4951,12 @@
49514951
"fileMatch": ["tusk.yml", "tusk.yaml"],
49524952
"url": "https://raw.githubusercontent.com/rliebz/tusk/main/tusk.schema.json"
49534953
},
4954+
{
4955+
"name": "Ty",
4956+
"description": "Ty, An extremely fast Python type checker and language server.",
4957+
"fileMatch": ["ty.toml", ".ty.toml"],
4958+
"url": "https://json.schemastore.org/ty.json"
4959+
},
49544960
{
49554961
"name": "typewiz.json",
49564962
"description": "Typewiz configuration file",

installer/install-ty.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" ty ty

installer/install-ty.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" ty ty

settings.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1456,6 +1456,22 @@
14561456
"python3"
14571457
]
14581458
},
1459+
{
1460+
"command": "ty",
1461+
"url": "https://github.com/astral-sh/ty",
1462+
"description": "An extremely fast Python type checker and language server.",
1463+
"requires": [
1464+
"py"
1465+
]
1466+
},
1467+
{
1468+
"command": "ty",
1469+
"url": "https://github.com/astral-sh/ty",
1470+
"description": "An extremely fast Python type checker and language server.",
1471+
"requires": [
1472+
"python3"
1473+
]
1474+
},
14591475
{
14601476
"command": "ruff-lsp",
14611477
"url": "https://github.com/charliermarsh/ruff-lsp",

settings/ty.vim

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

0 commit comments

Comments
 (0)