mirror of
https://github.com/LunarVim/LunarVim.git
synced 2025-08-30 14:49:43 +02:00
updates for lspinstall
This commit is contained in:
parent
7367ca68b7
commit
0a26f3731e
3 changed files with 19 additions and 2 deletions
2
init.lua
2
init.lua
|
@ -32,6 +32,7 @@ require('nv-dashboard')
|
||||||
require('nv-dial')
|
require('nv-dial')
|
||||||
require('nv-nvim-dap')
|
require('nv-nvim-dap')
|
||||||
require('nv-lightbulb')
|
require('nv-lightbulb')
|
||||||
|
-- require('nv-lspinstall')
|
||||||
|
|
||||||
-- Which Key (Hope to replace with Lua plugin someday)
|
-- Which Key (Hope to replace with Lua plugin someday)
|
||||||
vim.cmd('source ~/.config/nvim/vimscript/nv-whichkey/init.vim')
|
vim.cmd('source ~/.config/nvim/vimscript/nv-whichkey/init.vim')
|
||||||
|
@ -52,4 +53,3 @@ require('lsp.docker-ls')
|
||||||
require('lsp.html-ls')
|
require('lsp.html-ls')
|
||||||
require('lsp.efm-general-ls')
|
require('lsp.efm-general-ls')
|
||||||
require('lsp.virtual_text')
|
require('lsp.virtual_text')
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
-- https://github.com/sumneko/lua-language-server/wiki/Build-and-Run-(Standalone)
|
-- https://github.com/sumneko/lua-language-server/wiki/Build-and-Run-(Standalone)
|
||||||
-- USER = vim.fn.expand('$USER')
|
|
||||||
local sumneko_root_path = DATA_PATH .. "/lspinstall/lua"
|
local sumneko_root_path = DATA_PATH .. "/lspinstall/lua"
|
||||||
local sumneko_binary = sumneko_root_path .. "/sumneko-lua-language-server"
|
local sumneko_binary = sumneko_root_path .. "/sumneko-lua-language-server"
|
||||||
|
|
||||||
|
|
18
lua/nv-lspinstall/init.lua
Normal file
18
lua/nv-lspinstall/init.lua
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
-- 1. get the config for this server from nvim-lspconfig and adjust the cmd path.
|
||||||
|
-- relative paths are allowed, lspinstall automatically adjusts the cmd and cmd_cwd for us!
|
||||||
|
local config = require'lspconfig'.jdtls.document_config
|
||||||
|
require'lspconfig/configs'.jdtls = nil -- important, unset the loaded config again
|
||||||
|
-- config.default_config.cmd[1] = "./node_modules/.bin/bash-language-server"
|
||||||
|
|
||||||
|
-- 2. extend the config with an install_script and (optionally) uninstall_script
|
||||||
|
require'lspinstall/servers'.jdtls = vim.tbl_extend('error', config, {
|
||||||
|
-- lspinstall will automatically create/delete the install directory for every server
|
||||||
|
install_script = [[
|
||||||
|
git clone https://github.com/eclipse/eclipse.jdt.ls.git
|
||||||
|
cd eclipse.jdt.ls
|
||||||
|
./mvnw clean verify
|
||||||
|
]],
|
||||||
|
uninstall_script = nil -- can be omitted
|
||||||
|
})
|
||||||
|
|
||||||
|
require'lspinstall'.setup()
|
Loading…
Add table
Add a link
Reference in a new issue