mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-10-03 07:23:30 +00:00
Merge pull request #1161 from alfarelcynthesis/less-import
treewide: don't import modules manually
This commit is contained in:
commit
06bc21e75c
13 changed files with 27 additions and 34 deletions
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
options,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.generators) mkLuaInline;
|
||||
|
@ -14,12 +14,11 @@
|
|||
cfg = config.vim.lsp;
|
||||
usingNvimCmp = config.vim.autocomplete.nvim-cmp.enable;
|
||||
usingBlinkCmp = config.vim.autocomplete.blink-cmp.enable;
|
||||
self = import ./module.nix {inherit config lib pkgs;};
|
||||
conformCfg = config.vim.formatter.conform-nvim;
|
||||
conformFormatOnSave = conformCfg.enable && conformCfg.setupOpts.format_on_save != null;
|
||||
|
||||
augroup = "nvf_lsp";
|
||||
mappingDefinitions = self.options.vim.lsp.mappings;
|
||||
mappingDefinitions = options.vim.lsp.mappings;
|
||||
mappings = addDescriptionsToMappings cfg.mappings mappingDefinitions;
|
||||
mkBinding = binding: action:
|
||||
if binding.value != null
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
options,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkIf mkMerge;
|
||||
|
@ -9,9 +10,8 @@
|
|||
inherit (lib.nvim.lua) toLuaObject;
|
||||
|
||||
cfg = config.vim.lsp.nvim-docs-view;
|
||||
self = import ./nvim-docs-view.nix {inherit lib;};
|
||||
|
||||
mappingDefinitions = self.options.vim.lsp.nvim-docs-view.mappings;
|
||||
mappingDefinitions = options.vim.lsp.nvim-docs-view.mappings;
|
||||
mappings = addDescriptionsToMappings cfg.mappings mappingDefinitions;
|
||||
in {
|
||||
config = mkIf cfg.enable {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
options,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkIf mkMerge;
|
||||
|
@ -10,8 +11,7 @@
|
|||
|
||||
cfg = config.vim.lsp;
|
||||
|
||||
self = import ./otter.nix {inherit lib;};
|
||||
mappingDefinitions = self.options.vim.lsp.otter-nvim.mappings;
|
||||
mappingDefinitions = options.vim.lsp.otter-nvim.mappings;
|
||||
mappings = addDescriptionsToMappings cfg.otter-nvim.mappings mappingDefinitions;
|
||||
in {
|
||||
config = mkIf (cfg.enable && cfg.otter-nvim.enable) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue