Browse Source

nixpkgs/neovim: use custom node-lsp package

Thomas Dy 2 years ago
parent
commit
3f931097ec

+ 2 - 0
.config/nixpkgs/neovim/flake.nix

@@ -20,6 +20,8 @@
               })
             ];
           };
+
+          node-lsp = final.callPackage ./node-lsp {};
         })];
       };
     in

+ 3 - 3
.config/nixpkgs/neovim/neovim.nix

@@ -5,7 +5,7 @@
 , neovim-unwrapped
 , fd
 , ripgrep
-, nodePackages
+, node-lsp
 , vimPlugins
 , vimUtils
 , fetchFromGitHub
@@ -40,11 +40,11 @@ let
       CompilerSet makeprg=node_modules/.bin/tsc\ --incremental\ --noEmit
     '';
   };
+
   extraPath = [
     fd
     ripgrep
-    nodePackages.typescript-language-server
-    nodePackages.eslint_d
+    node-lsp
   ];
 in
 neovim.override {

+ 12 - 0
.config/nixpkgs/neovim/node-lsp/default.nix

@@ -0,0 +1,12 @@
+{ buildNpmPackage }:
+
+buildNpmPackage {
+  pname = "node-lsp";
+  version = "0.0.0";
+
+  src = ./.;
+
+  dontNpmBuild = true;
+
+  npmDepsHash = "sha256-F8+uVtXqJjdn3d95cZuYylgKUo2qArxrL0anZMDAg1k=";
+}

+ 251 - 0
.config/nixpkgs/neovim/node-lsp/package-lock.json

@@ -0,0 +1,251 @@
+{
+  "name": "node-lsp",
+  "version": "0.0.0",
+  "lockfileVersion": 2,
+  "requires": true,
+  "packages": {
+    "": {
+      "name": "node-lsp",
+      "version": "0.0.0",
+      "dependencies": {
+        "eslint": "file:.empty",
+        "eslint_d": "^12.2.1",
+        "typescript-language-server": "^3.0.2"
+      },
+      "bin": {
+        "eslint_d": "node_modules/.bin/eslint_d",
+        "typescript-language-server": "node_modules/.bin/typescript-language-server"
+      }
+    },
+    ".empty": {},
+    "node_modules/core_d": {
+      "version": "5.0.1",
+      "resolved": "https://registry.npmjs.org/core_d/-/core_d-5.0.1.tgz",
+      "integrity": "sha512-37lZyhJY1hzgFbfU4LzY4zL09QPwPfV2W/3YBOtN7mkdvVaeP1OVnDZI6zxggtlPwG/BuE5wIr0xptlVJk5EPA==",
+      "dependencies": {
+        "supports-color": "^8.1.0"
+      }
+    },
+    "node_modules/deep-is": {
+      "version": "0.1.4",
+      "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz",
+      "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ=="
+    },
+    "node_modules/eslint": {
+      "resolved": ".empty",
+      "link": true
+    },
+    "node_modules/eslint_d": {
+      "version": "12.2.1",
+      "resolved": "https://registry.npmjs.org/eslint_d/-/eslint_d-12.2.1.tgz",
+      "integrity": "sha512-qOJ9cTi5AaH5bOgEoCkv41DJ637mHgzffbOLojwU4wadwC6qbR+OxVJRvVzH0v2XYmQOvw4eiJK7ivrr5SvzsA==",
+      "dependencies": {
+        "core_d": "^5.0.1",
+        "eslint": "^8.12.0",
+        "nanolru": "^1.0.0",
+        "optionator": "^0.9.1"
+      },
+      "bin": {
+        "eslint_d": "bin/eslint_d.js"
+      }
+    },
+    "node_modules/fast-levenshtein": {
+      "version": "2.0.6",
+      "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz",
+      "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw=="
+    },
+    "node_modules/has-flag": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+      "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+      "engines": {
+        "node": ">=8"
+      }
+    },
+    "node_modules/levn": {
+      "version": "0.4.1",
+      "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz",
+      "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==",
+      "dependencies": {
+        "prelude-ls": "^1.2.1",
+        "type-check": "~0.4.0"
+      },
+      "engines": {
+        "node": ">= 0.8.0"
+      }
+    },
+    "node_modules/nanolru": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/nanolru/-/nanolru-1.0.0.tgz",
+      "integrity": "sha512-GyQkE8M32pULhQk7Sko5raoIbPalAk90ICG+An4fq6fCsFHsP6fB2K46WGXVdoJpy4SGMnZ/EKbo123fZJomWg==",
+      "engines": {
+        "node": ">= 0.4.0"
+      }
+    },
+    "node_modules/optionator": {
+      "version": "0.9.1",
+      "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz",
+      "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==",
+      "dependencies": {
+        "deep-is": "^0.1.3",
+        "fast-levenshtein": "^2.0.6",
+        "levn": "^0.4.1",
+        "prelude-ls": "^1.2.1",
+        "type-check": "^0.4.0",
+        "word-wrap": "^1.2.3"
+      },
+      "engines": {
+        "node": ">= 0.8.0"
+      }
+    },
+    "node_modules/prelude-ls": {
+      "version": "1.2.1",
+      "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz",
+      "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==",
+      "engines": {
+        "node": ">= 0.8.0"
+      }
+    },
+    "node_modules/supports-color": {
+      "version": "8.1.1",
+      "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz",
+      "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==",
+      "dependencies": {
+        "has-flag": "^4.0.0"
+      },
+      "engines": {
+        "node": ">=10"
+      },
+      "funding": {
+        "url": "https://github.com/chalk/supports-color?sponsor=1"
+      }
+    },
+    "node_modules/type-check": {
+      "version": "0.4.0",
+      "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz",
+      "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==",
+      "dependencies": {
+        "prelude-ls": "^1.2.1"
+      },
+      "engines": {
+        "node": ">= 0.8.0"
+      }
+    },
+    "node_modules/typescript-language-server": {
+      "version": "3.0.2",
+      "resolved": "https://registry.npmjs.org/typescript-language-server/-/typescript-language-server-3.0.2.tgz",
+      "integrity": "sha512-KJ5kdKzdlNO0mfHbnb9nDKiL244fEd/fqW+b8trVchaLcCFo1aAd0sGX/vP563tdstBew/P1TzKLTnYa17/b8A==",
+      "bin": {
+        "typescript-language-server": "lib/cli.mjs"
+      },
+      "engines": {
+        "node": ">=14.17"
+      }
+    },
+    "node_modules/word-wrap": {
+      "version": "1.2.3",
+      "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz",
+      "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==",
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    }
+  },
+  "dependencies": {
+    "core_d": {
+      "version": "5.0.1",
+      "resolved": "https://registry.npmjs.org/core_d/-/core_d-5.0.1.tgz",
+      "integrity": "sha512-37lZyhJY1hzgFbfU4LzY4zL09QPwPfV2W/3YBOtN7mkdvVaeP1OVnDZI6zxggtlPwG/BuE5wIr0xptlVJk5EPA==",
+      "requires": {
+        "supports-color": "^8.1.0"
+      }
+    },
+    "deep-is": {
+      "version": "0.1.4",
+      "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz",
+      "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ=="
+    },
+    "eslint": {
+      "version": "file:.empty"
+    },
+    "eslint_d": {
+      "version": "12.2.1",
+      "resolved": "https://registry.npmjs.org/eslint_d/-/eslint_d-12.2.1.tgz",
+      "integrity": "sha512-qOJ9cTi5AaH5bOgEoCkv41DJ637mHgzffbOLojwU4wadwC6qbR+OxVJRvVzH0v2XYmQOvw4eiJK7ivrr5SvzsA==",
+      "requires": {
+        "core_d": "^5.0.1",
+        "eslint": "file:.empty",
+        "nanolru": "^1.0.0",
+        "optionator": "^0.9.1"
+      }
+    },
+    "fast-levenshtein": {
+      "version": "2.0.6",
+      "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz",
+      "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw=="
+    },
+    "has-flag": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+      "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="
+    },
+    "levn": {
+      "version": "0.4.1",
+      "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz",
+      "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==",
+      "requires": {
+        "prelude-ls": "^1.2.1",
+        "type-check": "~0.4.0"
+      }
+    },
+    "nanolru": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/nanolru/-/nanolru-1.0.0.tgz",
+      "integrity": "sha512-GyQkE8M32pULhQk7Sko5raoIbPalAk90ICG+An4fq6fCsFHsP6fB2K46WGXVdoJpy4SGMnZ/EKbo123fZJomWg=="
+    },
+    "optionator": {
+      "version": "0.9.1",
+      "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz",
+      "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==",
+      "requires": {
+        "deep-is": "^0.1.3",
+        "fast-levenshtein": "^2.0.6",
+        "levn": "^0.4.1",
+        "prelude-ls": "^1.2.1",
+        "type-check": "^0.4.0",
+        "word-wrap": "^1.2.3"
+      }
+    },
+    "prelude-ls": {
+      "version": "1.2.1",
+      "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz",
+      "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g=="
+    },
+    "supports-color": {
+      "version": "8.1.1",
+      "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz",
+      "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==",
+      "requires": {
+        "has-flag": "^4.0.0"
+      }
+    },
+    "type-check": {
+      "version": "0.4.0",
+      "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz",
+      "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==",
+      "requires": {
+        "prelude-ls": "^1.2.1"
+      }
+    },
+    "typescript-language-server": {
+      "version": "3.0.2",
+      "resolved": "https://registry.npmjs.org/typescript-language-server/-/typescript-language-server-3.0.2.tgz",
+      "integrity": "sha512-KJ5kdKzdlNO0mfHbnb9nDKiL244fEd/fqW+b8trVchaLcCFo1aAd0sGX/vP563tdstBew/P1TzKLTnYa17/b8A=="
+    },
+    "word-wrap": {
+      "version": "1.2.3",
+      "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz",
+      "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ=="
+    }
+  }
+}

+ 18 - 0
.config/nixpkgs/neovim/node-lsp/package.json

@@ -0,0 +1,18 @@
+{
+  "name": "node-lsp",
+  "version": "0.0.0",
+  "dependencies": {
+    "eslint": "file:.empty",
+    "eslint_d": "^12.2.1",
+    "typescript-language-server": "^3.0.2"
+  },
+  "overrides": {
+    "eslint_d": {
+      "eslint": "$eslint"
+    }
+  },
+  "bin": {
+    "typescript-language-server": "./node_modules/.bin/typescript-language-server",
+    "eslint_d": "./node_modules/.bin/eslint_d"
+  }
+}