mirror of
https://github.com/nix-community/nixvim.git
synced 2025-12-15 21:41:11 +01:00
plugins/rzls: init module
This commit is contained in:
parent
af69a39a5f
commit
ca7f98d936
2 changed files with 69 additions and 0 deletions
40
plugins/by-name/rzls/default.nix
Normal file
40
plugins/by-name/rzls/default.nix
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
{ config, lib, ... }:
|
||||
lib.nixvim.plugins.mkNeovimPlugin {
|
||||
name = "rzls";
|
||||
package = "rzls-nvim";
|
||||
|
||||
maintainers = [ lib.maintainers.khaneliman ];
|
||||
|
||||
dependencies = [
|
||||
"rzls"
|
||||
];
|
||||
|
||||
extraOptions = {
|
||||
enableRazorFiletypeAssociation = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
description = ''
|
||||
Sets up the filetype association of `.cshtml` and `razor` files to trigger treesitter
|
||||
and lsp support for razor functionality.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
extraConfig = cfg: {
|
||||
assertions = lib.nixvim.mkAssertions "plugins.rzls" {
|
||||
assertion = config.plugins.roslyn.enable;
|
||||
message = ''
|
||||
You must enable `plugins.roslyn` for general functionality in `rzls.nvim`.
|
||||
'';
|
||||
};
|
||||
|
||||
filetype = lib.mkIf cfg.enableRazorFiletypeAssociation {
|
||||
extension = {
|
||||
razor = "razor";
|
||||
cshtml = "razor";
|
||||
};
|
||||
};
|
||||
|
||||
plugins.rzls.settings.path = lib.mkOptionDefault (lib.getExe config.dependencies.rzls.package);
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue