This plugin provides comprehensive language support for Fish shell scripts in JetBrains IDEs.
The plugin provides rich syntax highlighting with customizable colors for all Fish language elements. This includes
keywords like if, else, for, while, function, switch, begin, and end. Variables are highlighted
including indexed access like $var[index] and special variables such as $status, $argv, and $PATH. Both single
and double quoted strings are supported with escape sequence highlighting. Comments, operators (&&, ||, |, &),
redirections (>, >>, <, 2>, &>), and command substitution syntax are all properly highlighted.
You can customize colors via Settings → Editor → Color Scheme → Fish.
When fish-lsp is installed, the plugin provides advanced code intelligence:
- Context-aware code completion for functions, variables, commands, and arguments.
- Go to definition for functions and variables with Ctrl+Click.
- Find all usages of a function or variable across your workspace.
- Hover documentation for builtins, functions, and variables.
- Real-time diagnostics for error detection and warnings.
- Code actions with quick fixes and refactoring suggestions.
- Safe rename refactoring across files.
- Code formatting via fish-lsp.
Without fish-lsp, the plugin still provides basic code completion for keywords and builtins, plus quick documentation for Fish language elements.
The structure view displays all functions in the current file for easy navigation. Breadcrumbs show your current location within nested blocks. Code folding is available for functions and control structures. Brace matching highlights matching parentheses, braces, and brackets.
You can toggle comments with Ctrl+/ or Cmd+/. Code formatting is available via fish-lsp when installed. Run
configurations allow you to execute Fish scripts directly from the IDE. A run gutter icon appears next to scripts for
quick execution. Live templates provide snippets for common Fish constructs like functions, loops, and conditionals.
Color preview shows inline color swatches for set_color commands.
The plugin includes inspections that warn about deprecated Fish syntax, including deprecated functions, variables, and flags. It also detects unused local variables.
Open Settings → Plugins → Marketplace, search for Fish Shell, and click Install.
Download the plugin from the JetBrains Marketplace. Then open Settings → Plugins → ⚙️ → Install Plugin from Disk... and select the downloaded file.
The plugin requires IntelliJ IDEA 2024.3 or later, or any compatible JetBrains IDE.
For full code intelligence features, install fish-lsp. The plugin will automatically detect fish-lsp if it's in your PATH, or you can configure the path manually in Settings → Tools → Fish Shell.
If you're using a Community Edition IDE (IntelliJ IDEA Community, PyCharm Community, etc.), you need to install the LSP4IJ plugin for LSP support. Ultimate editions have built-in LSP support.
The plugin automatically recognizes files with the .fish extension. It also recognizes files with a Fish shebang such
as #!/usr/bin/env fish or #!/usr/bin/fish.
You can customize syntax highlighting colors at Settings → Editor → Color Scheme → Fish.
Configure fish-lsp at Settings → Tools → Fish Shell. You can specify a custom path to the fish-lsp executable if it's not in your PATH, or toggle LSP features on/off.
Brace expansion syntax like echo file.{txt,md} is lexed as regular words because expansion only occurs at runtime.
Glob patterns like ls *.fish are not specially highlighted since they require runtime evaluation. Command arguments
are not semantically analyzed because each command has its own unique option syntax.
Contributions are welcome. Please feel free to submit issues and pull requests on GitHub.
This project is licensed under the MIT License. See the LICENSE file for details.