The Polyglot API Search Engine, based on LSP.
Token-based search for signatures.
Fuzzy search for documentations.
git clone https://github.com/takoeight0821/sisku
cd sisku
stack install
cd sisku-elm
npm install
./install.sh
install.sh
runs npx parcel build src/index.html
and copies the artifact to $XDG_DATA_HOME/sisku/static
.
If XDG_DATA_HOME
is not set, the artifact will be copied to $HOME/.local/share/sisku/static
.
First, create a configuration file, sisku_config.json, and specify the project ID and the language server settings.
$ cat sisku_config.json
{
"projectId": "com.github.takoeight0821.sisku",
"lspSettingMap": {
"haskell": {
"language": "haskell",
"root_uri_patterns": [
"package.yaml"
],
"exclude_patterns": [
"dist-newstyle/**/*.hs"
],
"command": "haskell-language-server-wrapper --lsp",
"extensions": [
".hs"
]
},
"rust": {
"language": "rust",
"root_uri_patterns": [
"Cargo.toml"
],
"exclude_patterns": [],
"command": "rust-analyzer",
"extensions": [
".rs"
]
}
}
}
Then, generate a Sisku index file using the language server.
Index files will be stored as $XDG_DATA_HOME/sisku/hovercraft/<projectId>.json
.
sisku index-lsp
Launch Sisku server.
sisku serve -p 8080
Access the Sisku interface at https://localhost:8080/
The default name of the configuration file is sisku_config.json
.
You can also specify the configuration file by --config
option.
sisku index-lsp --config sisku_config.json
This is the list of config fields:
-
projectId (type: string)
The identifier of the project. It must be unique across all projects indexed in Sisku.
-
lspSettingMap (type: object)
Keys are only used internally, so it can be anything that is not duplicated.
-
lspSettingMap..language (type: string)
Language name
-
lspSettingMap..root_uri_patterns (type: string[])
Patterns with file or directory names for finding root_uri. (See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#initializeParams )
-
lspSettingMap..exclude_patterns (type: string[])
Patterns specifying files to be excluded from indexing.
-
lspSettingMap..command (type: string)
Command to launch a Language Server
-
lspSettingMap..extensions (type: string[])
List of source code extensions.
Sisku (current) | Sisku (in future) | Hoogle | ||
---|---|---|---|---|
Supported Language | Haskell(HLS), Rust(rust-analyzer) are tested | ALl language supporting LSP | Haskell | All |
Search Algorithm | Edit distance | Signature match & Full-text search | Type match | Full-text search |
Extensibility | ✅ (Only language server is required) | ✅ (Language server + some plugin (probably)) | ❌ | ? |