~wldhx/plfa

f3974aa8baea3869e1e36224eb313268d2ef989d — wldhx 2 years ago 6fcf3dc
Add ALS
3 files changed, 34 insertions(+), 0 deletions(-)

M README.md
A agda-language-server.nix
M shell.nix
M README.md => README.md +1 -0
@@ 13,6 13,7 @@ curl -L https://nixos.org/nix/install | sh
git clone --recurse-submodules https://git.sr.ht/~wldhx/plfa
VSCode, install extensions:
  - https://marketplace.visualstudio.com/items?itemName=banacorn.agda-mode
    - settings: connect to ALS [x]
  - https://marketplace.visualstudio.com/items?itemName=arrterian.nix-env-selector
VSCode:
  - Open folder "plfa"

A agda-language-server.nix => agda-language-server.nix +32 -0
@@ 0,0 1,32 @@
{ mkDerivation, aeson, Agda, base, bytestring, containers, fetchgit
, hpack, lib, lsp, mtl, network, network-simple, process, stm
, strict, text
}:
mkDerivation {
  pname = "agda-language-server";
  version = "0.0.1.0";
  src = fetchgit {
    url = "https://github.com/banacorn/agda-language-server";
    sha256 = "0685dw1672byjffbk71xfbm5pflwvyn7zfsg4qbfwxfq289qqhdf";
    rev = "de1a602e6fd7948939ef0a3d2658ef764acf5250";
    fetchSubmodules = true;
  };
  isLibrary = true;
  isExecutable = true;
  libraryHaskellDepends = [
    aeson Agda base bytestring containers lsp mtl network
    network-simple process stm strict text
  ];
  libraryToolDepends = [ hpack ];
  executableHaskellDepends = [
    aeson Agda base bytestring containers lsp mtl network
    network-simple process stm strict text
  ];
  testHaskellDepends = [
    aeson Agda base bytestring containers lsp mtl network
    network-simple process stm strict text
  ];
  prePatch = "hpack";
  homepage = "https://github.com/banacorn/agda-language-server#readme";
  license = lib.licenses.mit;
}

M shell.nix => shell.nix +1 -0
@@ 5,6 5,7 @@ nixpkgs.mkShell {
  nativeBuildInputs =
    (with nixpkgs; [
      agda
      (haskellPackages.callPackage ./agda-language-server.nix {})
    ]);
  AGDA_DIR = toString ./.;
  shellHook = ''