Uhhhh, lots of changes I forgot to push earlier
This commit is contained in:
parent
de5e4fe049
commit
5230faf7c4
20 changed files with 1697 additions and 1634 deletions
home/features/neovim/config/lua/my
23
home/features/neovim/config/lua/my/helpers/folding.lua
Normal file
23
home/features/neovim/config/lua/my/helpers/folding.lua
Normal file
|
@ -0,0 +1,23 @@
|
|||
local M = {}
|
||||
|
||||
local function createFold(name)
|
||||
local commentstring = vim.o.commentstring
|
||||
local start_comment = string.gsub(commentstring, "%%s", " {{{ " .. name)
|
||||
local end_comment = string.gsub(commentstring, "%%s", " }}}")
|
||||
|
||||
-- Leave visual mode
|
||||
local esc = vim.api.nvim_replace_termcodes("<esc>", true, false, true)
|
||||
vim.api.nvim_feedkeys(esc, "x", false)
|
||||
|
||||
vim.cmd(":'>put='" .. end_comment .. "'")
|
||||
vim.cmd(":'<-1put='" .. start_comment .. "'")
|
||||
end
|
||||
|
||||
function M.setup()
|
||||
vim.keymap.set("v", "<C-i>", function()
|
||||
local name = vim.fn.input("Fold name: ")
|
||||
createFold(name)
|
||||
end, { desc = "Create fold markers around area" })
|
||||
end
|
||||
|
||||
return M
|
|
@ -26,7 +26,7 @@ function M.setup()
|
|||
fallback = true,
|
||||
|
||||
-- Directory where I store my local plugin projects
|
||||
path = vim.g.nix_projects_path,
|
||||
path = vim.g.nix_projects_dir,
|
||||
patterns = { "prescientmoon" },
|
||||
},
|
||||
performance = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue