treewide: change modules to use 'inherit (builtins) ...

This commit is contained in:
Frothy 2023-11-14 00:18:32 -07:00
commit 4dc7576176
19 changed files with 59 additions and 42 deletions

View file

@ -4,6 +4,7 @@
lib,
...
}: let
inherit (builtins) toJSON;
inherit (lib) mkIf nvim mkLuaBinding mkMerge;
cfg = config.vim.assistant.copilot;
@ -13,7 +14,7 @@
local s, _ = pcall(${luaFunction})
if not s then
local termcode = vim.api.nvim_replace_termcodes(${builtins.toJSON key}, true, false, true)
local termcode = vim.api.nvim_replace_termcodes(${toJSON key}, true, false, true)
vim.fn.feedkeys(termcode, 'n')
end

View file

@ -3,6 +3,7 @@
lib,
...
}: let
inherit (builtins) toJSON;
inherit (lib) mkIf mkMerge mkExprBinding boolToString nvim;
cfg = config.vim.assistant.tabnine;
@ -17,7 +18,7 @@ in {
local completion = require("tabnine.completion")
if not state.completions_cache then
return "${builtins.toJSON cfg.mappings.accept}"
return "${toJSON cfg.mappings.accept}"
end
vim.schedule(completion.accept)
@ -29,7 +30,7 @@ in {
local completion = require("tabnine.completion")
if not state.completions_cache then
return "${builtins.toJSON cfg.mappings.dismiss}"
return "${toJSON cfg.mappings.dismiss}"
end
vim.schedule(function()