mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 08:35:43 +02:00
plugins/parinfer-rust: init
This commit is contained in:
parent
331f0430e4
commit
22351f4628
3 changed files with 52 additions and 0 deletions
|
@ -57,6 +57,7 @@
|
||||||
./languages/nix.nix
|
./languages/nix.nix
|
||||||
./languages/nvim-jdtls.nix
|
./languages/nvim-jdtls.nix
|
||||||
./languages/openscad.nix
|
./languages/openscad.nix
|
||||||
|
./languages/parinfer-rust.nix
|
||||||
./languages/plantuml-syntax.nix
|
./languages/plantuml-syntax.nix
|
||||||
./languages/rust-tools.nix
|
./languages/rust-tools.nix
|
||||||
./languages/rustaceanvim.nix
|
./languages/rustaceanvim.nix
|
||||||
|
|
27
plugins/languages/parinfer-rust.nix
Normal file
27
plugins/languages/parinfer-rust.nix
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
helpers,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
helpers.vim-plugin.mkVimPlugin config {
|
||||||
|
name = "parinfer-rust";
|
||||||
|
defaultPackage = pkgs.vimPlugins.parinfer-rust;
|
||||||
|
globalPrefix = "parinfer_";
|
||||||
|
|
||||||
|
maintainers = [lib.maintainers.GaetanLepage];
|
||||||
|
|
||||||
|
settingsOptions = {
|
||||||
|
mode = helpers.defaultNullOpts.mkEnumFirstDefault ["smart" "indent" "paren"] ''
|
||||||
|
The mode used to process buffer changes.
|
||||||
|
'';
|
||||||
|
|
||||||
|
force_balance = helpers.defaultNullOpts.mkBool false ''
|
||||||
|
In smart mode and indent mode, parinfer will sometimes leave unbalanced brackets around the
|
||||||
|
cursor and fix them when the cursor moves away.
|
||||||
|
When this option is set to `true`, the brackets will be fixed immediately (and fixed again
|
||||||
|
when text is inserted).
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
24
tests/test-sources/plugins/languages/parinfer-rust.nix
Normal file
24
tests/test-sources/plugins/languages/parinfer-rust.nix
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
{
|
||||||
|
empty = {
|
||||||
|
plugins.parinfer-rust.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
defaults = {
|
||||||
|
plugins.parinfer-rust = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
mode = "smart";
|
||||||
|
enabled = true;
|
||||||
|
force_balance = false;
|
||||||
|
comment_char = ";";
|
||||||
|
string_delimiters = [''"''];
|
||||||
|
lisp_vline_symbols = false;
|
||||||
|
lisp_block_comments = false;
|
||||||
|
guile_block_comments = false;
|
||||||
|
scheme_sexp_comments = false;
|
||||||
|
janet_long_strings = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue