Skip to content

feat(programs): add language servers and php program - #1051

Merged
shunkakinoki merged 2 commits into
mainfrom
feat/add-language-servers
Mar 9, 2026
Merged

feat(programs): add language servers and php program#1051
shunkakinoki merged 2 commits into
mainfrom
feat/add-language-servers

Conversation

@shunkakinoki

@shunkakinoki shunkakinoki commented Mar 9, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add PHP program directory (home-manager/programs/php/) with php and nodePackages.intelephense (PHP Intelephense LSP)
  • Add language servers to existing program directories: bash-language-server, typescript-language-server, pyright, rust-analyzer, zls
  • Wire php and node into the programs list in default.nix

Test plan

  • Run home-manager switch to verify all packages build and install correctly
  • Confirm LSP servers are available in $PATH after switch

🤖 Generated with Claude Code


Summary by cubic

Add built-in LSP support for Bash, TypeScript, Python, Go, and Zig, and add a PHP program with Intelephense. Also register php and node in the programs list and switch Node to nodejs.

  • New Features

    • New PHP program with php and nodePackages.intelephense.
    • Added LSPs: nodePackages.bash-language-server, nodePackages.typescript-language-server, pyright, gopls, zls.
    • Wired into home-manager/programs/default.nix: import php; include node and php.
  • Bug Fixes

    • Use nodejs package name for Node.
    • Drop standalone rust-analyzer.

Written for commit a1b6220. Summary will update on new commits.

Copilot AI review requested due to automatic review settings March 9, 2026 08:21
@mesa-dot-dev

mesa-dot-dev Bot commented Mar 9, 2026

Copy link
Copy Markdown

You do not have enough credits to review this pull request. Please purchase more credits to continue.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the development environment by introducing comprehensive support for PHP, including its interpreter and a dedicated language server. It also expands code intelligence capabilities across multiple languages by integrating various language servers into their respective program configurations. These changes streamline the setup process for developers working with different programming languages, providing a more robust and efficient coding experience.

Highlights

  • New PHP Program: A new program directory for PHP has been added, including the php interpreter and the nodePackages.intelephense (PHP Intelephense LSP) for enhanced PHP development support.
  • Expanded Language Server Support: Several language servers have been integrated into existing program configurations, including bash-language-server, typescript-language-server, pyright, rust-analyzer, zls, and gopls.
  • Program Integration: The newly added php program and the existing node program have been wired into the main default.nix programs list, ensuring they are properly included in the home-manager configuration.
Changelog
  • home-manager/programs/bash/default.nix
    • Added nodePackages.bash-language-server to the home packages.
  • home-manager/programs/default.nix
    • Imported the new php program configuration.
    • Included node and php in the list of enabled programs.
  • home-manager/programs/go/default.nix
    • Added gopls (Go language server) to the home packages.
  • home-manager/programs/node/default.nix
    • Added nodePackages.typescript-language-server to the home packages.
  • home-manager/programs/php/default.nix
    • Created a new program configuration file for PHP.
    • Included php and nodePackages.intelephense in the home packages for PHP support.
  • home-manager/programs/python/default.nix
    • Added pyright (Python language server) to the home packages.
  • home-manager/programs/rust/default.nix
    • Added rust-analyzer to the home packages.
  • home-manager/programs/zig/default.nix
    • Added zls (Zig language server) to the home packages.
Activity
  • No human activity has been recorded for this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@coderabbitai

coderabbitai Bot commented Mar 9, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

This PR extends multiple home-manager language runtime modules with corresponding language server and development tool packages. It introduces a new PHP program module and updates the program index to expose it, while also adding language servers to existing Bash, Go, Node, Python, Rust, and Zig modules.

Changes

Cohort / File(s) Summary
New PHP Program Module
home-manager/programs/php/default.nix, home-manager/programs/default.nix
Introduces new PHP module with php and nodePackages.intelephense packages; updates programs index to import and export the new module.
Language Server Additions
home-manager/programs/bash/default.nix, home-manager/programs/go/default.nix, home-manager/programs/node/default.nix, home-manager/programs/python/default.nix, home-manager/programs/rust/default.nix, home-manager/programs/zig/default.nix
Adds language servers and development tools: bash-language-server, gopls, typescript-language-server, pyright, rust-analyzer, and zls respectively, each to their corresponding runtime module's package list.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Poem

🐰 Hoppy languages need their servers too,
From Bash to Rust, a polyglot's brew,
With language tools in every space,
Development finds its rightful place!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main changes: adding language servers across multiple programs and introducing a new PHP program module.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check ✅ Passed The pull request description clearly describes all changes: adding a PHP program directory with Intelephense, adding language servers to existing program directories, and wiring php and node into the programs list.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/add-language-servers

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@mesa-dot-dev

mesa-dot-dev Bot commented Mar 9, 2026

Copy link
Copy Markdown

Mesa Description

TL;DR

Added built-in LSP support for Bash, TypeScript, Python, Go, Rust, and Zig, and introduced a new PHP program with Intelephense, while also registering php and node in the main programs list.

What changed?

  • home-manager/programs/bash/default.nix: Enabled the Bash Language Server by adding nodePackages.bash-language-server to user's home packages.
  • home-manager/programs/default.nix: Included a new PHP module by importing and enabling it, and explicitly enabled the node program.
  • home-manager/programs/go/default.nix: Added the gopls language server to home.packages.
  • home-manager/programs/node/default.nix: Added the typescript-language-server package to home.packages.
  • home-manager/programs/php/default.nix: New configuration file introducing PHP and the Intelephense language server (nodePackages) to user's home packages.
  • home-manager/programs/python/default.nix: Added pyright, a static type checker for Python, to Home Manager's managed home packages.
  • home-manager/programs/rust/default.nix: Added the rust-analyzer package to the home-manager Rust program configuration.
  • home-manager/programs/zig/default.nix: Updated the home-manager configuration for Zig to include zls (Zig Language Server) in the list of installed home packages.

Description generated by Mesa. Update settings

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 8 files

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds several language servers for existing languages (Bash, Go, Node/TS, Python, Rust, Zig) and introduces a new program configuration for PHP, including its language server (Intelephense). The changes are well-structured and follow existing patterns in the repository. My main feedback is a suggestion to sort the list of enabled programs in home-manager/programs/default.nix to improve future maintainability.

Comment on lines +57 to +58
node
php

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For better maintainability, please sort the list of enabled programs alphabetically. While you've added node and php in the correct alphabetical position relative to their neighbors, the entire list is not sorted (e.g., zig appears before starship).

Keeping this list sorted will make it easier to manage as more programs are added. Here is the suggested sorted list:

[
  atuin
  bash
  bat
  btop
  delta
  direnv
  fd
  fish
  fnm
  fzf
  gh
  ghq
  git
  go
  lazydocker
  lazygit
  lsd
  neovim
  node
  php
  python
  rust
  ssh
  starship
  tms
  tmux
  zig
  zoxide
  zsh
]

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds additional language tooling to the Home Manager program modules, including a new PHP program module and multiple language servers, and wires PHP (and Node) into the global programs import list.

Changes:

  • Add home-manager/programs/php module with php + nodePackages.intelephense.
  • Add language servers to several existing program modules (e.g., zls, rust-analyzer, pyright, typescript-language-server, bash-language-server, gopls).
  • Include php (and node) in home-manager/programs/default.nix so they’re imported/enabled with other program modules.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
home-manager/programs/zig/default.nix Adds zls to Zig packages.
home-manager/programs/rust/default.nix Adds rust-analyzer to Rust packages.
home-manager/programs/python/default.nix Adds pyright to Python packages.
home-manager/programs/php/default.nix New PHP module installing php and intelephense.
home-manager/programs/node/default.nix Adds typescript-language-server to Node packages.
home-manager/programs/go/default.nix Adds gopls to Go packages.
home-manager/programs/default.nix Wires php import + adds node and php to the module list.
home-manager/programs/bash/default.nix Installs bash-language-server via nodePackages.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

{
home.packages = with pkgs; [
go
gopls

Copilot AI Mar 9, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gopls is now installed unconditionally via the Go program module, but it’s already included in home-manager/packages/default.nix under lib.optionals isDev (lines ~161-167). This creates duplication for dev hosts and also bypasses the existing isDev gating. Consider keeping gopls in only one place (either remove it from the isDev package list or make this module conditional on isDev).

Suggested change
gopls

Copilot uses AI. Check for mistakes.
Comment on lines 4 to 6
go
gopls
];

Copilot AI Mar 9, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR description lists added language servers but doesn’t mention gopls; however this change adds it to the Go program module. Please either update the PR description to include gopls or drop this addition if it’s out of scope.

Copilot uses AI. Check for mistakes.
{
home.packages = with pkgs; [
python3
pyright

Copilot AI Mar 9, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pyright is already included in home-manager/packages/default.nix under lib.optionals isDev (lines ~161-167). Adding it here duplicates the package on dev hosts and makes it install for non-dev hosts too (since programs/* modules are always imported from home-manager/default.nix). Consider keeping pyright in just one location or making this conditional on isDev.

Suggested change
pyright

Copilot uses AI. Check for mistakes.
{
home.packages = with pkgs; [
node
nodePackages.typescript-language-server

Copilot AI Mar 9, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nodePackages.typescript-language-server is already included in home-manager/packages/default.nix under lib.optionals isDev (lines ~161-167). Adding it here duplicates it on dev hosts and makes it install on non-dev hosts as well (since the programs modules are imported unconditionally). Consider consolidating to a single source of truth or gating this module on isDev.

Suggested change
nodePackages.typescript-language-server

Copilot uses AI. Check for mistakes.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@home-manager/programs/node/default.nix`:
- Around line 3-6: The package list in home.packages uses the incorrect nixpkgs
attribute name "node"; replace "node" with "nodejs" (or a versioned variant like
"nodejs_24") so the attribute resolves correctly while leaving
"nodePackages.typescript-language-server" as-is; update the package entry in the
array where "home.packages" is defined to use "nodejs" instead of "node".

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 510aa42e-7b5c-4c20-ba59-cbe5681ac493

📥 Commits

Reviewing files that changed from the base of the PR and between cbaa980 and 9343bb9.

📒 Files selected for processing (8)
  • home-manager/programs/bash/default.nix
  • home-manager/programs/default.nix
  • home-manager/programs/go/default.nix
  • home-manager/programs/node/default.nix
  • home-manager/programs/php/default.nix
  • home-manager/programs/python/default.nix
  • home-manager/programs/rust/default.nix
  • home-manager/programs/zig/default.nix

Comment thread home-manager/programs/node/default.nix
@shunkakinoki
shunkakinoki enabled auto-merge (squash) March 9, 2026 08:54
@shunkakinoki
shunkakinoki merged commit ee7615e into main Mar 9, 2026
33 checks passed
@shunkakinoki
shunkakinoki deleted the feat/add-language-servers branch March 9, 2026 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants