FISH-LSP(1)

NAME
fish-lsp - A language server for the fish shell

SYNOPSIS

fish-lsp [OPTIONS]
fish-lsp [SUBCOMMAND] [OPTIONS]

DESCRIPTION

fish-lsp is a language server for the fish shell. It provides IDE-like features for fish shell scripts, such as syntax checking, linting, and auto-completion.

It requires a language client that supports the Language Server Protocol (LSP).

Some common language clients include: the builtin API for nvim (v0.9+), lsp-mode for emacs, or the fish-lsp extension for VSCode.

Documentation below shows usage of the fish-lsp command, including its subcommands and options.

OPTIONS

-v or --version Show version information and exit.
-h or --help Show help message and exit.
--help-all Show all the help information
--help-short Show shortened help message
--help-man Show manpage output

SUBCOMMANDS

  start

start the language server

--enable enable the language server features
--disable disable the language server features
--dump dump the json output of the language server features enabled after startup
--stdio use stdin/stdout for communication (default)
--node-ipc use node IPC for communication
--socket <port> use TCP socket for communication
--memory-limit <mb> set memory usage limit in MB
--max-files <number> override the maximum number of files to analyze
--web start server in web mode used for https://fish-lsp.dev/playground

  env

show the environment variables available to the lsp

-c or --create create the environment variable
-s or --show show the environment variables
--show-default show the default values for fish-lsp env variables
--only <VAR> only include the specified environment variables in the output
--no-global don't use global scope when generating environment variables
--no-local don't use local scope when generating environment variables
--no-export don't use export flag when generating environment variables
--no-comments skip outputting comments
--confd output for redirecting to conf.d/fish-lsp.fish
--json output fish_lsp_* initialization variables as JSON object (for vscode settings.json)

  info

show the build info of fish-lsp

--bin show the path of the fish-lsp executable
--path show the path of the entire fish-lsp installation
--build-time show the path of the entire fish-lsp repo
--build-type show the build type of the command
-v or --version show the lsp version
--lsp-version show the vscode-languageserver version
--capabilities show the lsp capabilities
--man-file show the man file path
--log-file show the log file path
--show show the man/log file contents (needs to be paired with --log-file or --man-file)
--short display small amount of info (alias for --version --build-type --build-time --lsp-version)
--json display the info as JSON (e.g., fish-lsp info --short --json)
--extra show debugging server info (capabilities, paths, version, etc.)
--verbose show debugging server info (capabilities, paths, version, etc.)
--check-health run diagnostics and report health status
--health-check run diagnostics and report health status
--time-startup time the startup of the fish-lsp executable
--time-only show brief summary of the startup timing
--use-workspace <PATH> use the workspace at the specified directory path when fish-lsp info --time-startup is used
--no-warning disable message in the fish-lsp info --time-startup output
--show-files show the files that were indexed during startup when fish-lsp info --time-startup is used
--dump-symbol-tree <FILE> show the fish-lsp definition symbol tree for the specified file
--dump-parse-tree <FILE> show the tree-sitter AST for the specified file
--dump-semantic-tokens <FILE> show the semantic-tokens for the specified file
--no-color disable color output from --dump-* output
--no-icons disable icon usage in output from fish-lsp info --dump-symbol-tree
--source-maps show the source-maps
--check used in combination with --source-maps, verifies source-maps are working by throwing an error
--status used in combination with --source-maps, shows status of source-maps loading

  url

show a helpful url related to the fish-lsp

--repo or --git show the github repo
--npm show the npm package url
--homepage show the homepage
--contributions show the contributions url
--wiki show the github wiki
--issues or --report show the issues page
--discussions show the discussions page
--clients-repo show the clients configuration repo
--sources show a list of helpful sources

  complete

Provide completions for the fish-lsp

--names show the feature names of the completions
--toggles show the feature names of the completions
--fish show fish script
--features show features
--env-variables show env variable completions
--env-variable-names show env variable names
--names-with-summary show the names with the summary for the completions
--abbreviations show the 'fish-lsp' subcommand abbreviations

EXAMPLES

    •   Start the fish-lsp language server, with the default configuration:
        >_ fish-lsp start

    •   Generate the completions for the fish-lsp language server binary:
        >_ fish-lsp complete > ~/.config/fish/completions/fish-lsp.fish

    •   Debug the fish-lsp language server by dumping the enabled features after startup:
        >_ fish-lsp start --dump

    •   Show information about the fish-lsp language server:
        >_ fish-lsp info

    •   Show all the available information about the fish-lsp language server:
        >_ fish-lsp info --verbose

    •   Show startup timing information for the fish-lsp language server:
        >_ fish-lsp info --time-startup

    •   Show startup timing information for the fish-lsp language server for a specific workspace:
        >_ fish-lsp info --time-startup --use-workspace ~/.config/fish --no-warning

    •   Preform a health check on the fish-lsp language server:
        >_ fish-lsp info --check-health

    •   Show the tree-sitter-fish parse tree for the input:
        >_ cat ~/.config/fish/config.fish | fish-lsp info --dump-parse-tree

    •   Show the definition symbol tree for a specific file:
        >_ fish-lsp info --dump-symbol-tree ~/.config/fish/config.fish

    •   Show the semantic tokens for a specific file (read from stdin):
        >_ cat $__fish_data_dir/config.fish | fish-lsp info --dump-semantic-tokens

    •   Show the environment variables available to the fish-lsp language server:
        >_ fish-lsp env --show

    •   Show the default values for specific environment variables used by the fish-lsp language server:
        >_ fish-lsp env --show-default --only fish_lsp_all_indexed_paths,fish_lsp_max_background_files --no-comments

    •   Get sources related to the fish-lsp language server's development:
        >_ fish-lsp url --sources

SEE ALSO

    •   website: https://fish-lsp.dev

    •   repo: https://github.com/ndonfris/fish-lsp

    •   fish website: https://fishshell.com

AUTHOR

    •   Nick Donfris