-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactor: clean up snippet/completion code Also deleted null-ls, no longer maintained / needed IMO * refactor(lsp): use submodule for server options closes #20 * chore: format * docs: remove redundant punctuation `mkEnableOption` automatically adds a period * update default cmp config
- Loading branch information
Showing
11 changed files
with
299 additions
and
251 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
config, | ||
lib, | ||
pkgs, | ||
... | ||
}: | ||
with lib; let | ||
cfg = config.languages.rust; | ||
in { | ||
options = { | ||
languages.rust = { | ||
enable = mkEnableOption (lib.mdDoc "rust LSP features / additional language tooling."); | ||
settings = mkOption { | ||
type = types.attrs; | ||
default = {}; | ||
description = lib.mdDoc '' | ||
Additional options passed to rust-lsp. | ||
Consult the project's [documentation](https://github.com/oxalica/nil/blob/main/docs/configuration.md) | ||
for all available options. | ||
''; | ||
}; | ||
}; | ||
}; | ||
config = mkMerge [ | ||
(mkIf cfg.enable { | ||
treesitter.parsers = ["rust"]; | ||
|
||
lsp.lsp-config.servers.rust_analyzer = { | ||
cmd = ["${pkgs.rust-analyzer}/bin/rust-analyzer"]; | ||
extraOpts = {inherit (cfg) settings;}; | ||
}; | ||
}) | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.