Upstream robot lsp

This commit is contained in:
Zoe Roux
2022-05-01 22:27:44 +02:00
parent 43a4b002a7
commit 8e0515a284
6 changed files with 12 additions and 42 deletions

View File

@@ -1,7 +1,3 @@
vim.g["dispatch_no_maps"] = 1
local wk = require("which-key")
wk.register({
m = {

View File

@@ -3,5 +3,4 @@ require("lsp.handlers").setup()
require "lsp.cmp"
require "lsp.signature"
require "lsp.metals"
require "lsp.servers"

View File

@@ -38,6 +38,15 @@ local server_settings = {
},
},
},
robotframework_ls = {
settings = {
robot = {
variables = {
RESOURCES = vim.fn.getcwd() .. "/tests/robot/",
},
},
}
},
}
lsp_installer.settings({

View File

@@ -1 +0,0 @@
require "lsp.servers.robot"

View File

@@ -1,32 +0,0 @@
local lspconfig = require "lspconfig"
local configs = require "lspconfig.configs"
local servers = require "nvim-lsp-installer.servers"
local server = require "nvim-lsp-installer.server"
local path = require "nvim-lsp-installer.path"
local pip3 = require "nvim-lsp-installer.core.managers.pip3"
local name = "robotframework-lsp"
configs[name] = {
default_config = {
filetypes = { "robot" },
root_dir = lspconfig.util.root_pattern ".git",
},
}
vim.cmd[[au BufRead,BufNewFile *.robot setfiletype robot]]
local root_dir = server.get_server_root_path(name)
local my_server = server.Server:new {
name = name,
root_dir = root_dir,
installer = pip3.packages { "robotframework-lsp" },
languages = { "robot" },
homepage = "https://github.com/robocorp/robotframework-lsp",
async = true,
default_options = {
cmd = { path.concat { pip3.venv_path(root_dir), "robotframework_ls" } },
},
}
servers.register(my_server)

View File

@@ -80,10 +80,9 @@ return packer.startup(function(use)
end }
use {
'neovim/nvim-lspconfig',
'williamboman/nvim-lsp-installer',
}
use 'neovim/nvim-lspconfig'
-- use 'williamboman/nvim-lsp-installer'
use '~/projects/nvim-lsp-installer'
use "Hoffs/omnisharp-extended-lsp.nvim"
use({'scalameta/nvim-metals', requires = { "nvim-lua/plenary.nvim" }})
use "b0o/schemastore.nvim"