refactor(nvim): better name and lazy loading
This commit is contained in:
parent
0f5f81539b
commit
4dbec7bade
2 changed files with 15 additions and 12 deletions
|
@ -48,9 +48,9 @@ let
|
|||
listToStringMultiLine id
|
||||
([
|
||||
"dir = ${quote plugin}"
|
||||
"name = ${quote plugin.name}"
|
||||
"lazy = ${boolToString lazy}"
|
||||
"name = ${quote (getName plugin)}"
|
||||
]
|
||||
++ (optional (!lazy) "lazy = ${boolToString lazy}")
|
||||
++ (optional (!enabled) "enabled = ${boolToString enabled}")
|
||||
++ (optional (dependencies != [ ]) "dependencies = ${listToStringMultiLine id (map lazySpecFromPlugin dependencies)}")
|
||||
++ (optional (init != null) "init = function(plugin)\n${toString init}\nend")
|
||||
|
|
|
@ -200,8 +200,7 @@ with builtins;
|
|||
conf = readFile ./smartcolumn-nvim.lua;
|
||||
}
|
||||
{
|
||||
plugin = telescope-fzf-native-nvim;
|
||||
conf = readFile ./telescope-fzf-native-nvim.lua;
|
||||
plugin = telescope-nvim;
|
||||
cmd = [ "Telescope" ];
|
||||
keys = [
|
||||
{ key = "<leader>ff"; cmd = "<cmd>Telescope find_files<cr>"; desc = "Find files"; }
|
||||
|
@ -219,14 +218,16 @@ with builtins;
|
|||
{ key = "<leader>gc"; cmd = "<cmd>Telescope git_commits<cr>"; desc = "Commits"; }
|
||||
{ key = "<leader>gs"; cmd = "<cmd>Telescope git_status<cr>"; desc = "Status"; }
|
||||
];
|
||||
dependencies = [
|
||||
{
|
||||
plugin = telescope-nvim;
|
||||
dependencies = [
|
||||
{ plugin = plenary-nvim; }
|
||||
{ plugin = which-key-nvim; }
|
||||
];
|
||||
}
|
||||
{
|
||||
plugin = telescope-fzf-native-nvim;
|
||||
conf = readFile ./telescope-fzf-native-nvim.lua;
|
||||
dependencies = [
|
||||
{ plugin = telescope-nvim; }
|
||||
];
|
||||
}
|
||||
{
|
||||
|
@ -241,7 +242,9 @@ with builtins;
|
|||
{
|
||||
plugin = comment-nvim;
|
||||
event = [ "BufReadPost" "BufNewFile" ];
|
||||
conf = "require('Comment').setup()";
|
||||
conf = ''
|
||||
require("Comment").setup()
|
||||
'';
|
||||
}
|
||||
{
|
||||
plugin = leap-nvim;
|
||||
|
|
Loading…
Reference in a new issue