mirror of
https://github.com/mattn/vim-lsp-settings.git
synced 2025-12-12 20:35:54 +01:00
Add ruff server
This commit is contained in:
@@ -153,6 +153,7 @@ You can change the directory to install servers by set `g:lsp_settings_servers_d
|
||||
| Python | pylsp-all (pylsp with dependencies) | Yes | Yes |
|
||||
| Python | pylsp (pylsp without dependencies) | Yes | Yes |
|
||||
| Python | pylyzer | Yes | Yes |
|
||||
| Python | ruff | Yes | Yes |
|
||||
| Python | ruff-lsp | Yes | Yes |
|
||||
| Prisma | prisma-language-server | Yes | Yes |
|
||||
| R | languageserver | Yes | No |
|
||||
|
||||
3
installer/install-ruff.cmd
Normal file
3
installer/install-ruff.cmd
Normal file
@@ -0,0 +1,3 @@
|
||||
@echo off
|
||||
|
||||
call "%~dp0\pip_install.cmd" ruff ruff
|
||||
5
installer/install-ruff.sh
Executable file
5
installer/install-ruff.sh
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
"$(dirname "$0")/pip_install.sh" ruff ruff
|
||||
@@ -1386,6 +1386,22 @@
|
||||
"python3"
|
||||
]
|
||||
},
|
||||
{
|
||||
"command": "ruff",
|
||||
"url": "https://github.com/astral-sh/ruff",
|
||||
"description": "A language server written in Rust and built into Ruff.",
|
||||
"requires": [
|
||||
"py"
|
||||
]
|
||||
},
|
||||
{
|
||||
"command": "ruff",
|
||||
"url": "https://github.com/astral-sh/ruff",
|
||||
"description": "A language server written in Rust and built into Ruff.",
|
||||
"requires": [
|
||||
"python3"
|
||||
]
|
||||
},
|
||||
{
|
||||
"command": "ruff-lsp",
|
||||
"url": "https://github.com/charliermarsh/ruff-lsp",
|
||||
|
||||
14
settings/ruff.vim
Normal file
14
settings/ruff.vim
Normal file
@@ -0,0 +1,14 @@
|
||||
augroup vim_lsp_settings_ruff
|
||||
au!
|
||||
LspRegisterServer {
|
||||
\ 'name': 'ruff',
|
||||
\ 'cmd': {server_info->lsp_settings#get('ruff', 'cmd', [lsp_settings#exec_path('ruff')]+lsp_settings#get('ruff', 'args', ['server']))},
|
||||
\ 'root_uri':{server_info->lsp_settings#get('ruff', 'root_uri', lsp_settings#root_uri('ruff'))},
|
||||
\ 'initialization_options': lsp_settings#get('ruff', 'initialization_options', v:null),
|
||||
\ 'allowlist': lsp_settings#get('ruff', 'allowlist', ['python']),
|
||||
\ 'blocklist': lsp_settings#get('ruff', 'blocklist', []),
|
||||
\ 'config': lsp_settings#get('ruff', 'config', lsp_settings#server_config('ruff')),
|
||||
\ 'workspace_config': lsp_settings#get('ruff', 'workspace_config', {}),
|
||||
\ 'semantic_highlight': lsp_settings#get('ruff', 'semantic_highlight', {}),
|
||||
\ }
|
||||
augroup END
|
||||
Reference in New Issue
Block a user