indent chunk
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
-- Some commands that I want to execute in specific timing
|
-- Some commands that I want to execute in specific timing
|
||||||
vim.api.nvim_create_augroup("disable_comment_newline", { clear = true })
|
vim.api.nvim_create_augroup("disable_comment_newline", { clear = true })
|
||||||
vim.api.nvim_create_augroup("auto_wrap", { clear = true })
|
vim.api.nvim_create_augroup("auto_wrap", { clear = true })
|
||||||
@@ -6,11 +7,6 @@ vim.api.nvim_create_augroup("clear_last_search", { clear = true })
|
|||||||
|
|
||||||
vim.keymap.set("v", "K", "<Nop>", { silent = true })
|
vim.keymap.set("v", "K", "<Nop>", { silent = true })
|
||||||
|
|
||||||
-- NOTE: Set colors for hightlights for similar words
|
|
||||||
-- vim.api.nvim_set_hl(0, "LspReferenceRead", { fg = "#FF0000" })
|
|
||||||
-- vim.api.nvim_set_hl(0, "LspReferenceWrite", { fg = "#FF0000" })
|
|
||||||
-- vim.api.nvim_set_hl(0, "LspReferenceText", { fg = "#FF0000" })
|
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd("BufEnter", {
|
vim.api.nvim_create_autocmd("BufEnter", {
|
||||||
desc = "Disable auto insert comment newline",
|
desc = "Disable auto insert comment newline",
|
||||||
group = "disable_comment_newline",
|
group = "disable_comment_newline",
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ return function()
|
|||||||
mappings.v["<Tab>"] = { ">gv", desc = "Indent line" }
|
mappings.v["<Tab>"] = { ">gv", desc = "Indent line" }
|
||||||
mappings.v["<S-Tab>"] = { "<gv", desc = "Unindent line" }
|
mappings.v["<S-Tab>"] = { "<gv", desc = "Unindent line" }
|
||||||
|
|
||||||
|
|
||||||
-- Separate cut and delete motion
|
-- Separate cut and delete motion
|
||||||
-- for key, map in pairs {
|
-- for key, map in pairs {
|
||||||
-- ["d"] = { '"_d', desc = "Delete" },
|
-- ["d"] = { '"_d', desc = "Delete" },
|
||||||
|
|||||||
@@ -17,6 +17,11 @@ return {
|
|||||||
|
|
||||||
-- remove background of inlay hints
|
-- remove background of inlay hints
|
||||||
LspInlayHint = { fg = "#FF748B", bg = "none" },
|
LspInlayHint = { fg = "#FF748B", bg = "none" },
|
||||||
|
|
||||||
|
-- Highlight cho variable matching
|
||||||
|
LspReferenceText = { fg = "#FFFFFF", bg = "#FF6B35", bold = true }, -- Cam đậm + chữ trắng
|
||||||
|
LspReferenceRead = { fg = "#000000", bg = "#00E5FF", bold = true }, -- Xanh cyan + chữ đen
|
||||||
|
LspReferenceWrite = { fg = "#FFFFFF", bg = "#E91E63", bold = true }, -- Hồng đậm + chữ trắng
|
||||||
}
|
}
|
||||||
|
|
||||||
return hl
|
return hl
|
||||||
|
|||||||
@@ -1,25 +1,38 @@
|
|||||||
return {
|
return {
|
||||||
priority = 1,
|
indent = {
|
||||||
enabled = true, -- enable indent guides
|
priority = 1,
|
||||||
only_scope = true, -- only show indent guides of the scope
|
enabled = false, -- enable indent guides
|
||||||
only_current = false, -- only show indent guides in the current window
|
only_scope = false, -- only show indent guides of the scope
|
||||||
hl = "SnacksIndent", ---@type string|string[] hl groups for indent guides
|
only_current = false, -- only show indent guides in the current window
|
||||||
|
char = " ",
|
||||||
|
hl = "SnacksIndent", ---@type string|string[] hl groups for indent guides
|
||||||
|
},
|
||||||
|
|
||||||
animate = {
|
animate = {
|
||||||
enabled = vim.fn.has("nvim-0.10") == 1,
|
enabled = vim.fn.has("nvim-0.10") == 1,
|
||||||
style = "up_down",
|
style = "up_down",
|
||||||
easing = "linear",
|
easing = "linear",
|
||||||
duration = {
|
duration = {
|
||||||
step = 50, -- ms per step
|
step = 10, -- ms per step
|
||||||
total = 500, -- maximum duration
|
total = 100, -- maximum duration
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
scope = {
|
scope = {
|
||||||
enabled = true, -- enable highlighting the current scope
|
enabled = false, -- enable highlighting the current scope
|
||||||
priority = 200,
|
priority = 200,
|
||||||
char = "",
|
char = "",
|
||||||
underline = false, -- underline the start of the scope
|
underline = false, -- underline the start of the scope
|
||||||
only_current = false, -- only show scope in the current window
|
only_current = false, -- only show scope in the current window
|
||||||
hl = "SnacksIndentScope", ---@type string|string[] hl group for scopes
|
hl = "SnacksIndentScope", ---@type string|string[] hl group for scopes
|
||||||
},
|
},
|
||||||
|
chunk = {
|
||||||
|
enabled = true,
|
||||||
|
char = {
|
||||||
|
corner_top = "┏",
|
||||||
|
corner_bottom = "┗",
|
||||||
|
horizontal = "━",
|
||||||
|
vertical = "┃",
|
||||||
|
arrow = "▶",
|
||||||
|
},
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,5 +13,6 @@ return {
|
|||||||
-- Disabled development plugins
|
-- Disabled development plugins
|
||||||
{ "mfussenegger/nvim-dap", enabled = false },
|
{ "mfussenegger/nvim-dap", enabled = false },
|
||||||
{ "jay-babu/mason-nvim-dap.nvim", enabled = false },
|
{ "jay-babu/mason-nvim-dap.nvim", enabled = false },
|
||||||
|
{"brenton-leighton/multiple-cursors.nvim", enabled = false}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,12 +6,16 @@
|
|||||||
return {
|
return {
|
||||||
|
|
||||||
-- == Examples of Adding Plugins ==
|
-- == Examples of Adding Plugins ==
|
||||||
|
|
||||||
"andweeb/presence.nvim",
|
"andweeb/presence.nvim",
|
||||||
|
|
||||||
{
|
{
|
||||||
"ray-x/lsp_signature.nvim",
|
"ray-x/lsp_signature.nvim",
|
||||||
event = "BufRead",
|
event = "BufRead",
|
||||||
config = function() require("lsp_signature").setup() end,
|
opts = {
|
||||||
|
hint_enable = false,
|
||||||
|
doc_lines = 5,
|
||||||
|
},
|
||||||
|
-- config = function() require("lsp_signature").setup() end,
|
||||||
},
|
},
|
||||||
|
|
||||||
-- == Examples of Overriding Plugins ==
|
-- == Examples of Overriding Plugins ==
|
||||||
|
|||||||
Reference in New Issue
Block a user