{"id":13502884,"url":"https://github.com/estin/simple-completion-language-server","last_synced_at":"2026-03-17T22:44:32.208Z","repository":{"id":175258031,"uuid":"653568490","full_name":"estin/simple-completion-language-server","owner":"estin","description":"Language server to enable word completion and snippets for Helix editor","archived":false,"fork":false,"pushed_at":"2024-10-29T06:22:20.000Z","size":244,"stargazers_count":216,"open_issues_count":3,"forks_count":14,"subscribers_count":6,"default_branch":"main","last_synced_at":"2024-10-31T22:33:05.608Z","etag":null,"topics":["completion","helix","language-server","language-server-protocol","snippets"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/estin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-14T09:54:13.000Z","updated_at":"2024-10-31T12:26:01.000Z","dependencies_parsed_at":"2024-10-31T22:41:13.068Z","dependency_job_id":null,"html_url":"https://github.com/estin/simple-completion-language-server","commit_stats":null,"previous_names":["estin/simple-completion-language-server"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/estin%2Fsimple-completion-language-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/estin%2Fsimple-completion-language-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/estin%2Fsimple-completion-language-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/estin%2Fsimple-completion-language-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/estin","download_url":"https://codeload.github.com/estin/simple-completion-language-server/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246187190,"owners_count":20737459,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["completion","helix","language-server","language-server-protocol","snippets"],"created_at":"2024-07-31T22:02:28.362Z","updated_at":"2026-03-17T22:44:32.203Z","avatar_url":"https://github.com/estin.png","language":"Rust","readme":"\u003cdiv align=\"center\"\u003e\n  \u003cp\u003e\u003ch1\u003esimple-completion-language-server\u003c/h1\u003e \u003c/p\u003e\n  \u003cp\u003e\u003cstrong\u003eAllow to use common word completion and snippets for \u003ca href=\"https://helix-editor.com/\"\u003eHelix editor\u003c/a\u003e\u003c/strong\u003e\u003c/p\u003e\n  \u003cp\u003e\u003c/p\u003e\n\u003c/div\u003e\n\n\nhttps://github.com/estin/simple-completion-language-server/assets/520814/10566ad4-d6d1-475b-8561-2e909be0f875\n\nBased on [comment](https://github.com/helix-editor/helix/pull/3328#issuecomment-1559031060)\n\n### Install\n\n#### From source\n\nFrom GitHub:\n\n```console\n$ cargo install --locked --git https://github.com/estin/simple-completion-language-server.git\n```\n\nFrom local repository:\n\n```console\n$ git clone https://github.com/estin/simple-completion-language-server.git\n$ cd simple-completion-language-server\n$ cargo install --locked --path .\n```\n\n#### Nix\n\nYou can install `simple-completion-language-server` using the [nix package manager](https://nixos.org/) from [nixpkgs](https://search.nixos.org/packages?channel=unstable\u0026show=simple-completion-language-server\u0026from=0\u0026size=50\u0026sort=relevance\u0026type=packages\u0026query=simple-comple).\n\n\u003e [!NOTE]  \n\u003e At the moment the package is only available on the [unstable](https://nixos.org/manual/nixpkgs/unstable/#overview-of-nixpkgs) channel of nixpkgs.\n\n```console\n# Add it to a temporary shell environment\nnix shell nixpkgs#simple-completion-language-server\n# Add it to your current profile\nnix profile install nixpkgs#simple-completion-language-server\n```\n\n\u003e [!NOTE]\n\u003e The above instructions assume you have enabled the *experimental features* `nix-command` `flakes`. If you are unsure about what this means or how to check read [here](https://nixos.wiki/wiki/Flakes).\n\nIf you are on [NixOS](https://nixos.org/) or are using [home-manager](https://nix-community.github.io/home-manager/) you can do one of the following:\n\n```nix\n# NixOS configuration.nix\nenvironment.systemPackages = [pkgs.simple-completion-language-server];\n\n# or home-manager config\nhome.packages = [pkgs.simple-completion-language-server];\n# This will let `hx` know about the location of the binary without putting it in your $PATH\nprograms.helix.extraPackages = [pkgs.simple-completion-language-server];\n```\n\n### Configure\n\nFor Helix on `~/.config/helix/languages.toml`\n\n```toml\n# introduce new language server\n[language-server.scls]\ncommand = \"simple-completion-language-server\"\n\n[language-server.scls.config]\nfeature_words = false                # enable completion by word\nfeature_snippets = true              # enable snippets\nsnippets_first = true                # completions will return before snippets by default\nsnippets_inline_by_word_tail = false # suggest snippets by WORD tail, for example text `xsq|` become `x^2|` when snippet `sq` has body `^2`\nfeature_unicode_input = false        # enable \"unicode input\"\nfeature_paths = false                # enable path completion\nfeature_citations = false            # enable citation completion (only on `citation` feature enabled)\n\n\n# write logs to /tmp/completion.log\n[language-server.scls.environment]\nRUST_LOG = \"info,simple-completion-language-server=info\"\nLOG_FILE = \"/tmp/completion.log\"\n\n# append language server to existed languages\n[[language]]\nname = \"rust\"\nlanguage-servers = [ \"scls\", \"rust-analyzer\" ]\n\n[[language]]\nname = \"git-commit\"\nlanguage-servers = [ \"scls\" ]\n\n# etc..\n\n# introduce a new language to enable completion on any doc by forcing set language with :set-language stub\n[[language]]\nname = \"stub\"\nscope = \"text.stub\"\nfile-types = []\nshebangs = []\nroots = []\nauto-format = false\nlanguage-servers = [ \"scls\" ]\n```\n\n### Snippets\n\nRead snippets from dir `~/.config/helix/snippets` or specify snippets path via `SNIPPETS_PATH` env.\n\nDefault lookup directory can be overriden via `SCLS_CONFIG_SUBDIRECTORY` as well (e.g. when SCLS_CONFIG_SUBDIRECTORY = `vim`, SCLS will perform it's lookups in `~/.config/vim` instead)\n\nCurrently, it supports our own `toml` format and vscode `json` (a basic effort).\n\nFilename used as snippet scope ([language id][1]), filename `snippets.(toml|json)` will not attach scope to snippets.\n\nFor example, snippets with the filename `python.toml` or `python.json` would have a `python` scope.\n\nSnippets format\n\n```toml\n[[snippets]]\nprefix = \"ld\"\nscope = [ \"python\" ]  # language id https://code.visualstudio.com/docs/languages/identifiers#_known-language-identifiers\nbody = 'log.debug(\"$1\")'\ndescription = \"log at debug level\"\n```\n\n### Use external snippets collections from git repos\n\nConfigure sources in `~/.config/helix/external-snippets.toml` (or via env `EXTERNAL_SNIPPETS_CONFIG`)\n\n1. Declare list of sources by key `[[sources]]`\n\n2. Optionally, declare paths to load snippets on current source by `[[source.paths]]`.\n\nHighly recommended to declare concrete paths with scopes. To explicit configure required snippets and its scopes.\n\nSnippets suggestion filtered out by document scope.\n\nScope it's [language id](https://code.visualstudio.com/docs/languages/identifiers#_known-language-identifiers) and **not file extension** by language server protocol.\n\nIf `[[source.paths]]` isn't specified for source then all files with extensions `.json` and `.toml` would be tried to load. Scope at that case would be equal filename.\nTo apply snippets the filename must be one of known language id.\n\n3. Run commands to fetch and validate snippets\n\n```console\n\n# Clone or update snippets source repos to `~/.config/helix/external-snippets/\u003crepo path\u003e`\nsimple-completion-language-server fetch-external-snippets\n\n# Try to find and parse snippets\nsimple-completion-language-server validate-snippets\n\n```\n\n#### Config format for external snippets\n\n```toml\n# first external source to load snippets\n[[sources]] # list of sources to load\nname = \"source1\" # optional name shown on snippet description \ngit = \"https://example.com/source1.git\" # git repo with snippets collections\n\n[[sources.paths]] # explicit list of paths to load on current source\nscope = [\"scope1\", \"scope2\"] # optional scopes (language id) for current snippets\npath = \"path-in-repo/snippets1.json\" # where snippet file or dir located in repo\n\n[[sources.paths]]\nscope = [\"scope3\"]\npath = \"path-in-repo/snippets2.json\"\n\n# next external source to load snippets\n[[sources]]\nname = \"source2\"  \ngit = \"https://example.com/source2.git\"\n\n[[sources.paths]]\nscope = [\"scope1\"]\npath = \"path-in-repo-of-source2/snippets1.json\"\n```\n\n#### Example\n\nLoad python snippets from file https://github.com/rafamadriz/friendly-snippets/blob/main/snippets/python/python.json\n\nFile `~/.config/helix/external-snippets.toml`\n\n```toml\n[[sources]] \nname = \"friendly-snippets\"  \ngit = \"https://github.com/rafamadriz/friendly-snippets.git\" \n\n[[sources.paths]] \nscope = [\"python\"]  \npath = \"snippets/python/python.json\"  \n```\n\nClone or update snippets source repos to `~/.config/helix/external-snippets/\u003crepo path\u003e`\n\n```console\n$ simple-completion-language-server fetch-external-snippets\n```\n\nValidate snippets\n\n```console\n$ simple-completion-language-server validate-snippets\n```\n\n### Unicode input\n\nRead unicode input config as each file from dir `~/.config/helix/unicode-input` (or specify path via `UNICODE_INPUT_PATH` env).\n\nUnicode input format (toml key-value), for example `~/.config/helix/unicode-input/base.toml`\n\n```toml\nalpha = \"α\"\nbetta = \"β\"\ngamma = \"γ\"\nfire = \"🔥\"\n```\n\n\nValidate unicode input config\n\n```console\n$ simple-completion-language-server validate-unicode-input\n```\n\n### Citation completion\n\nCitation keys completion from bibliography file declared in current document.\nWhen completion is triggered with a prefixed `@` (which can be configured via `citation_prefix_trigger` settings), scls will try to extract the bibliography file path from the current document (regex can be configured via the `citation_bibfile_extract_regexp` setting) to parse and use it as a completion source.\n\nTo enable this feature, scls must be compiled with the `--features citation` flag. \n\n```console\n$ cargo install --features citation --git https://github.com/estin/simple-completion-language-server.git\n```\n\nAnd initialize scls with `feature_citations = true`.\n\n```toml\n[language-server.scls.config]\nfeature_citations = true\n```\n\nFor more info, please check https://github.com/estin/simple-completion-language-server/issues/78\n\n### Similar projects\n\n- [erasin/hx-lsp](https://github.com/erasin/hx-lsp)\n- [metafates/buffer-language-server](https://github.com/metafates/buffer-language-server)\n- [rajasegar/helix-snippets-ls](https://github.com/rajasegar/helix-snippets-ls)\n- [quantonganh/snippets-ls](https://github.com/quantonganh/snippets-ls)\n- [Stanislav-Lapata/snippets-ls](https://github.com/Stanislav-Lapata/snippets-ls)\n- ...(please add another useful links here)\n\n### Useful snippets collections\n\n- [rafamadriz/friendly-snippets](https://github.com/rafamadriz/friendly-snippets)\n- ...(please add another useful links here)\n\n[1]: \u003chttps://code.visualstudio.com/docs/languages/identifiers#_known-language-identifiers\u003e \"Known language identifiers\"\n","funding_links":[],"categories":["Rust"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Festin%2Fsimple-completion-language-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Festin%2Fsimple-completion-language-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Festin%2Fsimple-completion-language-server/lists"}