mirror of
https://github.com/neovim/nvim-lspconfig.git
synced 2026-05-05 08:36:09 +02:00
19 lines
540 B
Lua
19 lines
540 B
Lua
---@brief
|
|
---
|
|
--- https://robotcode.io
|
|
---
|
|
--- RobotCode - Language Server Protocol implementation for Robot Framework.
|
|
|
|
local venv = os.getenv('VIRTUAL_ENV')
|
|
|
|
---@type vim.lsp.Config
|
|
return {
|
|
cmd = { 'robotcode', 'language-server' },
|
|
filetypes = { 'robot', 'resource' },
|
|
root_markers = { 'robot.toml', 'pyproject.toml', 'Pipfile', '.git' },
|
|
cmd_env = venv and { PYTHONPATH = string.gsub(vim.fn.glob(venv .. '/lib/python*/site-packages'), '\n', ':') } or nil,
|
|
get_language_id = function(_, _)
|
|
return 'robotframework'
|
|
end,
|
|
}
|