mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-06-10 07:00:00 +00:00
lsp/presets/phpantom: init
This commit is contained in:
parent
29f7eb8491
commit
0c3f1c4cfa
4 changed files with 28 additions and 1 deletions
|
|
@ -329,6 +329,8 @@
|
|||
|
||||
- Add `emmet-ls` to the supported LSPs for all languages it supports.
|
||||
|
||||
- Added `phpantom` LSP preset and into `languages.php`.
|
||||
|
||||
- Added {option}`vim.treesitter.queries` to support adding custom queries.
|
||||
|
||||
- Added injections for `query = '' ... ''` as `query` and `mkLualine '' ... ''`,
|
||||
|
|
|
|||
|
|
@ -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 = {
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@
|
|||
./openscad-lsp.nix
|
||||
./phan.nix
|
||||
./phpactor.nix
|
||||
./phpantom.nix
|
||||
./pyrefly.nix
|
||||
./pyright.nix
|
||||
./python-lsp-server.nix
|
||||
|
|
|
|||
24
modules/plugins/lsp/presets/phpantom.nix
Normal file
24
modules/plugins/lsp/presets/phpantom.nix
Normal 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"];
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue