1

Home/Nixinator: Configure opencode lsps + formatters

This commit is contained in:
2026-06-14 21:01:02 +02:00
parent da0c4e9afe
commit cade967fb0

View File

@ -3,6 +3,7 @@
pkgs, pkgs,
nixosConfig, nixosConfig,
config, config,
hostname,
lib, lib,
mylib, mylib,
username, username,
@ -52,8 +53,8 @@
opencode = { opencode = {
enable = true; enable = true;
enableMcpIntegration = true; enableMcpIntegration = true;
extraPackages = [ extraPackages = with pkgs; [
# pkgs.opencode-claude-auth # Installed using npm # opencode-claude-auth # Installed using npm
]; ];
# Writes opencode.json # Writes opencode.json
@ -86,8 +87,54 @@
command = ["alejandra" "$FILE"]; command = ["alejandra" "$FILE"];
extensions = [".nix"]; extensions = [".nix"];
}; };
perltidy = {
command = ["perltidy" "$FILE"];
extensions = [".pl"];
};
};
lsp = {
nixd = {
command = ["nixd"];
extensions = [".nix"];
initialization = {
preferences = {
nixd = {
nixpkgs = {expr = "import <nixpkgs> {}";};
options = {
nixos = {expr = "(builtins.getFlake \"/home/${username}/NixFlake\").nixosConfigurations.${hostname}.options";};
home-manager = {expr = "(builtins.getFlake \"/home/${username}/NixFlake\").nixosConfigurations.\"${hostname}\".options.home-manager.users.type.getSubOptions []";};
};
diagnostic = {
suppress = ["sema-escaping-with" "var-bind-to-this" "escaping-this-with"];
};
};
};
};
};
perlnavigator = {
command = ["perlnavigator"];
extensions = [".pl"];
initialization = {
preferences = {};
};
};
# perlpls = {
# command = ["pls"];
# extensions = [".pl"];
# initialization = {
# preferences = {
# perl = {
# perlcritic = {enabled = false;};
# syntax = {enabled = true;};
# };
# };
# };
# };
r-language-server = {
command = ["R" "--no-echo" "-e" "languageserver::run()"];
extensions = [".r" ".rmd" ".quarto"];
};
}; };
lsp = true;
permission = { permission = {
"*" = "ask"; "*" = "ask";
"read" = "allow"; "read" = "allow";
@ -99,7 +146,7 @@
plugin = [ plugin = [
"opencode-claude-auth@latest" # https://github.com/griffinmartin/opencode-claude-auth "opencode-claude-auth@latest" # https://github.com/griffinmartin/opencode-claude-auth
"@tarquinen/opencode-dcp@latest" # better compacting "@tarquinen/opencode-dcp@latest" # better compacting
"@slkiser/opencode-quota" # "@slkiser/opencode-quota"
]; ];
share = "disabled"; share = "disabled";
shell = "fish"; shell = "fish";