diff options
| author | Igor Lacerda <84649544+igorlfs@users.noreply.github.com> | 2022-12-20 22:27:38 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-12-21 09:27:38 +0800 |
| commit | 4e13145980526a0296cde2d98cff6e898b1f2fad (patch) | |
| tree | 51198278b33220398806e7f596182b6ab25fb17a /lua/lspconfig | |
| parent | fix: send the lsp method request after insert workspace folders (#2330) (diff) | |
| download | nvim-lspconfig-4e13145980526a0296cde2d98cff6e898b1f2fad.tar nvim-lspconfig-4e13145980526a0296cde2d98cff6e898b1f2fad.tar.gz nvim-lspconfig-4e13145980526a0296cde2d98cff6e898b1f2fad.tar.bz2 nvim-lspconfig-4e13145980526a0296cde2d98cff6e898b1f2fad.tar.lz nvim-lspconfig-4e13145980526a0296cde2d98cff6e898b1f2fad.tar.xz nvim-lspconfig-4e13145980526a0296cde2d98cff6e898b1f2fad.tar.zst nvim-lspconfig-4e13145980526a0296cde2d98cff6e898b1f2fad.zip | |
feat: add ruff-lsp support (#2335)
Diffstat (limited to 'lua/lspconfig')
| -rw-r--r-- | lua/lspconfig/server_configurations/ruff-lsp.lua | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/lua/lspconfig/server_configurations/ruff-lsp.lua b/lua/lspconfig/server_configurations/ruff-lsp.lua new file mode 100644 index 00000000..f2bfc3b0 --- /dev/null +++ b/lua/lspconfig/server_configurations/ruff-lsp.lua @@ -0,0 +1,40 @@ +local util = require 'lspconfig.util' + +local root_files = { + 'pyproject.toml', +} + +return { + default_config = { + cmd = { 'ruff-lsp' }, + filetypes = { 'python' }, + root_dir = util.root_pattern(unpack(root_files)) or util.find_git_ancestor(), + single_file_support = true, + settings = {}, + }, + docs = { + description = [[ +https://github.com/charliermarsh/ruff-lsp + +A Language Server Protocol implementation for Ruff, an extremely fast Python linter and code transformation tool, written in Rust. It can be installed via pip + +```sh +pip install ruff-lsp +``` + +Extra CLI arguments for `ruff` can be provided via + +```lua +require'lspconfig'.ruff_lsp.setup{ + settings = { + ruff_lsp = { + -- Any extra CLI arguments for `ruff` go here. + args = {}, + } + } +} +``` + + ]], + }, +} |
