mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-02-24 12:28:32 +00:00
kotlin: moved wrapper to example
This commit is contained in:
parent
8ed93fcf04
commit
f10e356ee5
1 changed files with 13 additions and 9 deletions
|
@ -4,7 +4,7 @@
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (lib.options) mkEnableOption mkOption;
|
inherit (lib.options) mkEnableOption mkOption literalExpression;
|
||||||
inherit (lib.modules) mkIf mkMerge;
|
inherit (lib.modules) mkIf mkMerge;
|
||||||
inherit (lib.meta) getExe;
|
inherit (lib.meta) getExe;
|
||||||
inherit (lib.nvim.languages) diagnosticsToLua;
|
inherit (lib.nvim.languages) diagnosticsToLua;
|
||||||
|
@ -17,13 +17,6 @@
|
||||||
|
|
||||||
# Creating a version of the LSP with access to the kotlin binary.
|
# Creating a version of the LSP with access to the kotlin binary.
|
||||||
# This is necessary for the LSP to load the standard library
|
# This is necessary for the LSP to load the standard library
|
||||||
kotlinLspWithRuntime = pkgs.symlinkJoin {
|
|
||||||
name = "kotlin-language-server-with-runtime";
|
|
||||||
paths = [
|
|
||||||
pkgs.kotlin-language-server
|
|
||||||
pkgs.kotlin
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
defaultDiagnosticsProvider = ["ktlint"];
|
defaultDiagnosticsProvider = ["ktlint"];
|
||||||
diagnosticsProviders = {
|
diagnosticsProviders = {
|
||||||
|
@ -54,7 +47,18 @@ in {
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
description = "kotlin_language_server package with Kotlin runtime";
|
description = "kotlin_language_server package with Kotlin runtime";
|
||||||
type = package;
|
type = package;
|
||||||
default = kotlinLspWithRuntime;
|
example = literalExpression ''
|
||||||
|
pkgs.symlinkJoin {
|
||||||
|
name = "Kotlin-LSP-Wrapped";
|
||||||
|
paths = [pkgs.kotlin-language-server];
|
||||||
|
nativeBuildInputs = [pkgs.makeWrapper];
|
||||||
|
postBuild = '''
|
||||||
|
wrapProgram $out/bin/kotlin-language-server \
|
||||||
|
--prefix PATH : ${pkgs.lib.makeBinPath [pkgs.kotlin]}
|
||||||
|
''';
|
||||||
|
};
|
||||||
|
'';
|
||||||
|
default = pkgs.kotlin-language-server;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue