mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-09-06 10:21:31 +00:00
treewide: change modules to use 'inherit (builtins) ...
This commit is contained in:
parent
c77b007a26
commit
4dc7576176
19 changed files with 59 additions and 42 deletions
|
@ -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
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue