lsp/presets/phpantom: init

This commit is contained in:
Snoweuph 2026-06-05 02:21:56 +02:00
commit 0c3f1c4cfa
No known key found for this signature in database
GPG key ID: BEFC41DA223CEC55
4 changed files with 28 additions and 1 deletions

View file

@ -17,7 +17,7 @@
cfg = config.vim.languages.php;
defaultServers = ["phpactor"];
servers = ["phpactor" "phan" "intelephense"];
servers = ["phpactor" "phan" "intelephense" "phpantom"];
defaultFormat = ["php_cs_fixer"];
formats = {

View file

@ -48,6 +48,7 @@
./openscad-lsp.nix
./phan.nix
./phpactor.nix
./phpantom.nix
./pyrefly.nix
./pyright.nix
./python-lsp-server.nix

View file

@ -0,0 +1,24 @@
{
config,
lib,
pkgs,
...
}: let
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf;
inherit (lib.nvim.types) mkLspPresetEnableOption;
cfg = config.vim.lsp.presets.phpantom;
in {
options.vim.lsp.presets.phpantom = {
enable = mkLspPresetEnableOption "phpantom" "PHPantom" [];
};
config = mkIf cfg.enable {
vim.lsp.servers.phpantom = {
enable = true;
cmd = [(getExe pkgs.phpantom)];
root_markers = [".phpantom.toml" "composer.json" ".php-version" ".git"];
};
};
}