add groovylsp
This commit is contained in:
1
.gitingore
Normal file
1
.gitingore
Normal file
@@ -0,0 +1 @@
|
|||||||
|
result
|
||||||
75
flake.lock
generated
75
flake.lock
generated
@@ -5,11 +5,11 @@
|
|||||||
"systems": "systems"
|
"systems": "systems"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1681202837,
|
"lastModified": 1685518550,
|
||||||
"narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=",
|
"narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "flake-utils",
|
"repo": "flake-utils",
|
||||||
"rev": "cfacdce06f30d2b68473a46042957675eebb3401",
|
"rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -36,10 +36,30 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"flake-utils_3": {
|
||||||
|
"inputs": {
|
||||||
|
"systems": "systems_3"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1685518550,
|
||||||
|
"narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"groovyls": {
|
"groovyls": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils_2",
|
"flake-utils": "flake-utils_2",
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1686055585,
|
"lastModified": 1686055585,
|
||||||
@@ -57,11 +77,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1686043861,
|
"lastModified": 1686059680,
|
||||||
"narHash": "sha256-duF1U12b7vVkf2Lt6noPYVeW8dVFw4CwJmQivhyZxYQ=",
|
"narHash": "sha256-sp0WlCIeVczzB0G8f8iyRg3IYW7KG31mI66z7HIZwrI=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "96f8f4a038a190f7511da79ef7e77bec5e4b811a",
|
"rev": "a558f7ac29f50c4b937fb5c102f587678ae1c9fb",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -71,19 +91,24 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"npm-groovy-lint": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-utils": "flake-utils_3",
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1685539144,
|
"lastModified": 1686066760,
|
||||||
"narHash": "sha256-BvIghafqDrQqWSbnWuDVLD6fiPWRE/foLWSupFM+Hho=",
|
"narHash": "sha256-RLx3ptgTvSdukaGNaaYZ7qnLja4kpErkllzY8Lpxdew=",
|
||||||
"owner": "nixos",
|
"owner": "miknikif",
|
||||||
"repo": "nixpkgs",
|
"repo": "npm-groovy-lint",
|
||||||
"rev": "afc48694f2aca366710295f027a4a423f3f339cc",
|
"rev": "91e13f33a9815a827dfe26f2ec0bf15c157470ae",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nixos",
|
"owner": "miknikif",
|
||||||
"ref": "release-23.05",
|
"repo": "npm-groovy-lint",
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -91,7 +116,8 @@
|
|||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils",
|
"flake-utils": "flake-utils",
|
||||||
"groovyls": "groovyls",
|
"groovyls": "groovyls",
|
||||||
"nixpkgs": "nixpkgs_2"
|
"nixpkgs": "nixpkgs",
|
||||||
|
"npm-groovy-lint": "npm-groovy-lint"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"systems": {
|
"systems": {
|
||||||
@@ -123,6 +149,21 @@
|
|||||||
"repo": "default",
|
"repo": "default",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"systems_3": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": "root",
|
"root": "root",
|
||||||
|
|||||||
@@ -4,12 +4,16 @@
|
|||||||
nixpkgs.url = "github:nixos/nixpkgs/release-23.05";
|
nixpkgs.url = "github:nixos/nixpkgs/release-23.05";
|
||||||
flake-utils.url = "github:numtide/flake-utils";
|
flake-utils.url = "github:numtide/flake-utils";
|
||||||
groovyls.url = "github:miknikif/groovyls";
|
groovyls.url = "github:miknikif/groovyls";
|
||||||
|
groovyls.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
npm-groovy-lint.url = "github:miknikif/npm-groovy-lint";
|
||||||
|
npm-groovy-lint.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
outputs = inputs @ {
|
outputs = inputs @ {
|
||||||
self,
|
self,
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
flake-utils,
|
flake-utils,
|
||||||
groovyls,
|
groovyls,
|
||||||
|
npm-groovy-lint,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
flake-utils.lib.eachDefaultSystem (system: let
|
flake-utils.lib.eachDefaultSystem (system: let
|
||||||
@@ -53,13 +57,14 @@
|
|||||||
nodePackages.prettier # ditto
|
nodePackages.prettier # ditto
|
||||||
nodePackages.bash-language-server # bash lsp
|
nodePackages.bash-language-server # bash lsp
|
||||||
nodePackages.vscode-json-languageserver # json lsp
|
nodePackages.vscode-json-languageserver # json lsp
|
||||||
|
pkgs.npm-groovy-lint # groovy lsp
|
||||||
python310Packages.python-lsp-server # todo: is specifying 310 an issue?
|
python310Packages.python-lsp-server # todo: is specifying 310 an issue?
|
||||||
alejandra # nix formatter alternative
|
alejandra # nix formatter alternative
|
||||||
statix # linter for nix
|
statix # linter for nix
|
||||||
vale # linter for prose
|
vale # linter for prose
|
||||||
jdk # for groovy
|
jdk # for groovy
|
||||||
groovy
|
groovy
|
||||||
groovyls # groovy lsp
|
pkgs.groovyls # groovy lsp
|
||||||
];
|
];
|
||||||
neovim-augmented = recursiveMerge [
|
neovim-augmented = recursiveMerge [
|
||||||
pkgs.neovim-unwrapped
|
pkgs.neovim-unwrapped
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
overlays = [
|
overlays = [
|
||||||
(final: prev: {
|
(final: prev: {
|
||||||
inherit (inputs.groovyls.packages.${final.system}) groovyls;
|
inherit (inputs.groovyls.packages.${final.system}) groovyls;
|
||||||
|
inherit (inputs.npm-groovy-lint.packages.${final.system}) npm-groovy-lint;
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -235,8 +235,9 @@ M.diagnostics = function(groovyls_cmd)
|
|||||||
debug = false,
|
debug = false,
|
||||||
sources = {
|
sources = {
|
||||||
-- formatting.lua_format,
|
-- formatting.lua_format,
|
||||||
formatting.alejandra, -- for nix
|
formatting.alejandra, -- for nix
|
||||||
formatting.prismaFmt, -- for node prisma db orm
|
formatting.prismaFmt, -- for node prisma db orm
|
||||||
|
formatting.npm_groovy_lint, -- groovy lsp
|
||||||
formatting.prettier.with {
|
formatting.prettier.with {
|
||||||
|
|
||||||
-- extra_args = {
|
-- extra_args = {
|
||||||
@@ -259,7 +260,7 @@ M.diagnostics = function(groovyls_cmd)
|
|||||||
diagnostics.statix, -- for nix
|
diagnostics.statix, -- for nix
|
||||||
null_ls.builtins.hover.dictionary, codeactions.shellcheck,
|
null_ls.builtins.hover.dictionary, codeactions.shellcheck,
|
||||||
diagnostics.shellcheck,
|
diagnostics.shellcheck,
|
||||||
diagnostics.npm_groovy_lint
|
diagnostics.npm_groovy_lint -- groovy lsp
|
||||||
-- removed formatting.rustfmt since rust_analyzer seems to do the same thing
|
-- removed formatting.rustfmt since rust_analyzer seems to do the same thing
|
||||||
},
|
},
|
||||||
on_attach = attached
|
on_attach = attached
|
||||||
|
|||||||
Reference in New Issue
Block a user