mirror of
https://github.com/pojokcodeid/nvim-lazy.git
synced 2025-06-21 16:39:04 +02:00
add: update config (tuning speed)
This commit is contained in:
parent
83ef9398c8
commit
22b81afe5f
8 changed files with 131 additions and 122 deletions
|
@ -38,10 +38,13 @@
|
||||||
"nvim-ts-autotag": { "branch": "main", "commit": "531f48334c422222aebc888fd36e7d109cb354cd" },
|
"nvim-ts-autotag": { "branch": "main", "commit": "531f48334c422222aebc888fd36e7d109cb354cd" },
|
||||||
"nvim-ts-context-commentstring": { "branch": "main", "commit": "734ebad31c81c6198dfe102aa23280937c937c42" },
|
"nvim-ts-context-commentstring": { "branch": "main", "commit": "734ebad31c81c6198dfe102aa23280937c937c42" },
|
||||||
"nvim-ts-rainbow2": { "branch": "master", "commit": "b3120cd5ae9ca524af9cb602f41e12e301fa985f" },
|
"nvim-ts-rainbow2": { "branch": "master", "commit": "b3120cd5ae9ca524af9cb602f41e12e301fa985f" },
|
||||||
|
"nvim-ufo": { "branch": "main", "commit": "a5390706f510d39951dd581f6d2a972741b3fa26" },
|
||||||
"nvim-web-devicons": { "branch": "master", "commit": "a55b801b7ef5719ca25692c3a0a5447fdfb692ed" },
|
"nvim-web-devicons": { "branch": "master", "commit": "a55b801b7ef5719ca25692c3a0a5447fdfb692ed" },
|
||||||
"onedark.nvim": { "branch": "master", "commit": "1230aaf2a427b2c5b73aba6e4a9a5881d3e69429" },
|
"onedark.nvim": { "branch": "master", "commit": "1230aaf2a427b2c5b73aba6e4a9a5881d3e69429" },
|
||||||
"plenary.nvim": { "branch": "master", "commit": "50012918b2fc8357b87cff2a7f7f0446e47da174" },
|
"plenary.nvim": { "branch": "master", "commit": "50012918b2fc8357b87cff2a7f7f0446e47da174" },
|
||||||
|
"promise-async": { "branch": "main", "commit": "38a4575da9497326badd3995e768b4ccf0bb153e" },
|
||||||
"smart-splits.nvim": { "branch": "master", "commit": "f6fcb79527872e9330c554915af2ca511c388390" },
|
"smart-splits.nvim": { "branch": "master", "commit": "f6fcb79527872e9330c554915af2ca511c388390" },
|
||||||
|
"statuscol.nvim": { "branch": "main", "commit": "d954893262a57a92e46edd87de67e2b3fe72305e" },
|
||||||
"telescope.nvim": { "branch": "master", "commit": "d26b666b45e5dde23332e4bde1227677f2d92e31" },
|
"telescope.nvim": { "branch": "master", "commit": "d26b666b45e5dde23332e4bde1227677f2d92e31" },
|
||||||
"toggleterm.nvim": { "branch": "main", "commit": "193786e0371e3286d3bc9aa0079da1cd41beaa62" },
|
"toggleterm.nvim": { "branch": "main", "commit": "193786e0371e3286d3bc9aa0079da1cd41beaa62" },
|
||||||
"vim-illuminate": { "branch": "master", "commit": "305bf07b919ac526deb5193280379e2f8b599926" },
|
"vim-illuminate": { "branch": "master", "commit": "305bf07b919ac526deb5193280379e2f8b599926" },
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
return {
|
return {
|
||||||
"akinsho/bufferline.nvim",
|
"akinsho/bufferline.nvim",
|
||||||
event = "VeryLazy",
|
event = { "BufRead", "InsertEnter", "BufNewFile" },
|
||||||
config = function()
|
config = function()
|
||||||
local status_ok, bufferline = pcall(require, "bufferline")
|
local status_ok, bufferline = pcall(require, "bufferline")
|
||||||
if not status_ok then
|
if not status_ok then
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"nvim-lualine/lualine.nvim",
|
"nvim-lualine/lualine.nvim",
|
||||||
event = "BufWinEnter",
|
event = "insertEnter",
|
||||||
config = function()
|
config = function()
|
||||||
local hide_in_width = function()
|
local hide_in_width = function()
|
||||||
return vim.fn.winwidth(0) > 80
|
return vim.fn.winwidth(0) > 80
|
||||||
|
@ -198,7 +198,7 @@ return {
|
||||||
normal = {
|
normal = {
|
||||||
a = { fg = colors.black, bg = colors.skyblue_1 },
|
a = { fg = colors.black, bg = colors.skyblue_1 },
|
||||||
b = { fg = colors.white, bg = colors.grey },
|
b = { fg = colors.white, bg = colors.grey },
|
||||||
c = { fg = colors.white, bg = "#393f4a" },
|
c = { fg = colors.white, bg = "none" },
|
||||||
},
|
},
|
||||||
|
|
||||||
insert = {
|
insert = {
|
||||||
|
|
|
@ -1,105 +1,105 @@
|
||||||
return {
|
return {
|
||||||
-- "kevinhwang91/nvim-ufo",
|
"kevinhwang91/nvim-ufo",
|
||||||
-- dependencies = {
|
dependencies = {
|
||||||
-- "kevinhwang91/promise-async",
|
"kevinhwang91/promise-async",
|
||||||
-- {
|
{
|
||||||
-- "luukvbaal/statuscol.nvim",
|
"luukvbaal/statuscol.nvim",
|
||||||
-- config = function()
|
config = function()
|
||||||
-- local builtin = require("statuscol.builtin")
|
local builtin = require("statuscol.builtin")
|
||||||
-- require("statuscol").setup({
|
require("statuscol").setup({
|
||||||
-- -- relculright = true,
|
|
||||||
-- -- segments = {
|
|
||||||
-- -- { text = { builtin.foldfunc }, click = "v:lua.ScFa" },
|
|
||||||
-- -- { text = { "%s" }, click = "v:lua.ScSa" },
|
|
||||||
-- -- { text = { builtin.lnumfunc, " " }, click = "v:lua.ScLa" },
|
|
||||||
-- -- },
|
|
||||||
-- setopt = true,
|
|
||||||
-- relculright = true,
|
-- relculright = true,
|
||||||
-- segments = {
|
-- segments = {
|
||||||
|
-- { text = { builtin.foldfunc }, click = "v:lua.ScFa" },
|
||||||
-- { text = { "%s" }, click = "v:lua.ScSa" },
|
-- { text = { "%s" }, click = "v:lua.ScSa" },
|
||||||
-- {
|
|
||||||
-- text = { builtin.foldfunc },
|
|
||||||
-- condition = { builtin.not_empty, true, builtin.not_empty },
|
|
||||||
-- click = "v:lua.ScFa",
|
|
||||||
-- },
|
|
||||||
-- { text = { builtin.lnumfunc, " " }, click = "v:lua.ScLa" },
|
-- { text = { builtin.lnumfunc, " " }, click = "v:lua.ScLa" },
|
||||||
-- },
|
-- },
|
||||||
-- })
|
setopt = true,
|
||||||
-- end,
|
relculright = true,
|
||||||
-- },
|
segments = {
|
||||||
-- },
|
{ text = { "%s" }, click = "v:lua.ScSa" },
|
||||||
-- lazy = true,
|
{
|
||||||
-- -- event = "BufReadPost",
|
text = { builtin.foldfunc },
|
||||||
-- event = "BufWinEnter",
|
condition = { builtin.not_empty, true, builtin.not_empty },
|
||||||
-- config = function()
|
click = "v:lua.ScFa",
|
||||||
-- vim.o.foldcolumn = "1" -- '0' is not bad
|
},
|
||||||
-- vim.o.foldlevel = 99 -- Using ufo provider need a large value, feel free to decrease the value
|
{ text = { builtin.lnumfunc, " " }, click = "v:lua.ScLa" },
|
||||||
-- vim.o.foldlevelstart = 99
|
},
|
||||||
-- vim.o.foldenable = true
|
})
|
||||||
-- -- vim.o.fillchars = [[eob: ,fold: ,foldopen:,foldsep: ,foldclose:]]
|
end,
|
||||||
-- vim.o.fillchars = [[eob: ,fold: ,foldopen:,foldsep: ,foldclose:]]
|
},
|
||||||
--
|
},
|
||||||
-- -- these are "extra", change them as you like
|
lazy = true,
|
||||||
-- vim.keymap.set("n", "zR", require("ufo").openAllFolds)
|
-- event = "BufReadPost",
|
||||||
-- vim.keymap.set("n", "zM", require("ufo").closeAllFolds)
|
event = { "BufReadPost", "BufRead", "InsertEnter", "BufNewFile" },
|
||||||
-- vim.cmd("highlight FoldColumn guifg=" .. vim.fn.synIDattr(vim.fn.synIDtrans(vim.fn.hlID("Comment")), "fg"))
|
config = function()
|
||||||
-- -- Option 3: treesitter as a main provider instead
|
vim.o.foldcolumn = "1" -- '0' is not bad
|
||||||
-- -- Only depend on `nvim-treesitter/queries/filetype/folds.scm`,
|
vim.o.foldlevel = 99 -- Using ufo provider need a large value, feel free to decrease the value
|
||||||
-- -- performance and stability are better than `foldmethod=nvim_treesitter#foldexpr()`
|
vim.o.foldlevelstart = 99
|
||||||
-- require("ufo").setup({
|
vim.o.foldenable = true
|
||||||
-- -- provider_selector = function(bufnr, filetype, buftype)
|
-- vim.o.fillchars = [[eob: ,fold: ,foldopen:,foldsep: ,foldclose:]]
|
||||||
-- -- return { "treesitter", "indent" }
|
vim.o.fillchars = [[eob: ,fold: ,foldopen:,foldsep: ,foldclose:]]
|
||||||
-- -- end,
|
|
||||||
-- open_fold_hl_timeout = 150,
|
-- these are "extra", change them as you like
|
||||||
--
|
vim.keymap.set("n", "zR", require("ufo").openAllFolds)
|
||||||
-- preview = {
|
vim.keymap.set("n", "zM", require("ufo").closeAllFolds)
|
||||||
-- win_config = {
|
vim.cmd("highlight FoldColumn guifg=" .. vim.fn.synIDattr(vim.fn.synIDtrans(vim.fn.hlID("Comment")), "fg"))
|
||||||
-- border = { "", "─", "", "", "", "─", "", "" },
|
-- Option 3: treesitter as a main provider instead
|
||||||
-- -- winhighlight = 'Normal:Normal',
|
-- Only depend on `nvim-treesitter/queries/filetype/folds.scm`,
|
||||||
-- -- winhighlight = 'IncSearch:Folded',
|
-- performance and stability are better than `foldmethod=nvim_treesitter#foldexpr()`
|
||||||
-- winhighlight = "Normal:UfoPreviewNormal,FloatBorder:UfoPreviewBorder,CursorLine:UfoPreviewCursorLine",
|
require("ufo").setup({
|
||||||
-- winblend = 0,
|
-- provider_selector = function(bufnr, filetype, buftype)
|
||||||
-- },
|
|
||||||
-- mappings = {
|
|
||||||
-- scrollU = "<C-u>",
|
|
||||||
-- scrollD = "<C-d>",
|
|
||||||
-- jumpTop = "[",
|
|
||||||
-- jumpBot = "]",
|
|
||||||
-- },
|
|
||||||
-- },
|
|
||||||
-- provider_selector = function(_, filetype)
|
|
||||||
-- return { "treesitter", "indent" }
|
-- return { "treesitter", "indent" }
|
||||||
-- end,
|
-- end,
|
||||||
-- fold_virt_text_handler = function(virt_text, lnum, end_lnum, width, truncate)
|
open_fold_hl_timeout = 150,
|
||||||
-- local result = {}
|
|
||||||
-- local _end = end_lnum - 1
|
preview = {
|
||||||
-- local final_text = vim.trim(vim.api.nvim_buf_get_text(0, _end, 0, _end, -1, {})[1])
|
win_config = {
|
||||||
-- local suffix = final_text:format(end_lnum - lnum)
|
border = { "", "─", "", "", "", "─", "", "" },
|
||||||
-- local suffix_width = vim.fn.strdisplaywidth(suffix)
|
-- winhighlight = 'Normal:Normal',
|
||||||
-- local target_width = width - suffix_width
|
-- winhighlight = 'IncSearch:Folded',
|
||||||
-- local cur_width = 0
|
winhighlight = "Normal:UfoPreviewNormal,FloatBorder:UfoPreviewBorder,CursorLine:UfoPreviewCursorLine",
|
||||||
-- for _, chunk in ipairs(virt_text) do
|
winblend = 0,
|
||||||
-- local chunk_text = chunk[1]
|
},
|
||||||
-- local chunk_width = vim.fn.strdisplaywidth(chunk_text)
|
mappings = {
|
||||||
-- if target_width > cur_width + chunk_width then
|
scrollU = "<C-u>",
|
||||||
-- table.insert(result, chunk)
|
scrollD = "<C-d>",
|
||||||
-- else
|
jumpTop = "[",
|
||||||
-- chunk_text = truncate(chunk_text, target_width - cur_width)
|
jumpBot = "]",
|
||||||
-- local hl_group = chunk[2]
|
},
|
||||||
-- table.insert(result, { chunk_text, hl_group })
|
},
|
||||||
-- chunk_width = vim.fn.strdisplaywidth(chunk_text)
|
provider_selector = function(_, filetype)
|
||||||
-- -- str width returned from truncate() may less than 2nd argument, need padding
|
return { "treesitter", "indent" }
|
||||||
-- if cur_width + chunk_width < target_width then
|
end,
|
||||||
-- suffix = suffix .. (" "):rep(target_width - cur_width - chunk_width)
|
fold_virt_text_handler = function(virt_text, lnum, end_lnum, width, truncate)
|
||||||
-- end
|
local result = {}
|
||||||
-- break
|
local _end = end_lnum - 1
|
||||||
-- end
|
local final_text = vim.trim(vim.api.nvim_buf_get_text(0, _end, 0, _end, -1, {})[1])
|
||||||
-- cur_width = cur_width + chunk_width
|
local suffix = final_text:format(end_lnum - lnum)
|
||||||
-- end
|
local suffix_width = vim.fn.strdisplaywidth(suffix)
|
||||||
-- table.insert(result, { " ⋯ ", "NonText" })
|
local target_width = width - suffix_width
|
||||||
-- table.insert(result, { suffix, "TSPunctBracket" })
|
local cur_width = 0
|
||||||
-- return result
|
for _, chunk in ipairs(virt_text) do
|
||||||
-- end,
|
local chunk_text = chunk[1]
|
||||||
-- })
|
local chunk_width = vim.fn.strdisplaywidth(chunk_text)
|
||||||
-- end,
|
if target_width > cur_width + chunk_width then
|
||||||
|
table.insert(result, chunk)
|
||||||
|
else
|
||||||
|
chunk_text = truncate(chunk_text, target_width - cur_width)
|
||||||
|
local hl_group = chunk[2]
|
||||||
|
table.insert(result, { chunk_text, hl_group })
|
||||||
|
chunk_width = vim.fn.strdisplaywidth(chunk_text)
|
||||||
|
-- str width returned from truncate() may less than 2nd argument, need padding
|
||||||
|
if cur_width + chunk_width < target_width then
|
||||||
|
suffix = suffix .. (" "):rep(target_width - cur_width - chunk_width)
|
||||||
|
end
|
||||||
|
break
|
||||||
|
end
|
||||||
|
cur_width = cur_width + chunk_width
|
||||||
|
end
|
||||||
|
table.insert(result, { " ⋯ ", "NonText" })
|
||||||
|
table.insert(result, { suffix, "TSPunctBracket" })
|
||||||
|
return result
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end,
|
||||||
}
|
}
|
||||||
|
|
|
@ -260,7 +260,8 @@ return {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lukas-reineke/indent-blankline.nvim",
|
"lukas-reineke/indent-blankline.nvim",
|
||||||
event = "BufWinEnter",
|
-- event = "BufWinEnter",
|
||||||
|
event = { "BufRead", "InsertEnter", "BufNewFile" },
|
||||||
lazy = true,
|
lazy = true,
|
||||||
opts = {
|
opts = {
|
||||||
indent = {
|
indent = {
|
||||||
|
@ -321,7 +322,7 @@ return {
|
||||||
-- build = "npm install -g live-server",
|
-- build = "npm install -g live-server",
|
||||||
-- },
|
-- },
|
||||||
-- for multi cursor select
|
-- for multi cursor select
|
||||||
{ "mg979/vim-visual-multi", event = "BufWinEnter", lazy = true },
|
{ "mg979/vim-visual-multi", event = { "BufRead", "InsertEnter", "BufNewFile" }, lazy = true },
|
||||||
-- for auto close tag
|
-- for auto close tag
|
||||||
{
|
{
|
||||||
"windwp/nvim-ts-autotag",
|
"windwp/nvim-ts-autotag",
|
||||||
|
@ -348,7 +349,8 @@ return {
|
||||||
{
|
{
|
||||||
"NvChad/nvim-colorizer.lua",
|
"NvChad/nvim-colorizer.lua",
|
||||||
lazy = true,
|
lazy = true,
|
||||||
event = "BufWinEnter",
|
-- event = "BufWinEnter",
|
||||||
|
event = { "BufRead", "InsertEnter", "BufNewFile" },
|
||||||
opts = function()
|
opts = function()
|
||||||
require("user.colorizer")
|
require("user.colorizer")
|
||||||
end,
|
end,
|
||||||
|
@ -400,7 +402,7 @@ return {
|
||||||
{
|
{
|
||||||
"mrjones2014/smart-splits.nvim",
|
"mrjones2014/smart-splits.nvim",
|
||||||
lazy = true,
|
lazy = true,
|
||||||
-- event = "BufRead",
|
event = { "BufRead", "InsertEnter", "BufNewFile" },
|
||||||
config = function()
|
config = function()
|
||||||
require("user.smartspit")
|
require("user.smartspit")
|
||||||
end,
|
end,
|
||||||
|
@ -428,7 +430,8 @@ return {
|
||||||
{
|
{
|
||||||
"dstein64/nvim-scrollview",
|
"dstein64/nvim-scrollview",
|
||||||
lazy = true,
|
lazy = true,
|
||||||
event = "BufWinEnter",
|
-- event = "BufWinEnter",
|
||||||
|
event = { "BufRead", "InsertEnter", "BufNewFile" },
|
||||||
config = function()
|
config = function()
|
||||||
require("user.nvimscroll")
|
require("user.nvimscroll")
|
||||||
end,
|
end,
|
||||||
|
@ -454,7 +457,8 @@ return {
|
||||||
lazy = true,
|
lazy = true,
|
||||||
enabled = vim.fn.executable("git") == 1,
|
enabled = vim.fn.executable("git") == 1,
|
||||||
ft = "gitcommit",
|
ft = "gitcommit",
|
||||||
event = "BufWinEnter",
|
-- event = "BufWinEnter",
|
||||||
|
event = "BufRead",
|
||||||
config = function()
|
config = function()
|
||||||
require("user.gitsigns")
|
require("user.gitsigns")
|
||||||
end,
|
end,
|
||||||
|
|
|
@ -14,7 +14,8 @@ return {
|
||||||
"nvim-lualine/lualine.nvim",
|
"nvim-lualine/lualine.nvim",
|
||||||
lazy = true,
|
lazy = true,
|
||||||
-- dependencies = { "kyazdani42/nvim-web-devicons", opt = true },
|
-- dependencies = { "kyazdani42/nvim-web-devicons", opt = true },
|
||||||
event = "BufWinEnter",
|
-- event = "BufWinEnter",
|
||||||
|
event = { "BufRead", "BufNewFile" },
|
||||||
config = function()
|
config = function()
|
||||||
require("user.lualine")
|
require("user.lualine")
|
||||||
end,
|
end,
|
||||||
|
@ -54,7 +55,8 @@ return {
|
||||||
{
|
{
|
||||||
"akinsho/bufferline.nvim",
|
"akinsho/bufferline.nvim",
|
||||||
lazy = true,
|
lazy = true,
|
||||||
event = "BufWinEnter",
|
-- event = "BufWinEnter",
|
||||||
|
event = { "BufRead", "InsertEnter", "BufNewFile" },
|
||||||
config = function()
|
config = function()
|
||||||
require("user.bufferline")
|
require("user.bufferline")
|
||||||
end,
|
end,
|
||||||
|
|
|
@ -193,7 +193,7 @@ end
|
||||||
-- keymap("t", "<C-k>", "<C-\\><C-N><C-w>k", term_opts)
|
-- keymap("t", "<C-k>", "<C-\\><C-N><C-w>k", term_opts)
|
||||||
-- keymap("t", "<C-l>", "<C-\\><C-N><C-w>l", term_opts)
|
-- keymap("t", "<C-l>", "<C-\\><C-N><C-w>l", term_opts)
|
||||||
|
|
||||||
vim.keymap.set("n", "<C-Left>", require("smart-splits").resize_left)
|
-- vim.keymap.set("n", "<C-Left>", require("smart-splits").resize_left)
|
||||||
vim.keymap.set("n", "<C-Down>", require("smart-splits").resize_down)
|
-- vim.keymap.set("n", "<C-Down>", require("smart-splits").resize_down)
|
||||||
vim.keymap.set("n", "<C-Up", require("smart-splits").resize_up)
|
-- vim.keymap.set("n", "<C-Up", require("smart-splits").resize_up)
|
||||||
vim.keymap.set("n", "<C-Right>", require("smart-splits").resize_right)
|
-- vim.keymap.set("n", "<C-Right>", require("smart-splits").resize_right)
|
||||||
|
|
|
@ -12,7 +12,7 @@ smart_splits.setup({
|
||||||
ignored_buftypes = { "nofile" },
|
ignored_buftypes = { "nofile" },
|
||||||
})
|
})
|
||||||
|
|
||||||
-- vim.keymap.set("n", "<C-Left>", require("smart-splits").resize_left)
|
vim.keymap.set("n", "<C-Left>", require("smart-splits").resize_left)
|
||||||
-- vim.keymap.set("n", "<C-Down>", require("smart-splits").resize_down)
|
vim.keymap.set("n", "<C-Down>", require("smart-splits").resize_down)
|
||||||
-- vim.keymap.set("n", "<C-Up", require("smart-splits").resize_up)
|
vim.keymap.set("n", "<C-Up", require("smart-splits").resize_up)
|
||||||
-- vim.keymap.set("n", "<C-Right>", require("smart-splits").resize_right)
|
vim.keymap.set("n", "<C-Right>", require("smart-splits").resize_right)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue