{"id":13496177,"url":"https://github.com/kabouzeid/nvim-lspinstall","last_synced_at":"2025-03-28T18:31:42.935Z","repository":{"id":46563167,"uuid":"349555101","full_name":"kabouzeid/nvim-lspinstall","owner":"kabouzeid","description":"Provides the missing :LspInstall for nvim-lspconfig","archived":true,"fork":false,"pushed_at":"2021-10-20T14:09:52.000Z","size":288,"stargazers_count":525,"open_issues_count":59,"forks_count":64,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-03-25T03:58:35.490Z","etag":null,"topics":["lua","neovim","neovim-lsp","neovim-lua","neovim-plugin"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kabouzeid.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-03-19T21:05:10.000Z","updated_at":"2025-03-17T22:27:32.000Z","dependencies_parsed_at":"2022-09-13T20:11:32.856Z","dependency_job_id":null,"html_url":"https://github.com/kabouzeid/nvim-lspinstall","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kabouzeid%2Fnvim-lspinstall","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kabouzeid%2Fnvim-lspinstall/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kabouzeid%2Fnvim-lspinstall/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kabouzeid%2Fnvim-lspinstall/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kabouzeid","download_url":"https://codeload.github.com/kabouzeid/nvim-lspinstall/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246080613,"owners_count":20720560,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["lua","neovim","neovim-lsp","neovim-lua","neovim-plugin"],"created_at":"2024-07-31T19:01:43.418Z","updated_at":"2025-03-28T18:31:42.541Z","avatar_url":"https://github.com/kabouzeid.png","language":"Lua","funding_links":[],"categories":["Lua"],"sub_categories":[],"readme":"\u003e :warning: I don't have time to maintain this repository anymore. Please use https://github.com/williamboman/nvim-lsp-installer instead, it does the same thing but better.\n\n![logo](/logo.png)\n\n## About\n\nThis is a very lightweight companion plugin for [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig).\nIt adds the missing `:LspInstall \u003clanguage\u003e` command to conveniently install language servers.\n\nThe language servers are installed *locally* into `stdpath(\"data\")`, you can use `:echo stdpath(\"data\")` to find out which directory that is on your machine.\n\n[Isn't this something I should use my system's package manager for?](https://ka.codes/posts/nvim-lspinstall#nvim-lspinstall)\n\n## Installation\nVia [Vim-Plug](https://github.com/junegunn/vim-plug)\n\n```vim\nPlug 'neovim/nvim-lspconfig'\nPlug 'kabouzeid/nvim-lspinstall'\n```\nThe following is a good starting point to integrate with [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig).\n```lua\nrequire'lspinstall'.setup() -- important\n\nlocal servers = require'lspinstall'.installed_servers()\nfor _, server in pairs(servers) do\n  require'lspconfig'[server].setup{}\nend\n```\nFor a complete example you might refer to my personal configuration in the [Wiki](https://github.com/kabouzeid/nvim-lspinstall/wiki).\n\n\n## Usage\n* `:LspInstall \u003clanguage\u003e` to install/update the language server for `\u003clanguage\u003e` (e.g. `:LspInstall python`).\n* `:LspUninstall \u003clanguage\u003e` to uninstall the language server for `\u003clanguage\u003e`.\n* `require'lspinstall'.setup()` to make configs of installed servers available for `require'lspconfig'.\u003cserver\u003e.setup{}`.\n\n\n## Advanced Configuration (recommended)\n\nA configuration like this automatically reloads the installed servers after installing a language server via `:LspInstall` such that we don't have to restart neovim.\n\n```lua\nlocal function setup_servers()\n  require'lspinstall'.setup()\n  local servers = require'lspinstall'.installed_servers()\n  for _, server in pairs(servers) do\n    require'lspconfig'[server].setup{}\n  end\nend\n\nsetup_servers()\n\n-- Automatically reload after `:LspInstall \u003cserver\u003e` so we don't have to restart neovim\nrequire'lspinstall'.post_install_hook = function ()\n  setup_servers() -- reload installed servers\n  vim.cmd(\"bufdo e\") -- this triggers the FileType autocmd that starts the server\nend\n```\n\n## Bundled Installers\n\n| Language    | Language Server                                                             |\n|-------------|-----------------------------------------------------------------------------|\n| angular     | Angular Language Service                                                    |\n| bash        | bash-language-server                                                        |\n| clojure     | clojure-lsp                                                                 |\n| cmake       | cmake-language-server                                                       |\n| cpp         | clangd                                                                      |\n| csharp      | OmniSharp                                                                   |\n| css         | css-language-features (pulled directly from the latest VSCode release)      |\n| dockerfile  | docker-langserver                                                           |\n| elixir      | Elixir Language Server (elixir-ls)                                          |\n| elm         | Elm Language Server (elm-ls)                                                |\n| ember       | Ember Language Server                                                       |\n| fortran     | Fortran Language Server (fortls)                                            |\n| go          | gopls                                                                       |\n| graphql     | GraphQL language service                                                    |\n| haskell     | haskell-language-server                                                     |\n| html        | html-language-features (pulled directly from the latest VSCode release)     |\n| java        | Eclipse JDTLS with Lombok                                                   |\n| json        | json-language-features (pulled directly from the latest VSCode release)     |\n| kotlin      | kotlin-language-server                                                      |\n| latex       | texlab                                                                      |\n| lua         | (sumneko) lua-language-server                                               |\n| php         | intelephense                                                                |\n| prisma      | prisma-language-server                                                      |\n| puppet      | puppet-editor-services                                                      |\n| purescript  | purescript-language-server                                                  |\n| python      | pyright-langserver                                                          |\n| ruby        | solargraph                                                                  |\n| rust        | rust-analyzer                                                               |\n| svelte      | svelte-language-server                                                      |\n| tailwindcss | tailwindcss-intellisense (pulled directly from the latest VSCode extension) |\n| terraform   | Terraform Language Server (terraform-ls)                                    |\n| typescript  | typescript-language-server                                                  |\n| vim         | vim-language-server                                                         |\n| vue         | vls (vetur)                                                                 |\n| yaml        | yaml-language-server                                                        |\n| zig         | zls                                                                         |\n\n| Name        | Description                                                                 |\n|-------------|-----------------------------------------------------------------------------|\n| deno        | https://deno.land/                                                          |\n| diagnosticls| https://github.com/iamcco/diagnostic-languageserver                         |\n| efm         | https://github.com/mattn/efm-langserver                                     |\n| rome        | https://rome.tools/                                                         |\n\nNote: css, json and html language servers are pulled directly from the latest VSCode release, instead of using the outdated versions provided by e.g. `npm install vscode-html-languageserver-bin`.\n\n\n## Custom Installer\n\nUse `require'lspinstall/servers'.\u003clang\u003e = config` to register a config with an installer.\nHere `config` is a LSP config for [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig), the only difference is that there are two additional keys `install_script` and `uninstall_script` which contain shell scripts to install/uninstall the language server.\n\nThe following example provides an installer for `bash-language-server`.\n```lua\n-- 1. get the default config from nvim-lspconfig\nlocal config = require\"lspinstall/util\".extract_config(\"bashls\")\n-- 2. update the cmd. relative paths are allowed, lspinstall automatically adjusts the cmd and cmd_cwd for us!\nconfig.default_config.cmd[1] = \"./node_modules/.bin/bash-language-server\"\n\n-- 3. extend the config with an install_script and (optionally) uninstall_script\nrequire'lspinstall/servers'.bash = vim.tbl_extend('error', config, {\n  -- lspinstall will automatically create/delete the install directory for every server\n  install_script = [[\n  ! test -f package.json \u0026\u0026 npm init -y --scope=lspinstall || true\n  npm install bash-language-server@latest\n  ]],\n  uninstall_script = nil -- can be omitted\n})\n```\n\nMake sure to do this before you call `require'lspinstall'.setup()`.\n\nNote: **don't** replace the `/` with a `.` in the `require` calls above ([see here if you're interested why](https://github.com/kabouzeid/nvim-lspinstall/issues/14)).\n\n\n## Lua API\n\n* `require'lspinstall'.setup()`\n\n* `require'lspinstall'.installed_servers()`\n\n* `require'lspinstall'.install_server(\u003clang\u003e)`\n* `require'lspinstall'.post_install_hook`\n\n* `require'lspinstall'.uninstall_server(\u003clang\u003e)`\n* `require'lspinstall'.post_uninstall_hook`\n\n* `require'lspinstall/servers'`\n\n* `require'lspinstall/util'.extract_config(\u003clspconfig-name\u003e)`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkabouzeid%2Fnvim-lspinstall","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkabouzeid%2Fnvim-lspinstall","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkabouzeid%2Fnvim-lspinstall/lists"}