summaryrefslogtreecommitdiffstats
path: root/modules/plugins/lsp/presets/fish-lsp.nix
blob: 8515e1f4856669982df3c9e75db17d303b84c331 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
{
  config,
  lib,
  pkgs,
  ...
}: let
  inherit (lib.modules) mkIf;
  inherit (lib.nvim.types) mkLspPresetEnableOption;
  inherit (lib.meta) getExe;

  cfg = config.vim.lsp.presets.fish-lsp;
in {
  options.vim.lsp.presets.fish-lsp = {
    enable = mkLspPresetEnableOption {
      option = "fish-lsp";
      display = "Fish";
    };
  };

  config = mkIf cfg.enable {
    vim.lsp.servers.fish-lsp = {
      enable = true;
      cmd = [(getExe pkgs.fish-lsp) "start"];
      root_markers = ["config.fish" ".git"];
    };
  };
}