mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-02-03 10:25:52 +00:00
languages/rust: lazy-load crates.nvim plugin
This commit is contained in:
parent
39813f0322
commit
95f2637d1c
2 changed files with 14 additions and 4 deletions
|
|
@ -132,6 +132,9 @@
|
|||
|
||||
- Added [sqruff](https://github.com/quarylabs/sqruff) support to `languages.sql`
|
||||
|
||||
- Lazy-load `crates.nvim` plugin when using
|
||||
`vim.languages.rust.extensions.crates-nvim.enable`
|
||||
|
||||
- Added [Pyrefly](https://pyrefly.org/) and [zuban](https://zubanls.com/)
|
||||
support to `languages.python`
|
||||
|
||||
|
|
|
|||
|
|
@ -228,10 +228,17 @@ in {
|
|||
(mkIf cfg.extensions.crates-nvim.enable {
|
||||
vim = mkMerge [
|
||||
{
|
||||
startPlugins = ["crates-nvim"];
|
||||
pluginRC.rust-crates = entryAnywhere ''
|
||||
require("crates").setup(${toLuaObject cfg.extensions.crates-nvim.setupOpts})
|
||||
'';
|
||||
lazy.plugins.crates-nvim = {
|
||||
package = "crates-nvim";
|
||||
setupModule = "crates";
|
||||
setupOpts = cfg.extensions.crates-nvim.setupOpts;
|
||||
event = [
|
||||
{
|
||||
event = "BufRead";
|
||||
pattern = "Cargo.toml";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
];
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue