-
-
Notifications
You must be signed in to change notification settings - Fork 6
Client Configurations
Pre-Built minimal language clients
- kickstart.nvim example
- native neovim minimal example
- coc.nvim complete example
- coc.nvim minimal example
These configurations are meant to be used as quick guides, to showcase how a language client can be implemented across various setups. In some installation cases, actual plugin's might need to be installed.
Until clients have better installation support, the in general method to specify how a client connects to the server should follow these steps:
- Specify the command for the server:
fish-lsp
- Specify the arguments for the server command:
start
- Specify the filetype for the client to use the server:
fish
This usage is shown in each of the pre-built language clients examples.
HERE is a simplified `coc-settings.json` configuration showcasing how this concept is used.
{ "languageserver": { "fish-lsp": { "command": "fish-lsp", "arguments": "start", "filetypes": "fish" } } }
Here is a workflow I use for testing my own configuration.
- 'coc_example' branch cloned to '~/.config/nvim-fish-lsp'
- append the following to '~/.config/fish/config.fish'
alias nvimfish='NVIM_APPNAME=nvim-fish-lsp nvim'
alias nfl='nvimfish ~/.config/fish/config.fish'
- use nfl to open nvim with the
$ nfl
This guide is only meant to showcase another workaround to implementing the clients, and predates the creation of the fish-lsp-language-clients sub-module.
Once dependencies and configuration is correct, having multiple working clients allows you to maintain multiple versions of the language server. In short, this is useful because the user/devs can always ensure a working fallback version. If you extend the language-client-examples, feel free to submit a PR.
If you can't get the default configuration to work on README, here is in depth json configuration:
{
"languageserver": {
"fishlsp": {
"command": "$HOME/path/to/fish-lang-server/bin/fish-lsp",
"filetypes": ["fish"],
"arguments": ["start"],
"revealOutputChannelOn": "info",
"initializationOptions": {
"workspaces": {
"paths": {
"defaults": [
"$HOME/.config/fish",
"/usr/share/fish"
]
}
}
}
}
}
}
Notice:
fish-lsp start
vs$fish_lsp_exe start
The command 'fish-lsp' and the variable '$fish_lsp_exe' should link to the executable file bin/fish-lsp or out/cli.js
Other things to try:
-
make sure tree-sitter-fish.wasm is built
- can be done by using tree-sitter-cli to run (tree-sitter build-wasm /path/to/tree-sitter-fish/
- can be done by using the scripts/build-fish-wasm.sh executable
-
make sure output is linked and decencies are installed
cd ~/path/to/fish-lsp
./setup.sh
- try using client that matches the above example 'coc.nvim'
🐟 fish-lsp.dev 🐟