Running Serena with pre-installed LSP-servers

I use Serena with OpenCode. It provides its own flake, but by default it tries to install its own language servers, and if node is missing in the context of the builder, it becomes a mess.

An easy solution it to pre-populate Serena’s config with paths to all installed and supported language servers:

ls_specific_settings:
  bash:
    ls_path: /run/current-system/sw/bin/bash-language-server
  cpp:
    ls_path: /run/current-system/sw/bin/clangd
  markdown:
    ls_path: /run/current-system/sw/bin/marksman
  rust:
    ls_path: /run/current-system/sw/bin/rust-analyzer
  typescript:
    ls_path: /run/current-system/sw/bin/typescript-language-server
  yaml:
    ls_path: /run/current-system/sw/bin/yaml-language-server

I prefer to keep it in dotfiles and relink to “/.serena/serena_config.yml on each build.