mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-02-24 20:38:47 +00:00
Compare commits
No commits in common. "25989fd71a69e977c558cc81860022cf037296d1" and "2cc6d4a8e556e309837ceb69bccd3f008ee4f332" have entirely different histories.
25989fd71a
...
2cc6d4a8e5
1 changed files with 17 additions and 13 deletions
|
@ -4,7 +4,7 @@
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (lib.options) mkEnableOption mkOption literalExpression;
|
inherit (lib.options) mkEnableOption mkOption;
|
||||||
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;
|
||||||
|
@ -15,6 +15,21 @@
|
||||||
|
|
||||||
cfg = config.vim.languages.kotlin;
|
cfg = config.vim.languages.kotlin;
|
||||||
|
|
||||||
|
# Creating a version of the LSP with access to the kotlin binary.
|
||||||
|
# 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
|
||||||
|
];
|
||||||
|
buildInputs = [pkgs.makeWrapper];
|
||||||
|
postBuild = ''
|
||||||
|
wrapProgram $out/bin/kotlin-language-server \
|
||||||
|
--prefix PATH : ${pkgs.lib.makeBinPath [pkgs.kotlin]}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
defaultDiagnosticsProvider = ["ktlint"];
|
defaultDiagnosticsProvider = ["ktlint"];
|
||||||
diagnosticsProviders = {
|
diagnosticsProviders = {
|
||||||
ktlint = {
|
ktlint = {
|
||||||
|
@ -44,18 +59,7 @@ 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;
|
||||||
example = literalExpression ''
|
default = kotlinLspWithRuntime;
|
||||||
pkgs.symlinkJoin {
|
|
||||||
name = "kotlin-language-server-wrapped";
|
|
||||||
paths = [pkgs.kotlin-language-server];
|
|
||||||
nativeBuildInputs = [pkgs.makeWrapper];
|
|
||||||
postBuild = '''
|
|
||||||
wrapProgram $out/bin/kotlin-language-server \
|
|
||||||
--prefix PATH : ''${pkgs.kotlin}/bin
|
|
||||||
''';
|
|
||||||
};
|
|
||||||
'';
|
|
||||||
default = pkgs.kotlin-language-server;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue