-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
150 additions
and
131 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,41 @@ | ||
return function() | ||
require("better_escape").setup({ | ||
mapping = { "kk" }, -- a table with mappings to use | ||
timeout = vim.o.timeoutlen, -- the time in which the keys must be hit in ms. Use option timeoutlen by default | ||
clear_empty_lines = false, -- clear line after escaping if there is only whitespace | ||
keys = "<Esc>", -- keys used for escaping, if it is a function will use the result everytime | ||
-- example(recommended) | ||
-- keys = function() | ||
-- return vim.api.nvim_win_get_cursor(0)[2] > 1 and '<ESC>l' or '<ESC>' | ||
-- end, | ||
default_mappings = false, | ||
mappings = { | ||
i = { | ||
k = { | ||
k = function() | ||
vim.api.nvim_input("<esc>") | ||
local current_line = vim.api.nvim_get_current_line() | ||
if current_line:match("^%s+k$") then | ||
vim.schedule(function() | ||
vim.api.nvim_set_current_line("") | ||
end) | ||
end | ||
end, | ||
}, | ||
}, | ||
-- c = { | ||
-- k = { | ||
-- k = "<Esc>", | ||
-- }, | ||
-- }, | ||
-- t = { | ||
-- k = { | ||
-- k = "<C-\\><C-n>", | ||
-- }, | ||
-- }, | ||
-- v = { | ||
-- k = { | ||
-- k = "<Esc>", | ||
-- }, | ||
-- }, | ||
-- s = { | ||
-- k = { | ||
-- k = "<Esc>", | ||
-- }, | ||
-- }, | ||
}, | ||
}) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,7 @@ local Lazy = {} | |
|
||
-- check: check if lazy.nvim exists, if not, download it | ||
function Lazy.check() | ||
if not vim.loop.fs_stat(lazy_path) then | ||
if not vim.fn.isdirectory(lazy_path) then | ||
local lazy_repo = use_ssh and "[email protected]:folke/lazy.nvim.git" or "https://github.com/folke/lazy.nvim.git" | ||
api.nvim_command("!git clone --filter=blob:none --branch=stable " .. lazy_repo .. " " .. lazy_path) | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters