mirror of
https://github.com/zoriya/dotfiles.git
synced 2025-12-06 06:36:17 +00:00
Upstream robot lsp
This commit is contained in:
@@ -1,7 +1,3 @@
|
||||
|
||||
vim.g["dispatch_no_maps"] = 1
|
||||
|
||||
|
||||
local wk = require("which-key")
|
||||
wk.register({
|
||||
m = {
|
||||
|
||||
@@ -3,5 +3,4 @@ require("lsp.handlers").setup()
|
||||
require "lsp.cmp"
|
||||
require "lsp.signature"
|
||||
require "lsp.metals"
|
||||
require "lsp.servers"
|
||||
|
||||
|
||||
@@ -38,6 +38,15 @@ local server_settings = {
|
||||
},
|
||||
},
|
||||
},
|
||||
robotframework_ls = {
|
||||
settings = {
|
||||
robot = {
|
||||
variables = {
|
||||
RESOURCES = vim.fn.getcwd() .. "/tests/robot/",
|
||||
},
|
||||
},
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
lsp_installer.settings({
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
require "lsp.servers.robot"
|
||||
@@ -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)
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user