Skip to content

Commit

Permalink
Merge pull request #33 from definfo/master
Browse files Browse the repository at this point in the history
doc: add installation guide for NixOS
  • Loading branch information
wlh320 authored Aug 31, 2024
2 parents 642a546 + 6c016d5 commit 593cf90
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,44 @@ https://user-images.githubusercontent.com/14821247/213079440-f0ab2ddd-5e44-4e41-

手动从源码编译与上面类似,其他 linux 发行版也差不多

### NixOS

可以参考 NUR 打包 [nur.repos.definfo.rime-ls](https://github.com/nix-community/nur-combined/blob/master/repos/definfo/pkgs/rime-ls/default.nix)

使用 home-manager 管理配置时,应将 `shared_data_dir` 路径替换为 `${pkgs.nur.repos.definfo.rime-ls}/share/rime-data`

以 Helix 为例:

```nix
programs.helix = {
languages = {
language-server.rime-ls = {
command = "${pkgs.nur.repos.definfo.rime-ls}/bin/rime_ls";
config.shared_data_dir = "${pkgs.nur.repos.definfo.rime-ls}/share/rime-data";
config.user_data_dir = "${config.home.homeDirectory}/.local/share/rime-ls";
config.log_dir = "${config.home.homeDirectory}/.local/share/rime-ls";
config.max_candidates = 9;
config.trigger_characters = [ ];
config.schema_trigger_character = "&";
config.max_tokens = 4;
config.always_incomplete = true;
config.long_filter_text = true;
};
language = [
{
name = "markdown";
scope = "source.markdown";
file-types = [
"md"
"markdown"
];
language-servers = [ "rime-ls" ];
}
];
};
};
```

### Windows

1. 配置 Rust 环境, 安装额外依赖 `clang``librime`
Expand Down

0 comments on commit 593cf90

Please sign in to comment.