Add ruff-lsp

This commit is contained in:
jrjsmrtn
2023-03-17 20:35:37 +01:00
committed by mattn
parent 0d1be6f823
commit aa8a8173ee
5 changed files with 39 additions and 0 deletions

View File

@@ -144,6 +144,7 @@ You can change the directory to install servers by set `g:lsp_settings_servers_d
| Python | pyright-langserver | Yes | Yes |
| Python | pylsp-all (pylsp with dependencies) | Yes | Yes |
| Python | pylsp (pylsp without dependencies) | Yes | Yes |
| Python | ruff-lsp | Yes | Yes |
| Prisma | prisma-language-server | Yes | Yes |
| R | languageserver | Yes | No |
| Racket | racket-lsp | Yes | No |

View File

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

5
installer/install-ruff-lsp.sh Executable file
View File

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

View File

@@ -1208,6 +1208,22 @@
"requires": [
"python3"
]
},
{
"command": "ruff-lsp",
"url": "https://github.com/charliermarsh/ruff-lsp",
"description": "A Language Server Protocol implementation for Ruff.",
"requires": [
"py"
]
},
{
"command": "ruff-lsp",
"url": "https://github.com/charliermarsh/ruff-lsp",
"description": "A Language Server Protocol implementation for Ruff.",
"requires": [
"python3"
]
}
],
"r": [

14
settings/ruff-lsp.vim Normal file
View File

@@ -0,0 +1,14 @@
augroup vim_lsp_settings_ruff_lsp
au!
LspRegisterServer {
\ 'name': 'ruff-lsp',
\ 'cmd': {server_info->lsp_settings#get('ruff-lsp', 'cmd', [lsp_settings#exec_path('ruff-lsp')]+lsp_settings#get('ruff-lsp', 'args', []))},
\ 'root_uri':{server_info->lsp_settings#get('ruff-lsp', 'root_uri', lsp_settings#root_uri('ruff-lsp'))},
\ 'initialization_options': lsp_settings#get('ruff-lsp', 'initialization_options', v:null),
\ 'allowlist': lsp_settings#get('ruff-lsp', 'allowlist', ['python']),
\ 'blocklist': lsp_settings#get('ruff-lsp', 'blocklist', []),
\ 'config': lsp_settings#get('ruff-lsp', 'config', lsp_settings#server_config('ruff-lsp')),
\ 'workspace_config': lsp_settings#get('ruff-lsp', 'workspace_config', {}),
\ 'semantic_highlight': lsp_settings#get('ruff-lsp', 'semantic_highlight', {}),
\ }
augroup END