bunch of vscode changes + add luau-lsp
package
This commit is contained in:
parent
6cc838119d
commit
20f42f88d5
2 changed files with 467 additions and 415 deletions
|
@ -28,15 +28,22 @@ rec {
|
|||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
stylua
|
||||
rojo
|
||||
(pkgs.callPackage ../packages/luau-lsp.nix { inherit pkgs; })
|
||||
powershell
|
||||
ruff
|
||||
ruff-lsp
|
||||
];
|
||||
|
||||
programs.vscode = let dotnettools = import inputs.dotnettoolsVscodeExtensions {
|
||||
programs.vscode =
|
||||
let
|
||||
dotnettools = import inputs.dotnettoolsVscodeExtensions {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
}; in {
|
||||
};
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
enableUpdateCheck = false;
|
||||
enableExtensionUpdateCheck = false;
|
||||
|
@ -83,6 +90,7 @@ rec {
|
|||
patcx.vscode-nuget-gallery
|
||||
corylulu.csharp-interpolated-string-converter
|
||||
adrianwilczynski.asp-net-core-switcher
|
||||
kevin-chatham.aspnetcorerazor-html-css-class-completion
|
||||
adrianwilczynski.blazor-snippet-pack
|
||||
adrianwilczynski.csharp-to-typescript
|
||||
adrianwilczynski.namespace
|
||||
|
@ -107,10 +115,8 @@ rec {
|
|||
|
||||
# Luau
|
||||
evaera.vscode-rojo
|
||||
undermywheel.roblox-lua
|
||||
johnnymorganz.stylua
|
||||
johnnymorganz.luau-lsp
|
||||
nightrains.robloxlsp
|
||||
|
||||
# Go
|
||||
pkgs.vscode-extensions.golang.go
|
||||
|
@ -291,6 +297,7 @@ rec {
|
|||
};
|
||||
};
|
||||
"ruff.path" = [ "${pkgs.ruff}/bin/ruff" ];
|
||||
"luau-lsp.serverPath" = "${pkgs.callPackage ../packages/luau-lsp.nix { inherit pkgs; }}/bin/luau-lsp";
|
||||
"python.terminal.activateEnvironment" = false;
|
||||
"python.terminal.activateEnvInCurrentTerminal" = false;
|
||||
"[csharp]" = {
|
||||
|
@ -337,8 +344,12 @@ rec {
|
|||
"vscord.status.image.small.idle.key" = "https://vscord.catppuccin.com/mocha/idle.webp";
|
||||
"vscord.status.image.small.notInFile.key" = "https://vscord.catppuccin.com/mocha/idle.webp";
|
||||
"vscord.status.image.small.viewing.key" = "https://vscord.catppuccin.com/mocha/{app_id}.webp";
|
||||
"stylua.styluaPath" = "${pkgs.stylua}/bin/stylua";
|
||||
"git.enableSmartCommit" = true;
|
||||
"git.autofetch" = true;
|
||||
"luau-lsp.sourcemap.autogenerate" = true;
|
||||
"luau-lsp.completion.autocompleteEnd" = true;
|
||||
"luau-lsp.sourcemap.rojoPath" = "${pkgs.rojo}/bin/rojo";
|
||||
"git.confirmSync" = false;
|
||||
"security.workspace.trust.untrustedFiles" = "open";
|
||||
"files.insertFinalNewline" = true;
|
||||
|
|
41
packages/luau-lsp.nix
Normal file
41
packages/luau-lsp.nix
Normal file
|
@ -0,0 +1,41 @@
|
|||
{ pkgs, lib, ...
|
||||
}:
|
||||
pkgs.stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "luau-lsp";
|
||||
version = "1.38.0";
|
||||
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "JohnnyMorganz";
|
||||
repo = "luau-lsp";
|
||||
rev = finalAttrs.version;
|
||||
hash = "sha256-31EdtCQftxhpp2b7fpM5XqRh+r0rBE/k9SpYEPpGpV0=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkgs.cmake ]
|
||||
++ lib.optional pkgs.stdenv.isLinux pkgs.gcc9;
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
cmake ..
|
||||
cmake --build . --target Luau.LanguageServer.CLI --config Release
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir -p $out/bin
|
||||
cp ./luau-lsp $out/bin/luau-lsp
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Language Server for Luau";
|
||||
homepage = "https://github.com/JohnnyMorganz/luau-lsp";
|
||||
downloadPage = "https://github.com/JohnnyMorganz/luau-lsp/releases/tag/${finalAttrs.version}";
|
||||
license = lib.licenses.mit;
|
||||
platforms = lib.platforms.linux;
|
||||
maintainers = with lib.maintainers; [ cswimr ];
|
||||
mainProgram = "luau-lsp";
|
||||
};
|
||||
})
|
Loading…
Reference in a new issue