plugins/nvim-lsp: add a fallback for the lua LS package (#210)

This commit is contained in:
Gaétan Lepage 2023-02-28 15:07:24 +01:00 committed by GitHub
parent 7f23304c3d
commit 101b721f6f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -172,7 +172,12 @@ with lib; let
{
name = "lua-ls";
description = "Enable lua LS, for lua";
package = pkgs.lua-language-server;
# Use the old name of the lua LS if the user is on a stable branch of nixpkgs
# Rename occured here: https://github.com/NixOS/nixpkgs/pull/215057
package =
if (hasAttr "lua-language-server" pkgs)
then pkgs.lua-language-server
else pkgs.sumneko-lua-language-server;
serverName = "lua_ls";
# All available settings are documented here: