|
| 1 | +;;; lsp-fish.el --- lsp-mode fish-shell integration -*- lexical-binding: t; -*- |
| 2 | + |
| 3 | +;; Copyright (C) 2025-2026 lsp-mode maintainers |
| 4 | + |
| 5 | +;; Author: lsp-mode maintainers |
| 6 | +;; Keywords: languages |
| 7 | + |
| 8 | +;; This program is free software; you can redistribute it and/or modify |
| 9 | +;; it under the terms of the GNU General Public License as published by |
| 10 | +;; the Free Software Foundation, either version 3 of the License, or |
| 11 | +;; (at your option) any later version. |
| 12 | + |
| 13 | +;; This program is distributed in the hope that it will be useful, |
| 14 | +;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 | +;; GNU General Public License for more details. |
| 17 | + |
| 18 | +;; You should have received a copy of the GNU General Public License |
| 19 | +;; along with this program. If not, see <https://www.gnu.org/licenses/>. |
| 20 | + |
| 21 | +;;; Commentary: |
| 22 | + |
| 23 | +;; Client for fish, the user-friendly command line shell (https://github.com/fish-shell/fish-shell/) |
| 24 | + |
| 25 | +;;; Code: |
| 26 | + |
| 27 | +(require 'lsp-mode) |
| 28 | + |
| 29 | +(defgroup lsp-fish nil |
| 30 | + "Settings for the fish-shell Language Server." |
| 31 | + :group 'lsp-mode |
| 32 | + :link '(url-link "https://fish-lsp.dev/") |
| 33 | + :package-version '(lsp-mode . "9.0.1")) |
| 34 | + |
| 35 | +(defcustom lsp-fish-executable '("fish-lsp" "start") |
| 36 | + "Command to run the fish-shell language server." |
| 37 | + :group 'lsp-fish |
| 38 | + :risky t |
| 39 | + :type '(repeat string)) |
| 40 | + |
| 41 | +(lsp-dependency 'fish-language-server |
| 42 | + '(:system "fish-lsp")) |
| 43 | + |
| 44 | +(lsp-register-client |
| 45 | + (make-lsp-client :server-id 'fish-lsp |
| 46 | + :new-connection (lsp-stdio-connection (lambda () lsp-fish-executable)) |
| 47 | + :activation-fn (lsp-activate-on "fish") |
| 48 | + :major-modes '(fish-mode))) |
| 49 | + |
| 50 | +(lsp-consistency-check lsp-fish) |
| 51 | + |
| 52 | +(provide 'lsp-fish) |
| 53 | +;;; lsp-fish.el ends here |
0 commit comments