lsp/presets/phpactor: init

This commit is contained in:
Snoweuph 2026-04-11 17:46:21 +02:00
commit e1c3257ca3
No known key found for this signature in database
GPG key ID: BEFC41DA223CEC55
2 changed files with 26 additions and 0 deletions

View file

@ -0,0 +1,25 @@
{
config,
lib,
pkgs,
...
}: let
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
cfg = config.vim.lsp.presets.phpactor;
in {
options.vim.lsp.presets.phpactor = {
enable = mkEnableOption "the PHPActor Language Server";
};
config = mkIf cfg.enable {
vim.lsp.servers.phpactor = {
enable = true;
cmd = [(getExe pkgs.phpactor) "language-server"];
root_markers = [".git" ".phpactor.json" ".phpactor.yml"];
workspace_required = true;
};
};
}