The latest changes broke the possibility to inject custom installers
Closed this issue · 7 comments
Maybe there is already a new way to approach this situation but I couldn't find it out.
In particular I'm referring to this (example from the readme):
-- 1. get the default config from nvim-lspconfig
local config = require"lspinstall/util".extract_config("bashls")
-- 2. update the cmd. relative paths are allowed, lspinstall automatically adjusts the cmd and cmd_cwd for us!
config.default_config.cmd[1] = "./node_modules/.bin/bash-language-server"
-- 3. extend the config with an install_script and (optionally) uninstall_script
require'lspinstall/servers'.bash = vim.tbl_extend('error', config, {
-- lspinstall will automatically create/delete the install directory for every server
install_script = [[
! test -f package.json && npm init -y --scope=lspinstall || true
npm install bash-language-server@latest
]],
uninstall_script = nil -- can be omitted
})
The problem should be caused by the recent changes in the structure.
I tried to add an installer not present in this plugin (zls), it was previously possible but not anymore, it prints an error saying lspinstall/servers/zls doesn't exist.
I also quickly tried to override the bash one, just to test but it kept the lspinstall's script.
Yes, structure has changed. I'll fix README. Please wait a while.
Added instruction and function to register server. 2c28024
However, if you'd like to add a server, I'd be happy to have you send me a PR.
I documented new way to do it.
https://github.com/nazo6/installer.nvim#custom-modules
Awesome !!! latest update makes it an awesome plugin for Windows based nvim. ( :install tools ripgrep )
By the way, can you do something ( some script ) to install Emmet plugin for web development ?
Thank You
@barungh I can make it if you just want to install it and don't need any integrations.
That would be helpful