kabouzeid / nvim-lspinstall

Provides the missing :LspInstall for nvim-lspconfig
MIT License
526 stars 67 forks source link

lazy require servers #175

Open lewis6991 opened 2 years ago

lewis6991 commented 2 years ago

PLEASE READ BEFORE CREATING THE PR :)

For new install scripts

You need to create one file, and edit two files. See this PR for a good example: https://github.com/kabouzeid/nvim-lspinstall/pull/106/files

Whenever possible, use local config = require'lspinstall/util'.extract_config('rust_analyzer') to extract the config for your language server from nvim-lspconfig. If they don't have a config for your language server yet, please create a pull request there first. Don't worry, they are usually quite fast with merging new configs.

kabouzeid commented 2 years ago

Users should still be able to set custom installers like this: https://github.com/kabouzeid/nvim-lspinstall#custom-installer

lewis6991 commented 2 years ago

No problem, we can just treat the server differently depending on whether it is a string or a table. If it's a string, treat it as a module name. If it is a table, treat it as a config.