recoding process pipline
This commit is contained in:
3
init.lua
3
init.lua
@@ -25,3 +25,6 @@ end
|
|||||||
|
|
||||||
require "lazy_setup"
|
require "lazy_setup"
|
||||||
require "polish"
|
require "polish"
|
||||||
|
|
||||||
|
vim.g.copilot_no_tab_map = true
|
||||||
|
|
||||||
|
|||||||
@@ -6,9 +6,12 @@
|
|||||||
"astrolsp": { "branch": "main", "commit": "414775e4b49a46bd7105cc5498ea7bb312359bf2" },
|
"astrolsp": { "branch": "main", "commit": "414775e4b49a46bd7105cc5498ea7bb312359bf2" },
|
||||||
"astrotheme": { "branch": "main", "commit": "0a3fb361f1e3d6a0cbb42e93f3d01fb5203b6752" },
|
"astrotheme": { "branch": "main", "commit": "0a3fb361f1e3d6a0cbb42e93f3d01fb5203b6752" },
|
||||||
"astroui": { "branch": "main", "commit": "4943abbd42674b43249313afe83b91065a40e4be" },
|
"astroui": { "branch": "main", "commit": "4943abbd42674b43249313afe83b91065a40e4be" },
|
||||||
|
"auto-save.nvim": { "branch": "main", "commit": "37c82fd548e3f5ffc2d9d020a65dac1044584f44" },
|
||||||
"bamboo.nvim": { "branch": "master", "commit": "56c924d0cbd3a37f9d0ea1235a189a3cccde1f44" },
|
"bamboo.nvim": { "branch": "master", "commit": "56c924d0cbd3a37f9d0ea1235a189a3cccde1f44" },
|
||||||
"better-escape.nvim": { "branch": "master", "commit": "199dcc2643dec5d8dbdab4ec672cf405224dcb3b" },
|
"better-escape.nvim": { "branch": "master", "commit": "199dcc2643dec5d8dbdab4ec672cf405224dcb3b" },
|
||||||
"blink.cmp": { "branch": "main", "commit": "bae4bae0eedd1fa55f34b685862e94a222d5c6f8" },
|
"blink.cmp": { "branch": "main", "commit": "bae4bae0eedd1fa55f34b685862e94a222d5c6f8" },
|
||||||
|
"copilot.vim": { "branch": "release", "commit": "f3d66c148aa60ad04c0a21d3e0a776459de09eb2" },
|
||||||
|
"flash.nvim": { "branch": "main", "commit": "3c942666f115e2811e959eabbdd361a025db8b63" },
|
||||||
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
|
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
|
||||||
"gitsigns.nvim": { "branch": "main", "commit": "7010000889bfb6c26065e0b0f7f1e6aa9163edd9" },
|
"gitsigns.nvim": { "branch": "main", "commit": "7010000889bfb6c26065e0b0f7f1e6aa9163edd9" },
|
||||||
"guess-indent.nvim": { "branch": "main", "commit": "84a4987ff36798c2fc1169cbaff67960aed9776f" },
|
"guess-indent.nvim": { "branch": "main", "commit": "84a4987ff36798c2fc1169cbaff67960aed9776f" },
|
||||||
@@ -22,6 +25,8 @@
|
|||||||
"mason-tool-installer.nvim": { "branch": "main", "commit": "517ef5994ef9d6b738322664d5fdd948f0fdeb46" },
|
"mason-tool-installer.nvim": { "branch": "main", "commit": "517ef5994ef9d6b738322664d5fdd948f0fdeb46" },
|
||||||
"mason.nvim": { "branch": "main", "commit": "197f6352c276bbc2d25541dfce00ec50d1a4e88f" },
|
"mason.nvim": { "branch": "main", "commit": "197f6352c276bbc2d25541dfce00ec50d1a4e88f" },
|
||||||
"mini.icons": { "branch": "main", "commit": "397ed3807e96b59709ef3292f0a3e253d5c1dc0a" },
|
"mini.icons": { "branch": "main", "commit": "397ed3807e96b59709ef3292f0a3e253d5c1dc0a" },
|
||||||
|
"mini.move": { "branch": "main", "commit": "819e90c3e113a3c826c3003ec07073f1e0677ea0" },
|
||||||
|
"multiple-cursors.nvim": { "branch": "main", "commit": "1ac15d047a4b265cc2389957bcc56ee561b29e02" },
|
||||||
"neo-tree.nvim": { "branch": "main", "commit": "cea666ef965884414b1b71f6b39a537f9238bdb2" },
|
"neo-tree.nvim": { "branch": "main", "commit": "cea666ef965884414b1b71f6b39a537f9238bdb2" },
|
||||||
"neoconf.nvim": { "branch": "main", "commit": "5aeca07ecb2f506d32e81eb82b0ed384ac2a53c5" },
|
"neoconf.nvim": { "branch": "main", "commit": "5aeca07ecb2f506d32e81eb82b0ed384ac2a53c5" },
|
||||||
"none-ls-extras.nvim": { "branch": "main", "commit": "924fe88a9983c7d90dbb31fc4e3129a583ea0a90" },
|
"none-ls-extras.nvim": { "branch": "main", "commit": "924fe88a9983c7d90dbb31fc4e3129a583ea0a90" },
|
||||||
@@ -33,10 +38,13 @@
|
|||||||
"nvim-highlight-colors": { "branch": "main", "commit": "1ce0a09bfc28c7274e649d20927cea51e440b65c" },
|
"nvim-highlight-colors": { "branch": "main", "commit": "1ce0a09bfc28c7274e649d20927cea51e440b65c" },
|
||||||
"nvim-lsp-endhints": { "branch": "main", "commit": "f977426055fc6b5c6449b416e08e2462f59b9317" },
|
"nvim-lsp-endhints": { "branch": "main", "commit": "f977426055fc6b5c6449b416e08e2462f59b9317" },
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "fa2662510d30b06168b6e2e6915518decde6bbac" },
|
"nvim-lspconfig": { "branch": "master", "commit": "fa2662510d30b06168b6e2e6915518decde6bbac" },
|
||||||
|
"nvim-spider": { "branch": "main", "commit": "53ba761cd40c1d683e8477d138ff03cd7e6e384a" },
|
||||||
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
|
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
|
||||||
|
"nvim-treesitter-context": { "branch": "master", "commit": "dca8726fea2c14e1ce6adbaa76a04816fbfaff61" },
|
||||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "71385f191ec06ffc60e80e6b0c9a9d5daed4824c" },
|
"nvim-treesitter-textobjects": { "branch": "master", "commit": "71385f191ec06ffc60e80e6b0c9a9d5daed4824c" },
|
||||||
"nvim-ts-autotag": { "branch": "main", "commit": "a1d526af391f6aebb25a8795cbc05351ed3620b5" },
|
"nvim-ts-autotag": { "branch": "main", "commit": "a1d526af391f6aebb25a8795cbc05351ed3620b5" },
|
||||||
"nvim-window-picker": { "branch": "main", "commit": "6382540b2ae5de6c793d4aa2e3fe6dbb518505ec" },
|
"nvim-window-picker": { "branch": "main", "commit": "6382540b2ae5de6c793d4aa2e3fe6dbb518505ec" },
|
||||||
|
"nvim_context_vt": { "branch": "master", "commit": "b69f642f7848fec8c056a7e2c9452e3dec84c2b5" },
|
||||||
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
|
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
|
||||||
"presence.nvim": { "branch": "main", "commit": "87c857a56b7703f976d3a5ef15967d80508df6e6" },
|
"presence.nvim": { "branch": "main", "commit": "87c857a56b7703f976d3a5ef15967d80508df6e6" },
|
||||||
"resession.nvim": { "branch": "master", "commit": "cc819b0489938d03e4f3532a583354f0287c015b" },
|
"resession.nvim": { "branch": "master", "commit": "cc819b0489938d03e4f3532a583354f0287c015b" },
|
||||||
@@ -46,5 +54,6 @@
|
|||||||
"toggleterm.nvim": { "branch": "main", "commit": "50ea089fc548917cc3cc16b46a8211833b9e3c7c" },
|
"toggleterm.nvim": { "branch": "main", "commit": "50ea089fc548917cc3cc16b46a8211833b9e3c7c" },
|
||||||
"ultimate-autopair.nvim": { "branch": "v0.6", "commit": "e65731d50c548c020f3961bb42071671f0fa923c" },
|
"ultimate-autopair.nvim": { "branch": "v0.6", "commit": "e65731d50c548c020f3961bb42071671f0fa923c" },
|
||||||
"vim-illuminate": { "branch": "master", "commit": "0d1e93684da00ab7c057410fecfc24f434698898" },
|
"vim-illuminate": { "branch": "master", "commit": "0d1e93684da00ab7c057410fecfc24f434698898" },
|
||||||
|
"vim-visual-multi": { "branch": "master", "commit": "a6975e7c1ee157615bbc80fc25e4392f71c344d4" },
|
||||||
"which-key.nvim": { "branch": "main", "commit": "fcbf4eea17cb299c02557d576f0d568878e354a4" }
|
"which-key.nvim": { "branch": "main", "commit": "fcbf4eea17cb299c02557d576f0d568878e354a4" }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,41 @@
|
|||||||
|
-- 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("auto_wrap", { clear = true })
|
||||||
|
vim.api.nvim_create_augroup("disable_suspend_with_c_z", { clear = true })
|
||||||
|
vim.api.nvim_create_augroup("clear_last_search", { clear = 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", {
|
||||||
|
desc = "Disable auto insert comment newline",
|
||||||
|
group = "disable_comment_newline",
|
||||||
|
command = "set formatoptions-=cro",
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd("FileType", {
|
||||||
|
desc = "Enable wrap and spell for text like documents",
|
||||||
|
group = "auto_wrap",
|
||||||
|
pattern = { "gitcommit", "markdown", "text", "plaintext" },
|
||||||
|
callback = function()
|
||||||
|
vim.opt_local.wrap = true
|
||||||
|
vim.opt_local.spell = true
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd("BufEnter", {
|
||||||
|
desc = "Remap <C-z> to nothing so that it doesn't suspend terminal",
|
||||||
|
group = "disable_suspend_with_c_z",
|
||||||
|
command = "nnoremap <c-z> <nop>",
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd("BufWinEnter", {
|
||||||
|
desc = "Clear last search pattern",
|
||||||
|
group = "clear_last_search",
|
||||||
|
pattern = "*",
|
||||||
|
command = "let @/ = ''",
|
||||||
|
})
|
||||||
|
|||||||
@@ -175,7 +175,6 @@ return {
|
|||||||
client.server_capabilities.workspaceSymbolProvider = false
|
client.server_capabilities.workspaceSymbolProvider = false
|
||||||
client.server_capabilities.monikerProvider = false
|
client.server_capabilities.monikerProvider = false
|
||||||
client.server_capabilities.semanticTokensProvider = false
|
client.server_capabilities.semanticTokensProvider = false
|
||||||
|
|
||||||
-- Tắt thêm các capabilities khác có thể có
|
-- Tắt thêm các capabilities khác có thể có
|
||||||
client.server_capabilities.referencesProvider = false
|
client.server_capabilities.referencesProvider = false
|
||||||
client.server_capabilities.implementationProvider = false
|
client.server_capabilities.implementationProvider = false
|
||||||
@@ -187,7 +186,6 @@ return {
|
|||||||
workspaceFolders = { supported = false },
|
workspaceFolders = { supported = false },
|
||||||
fileOperations = { supported = false }
|
fileOperations = { supported = false }
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Giữ lại diagnostics và inlay hints
|
-- Giữ lại diagnostics và inlay hints
|
||||||
-- client.server_capabilities.diagnosticProvider = true (mặc định)
|
-- client.server_capabilities.diagnosticProvider = true (mặc định)
|
||||||
-- client.server_capabilities.inlayHintProvider = true (mặc định)
|
-- client.server_capabilities.inlayHintProvider = true (mặc định)
|
||||||
|
|||||||
44
lua/plugins/auto-save.lua
Normal file
44
lua/plugins/auto-save.lua
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
-- Auto-save functionality
|
||||||
|
return {
|
||||||
|
"okuuva/auto-save.nvim",
|
||||||
|
event = { "User AstroFile", "InsertEnter" },
|
||||||
|
dependencies = {
|
||||||
|
"AstroNvim/astrocore",
|
||||||
|
opts = {
|
||||||
|
autocmds = {
|
||||||
|
autoformat_toggle = {
|
||||||
|
{
|
||||||
|
event = "User",
|
||||||
|
desc = "Disable autoformat before saving",
|
||||||
|
pattern = "AutoSaveWritePre",
|
||||||
|
callback = function()
|
||||||
|
vim.g.OLD_AUTOFORMAT = vim.g.autoformat
|
||||||
|
vim.g.autoformat = false
|
||||||
|
local old_autoformat_buffers = {}
|
||||||
|
for _, bufnr in ipairs(vim.api.nvim_list_bufs()) do
|
||||||
|
if vim.b[bufnr].autoformat then
|
||||||
|
table.insert(old_autoformat_buffers, bufnr)
|
||||||
|
vim.b[bufnr].autoformat = false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
vim.g.OLD_AUTOFORMAT_BUFFERS = old_autoformat_buffers
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
event = "User",
|
||||||
|
desc = "Re-enable autoformat after saving",
|
||||||
|
pattern = "AutoSaveWritePost",
|
||||||
|
callback = function()
|
||||||
|
vim.g.autoformat = vim.g.OLD_AUTOFORMAT
|
||||||
|
for _, bufnr in ipairs(vim.g.OLD_AUTOFORMAT_BUFFERS or {}) do
|
||||||
|
vim.b[bufnr].autoformat = true
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
opts = {},
|
||||||
|
}
|
||||||
|
|
||||||
52
lua/plugins/cmps.lua
Normal file
52
lua/plugins/cmps.lua
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"github/copilot.vim",
|
||||||
|
event = "BufRead",
|
||||||
|
config = function()
|
||||||
|
vim.api.nvim_set_keymap("i", "<C-f>", 'copilot#Accept("\\<CR>")', { expr = true, silent = true })
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"Saghen/blink.cmp",
|
||||||
|
opts = {
|
||||||
|
completion = {
|
||||||
|
list = { selection = { preselect = true, auto_insert = true } },
|
||||||
|
ghost_text = {
|
||||||
|
enabled = false,
|
||||||
|
},
|
||||||
|
menu = {
|
||||||
|
auto_show = function(ctx)
|
||||||
|
return ctx.mode ~= "cmdline"
|
||||||
|
end,
|
||||||
|
draw = {
|
||||||
|
columns = {
|
||||||
|
{ "kind_icon", "label", gap = 1 },
|
||||||
|
{ "kind" },
|
||||||
|
},
|
||||||
|
components = {
|
||||||
|
kind = {
|
||||||
|
highlight = function(ctx)
|
||||||
|
local _, hl, _ = require("mini.icons").get("lsp", ctx.kind)
|
||||||
|
return hl
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
accept = {
|
||||||
|
auto_brackets = { enabled = true },
|
||||||
|
},
|
||||||
|
documentation = {
|
||||||
|
auto_show = true,
|
||||||
|
auto_show_delay_ms = 0,
|
||||||
|
window = {
|
||||||
|
border = "rounded",
|
||||||
|
winhighlight = "Normal:NormalFloat,FloatBorder:FloatBorder,CursorLine:PmenuSel,Search:None",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,26 +1,56 @@
|
|||||||
return {
|
return {
|
||||||
before_init = function(_, c)
|
init_options = {
|
||||||
if not c.settings then
|
|
||||||
c.settings = {}
|
|
||||||
end
|
|
||||||
if not c.settings.python then
|
|
||||||
c.settings.python = {}
|
|
||||||
end
|
|
||||||
c.settings.python.pythonPath = vim.fn.exepath("python")
|
|
||||||
end,
|
|
||||||
settings = {
|
settings = {
|
||||||
pyright = {
|
lint = {
|
||||||
disableLanguageServices = false,
|
unfixable = { "F401" },
|
||||||
disableOrganizeImports = true,
|
select = {
|
||||||
analysis = {
|
"ALL",
|
||||||
-- diagnosticMode = "openFilesOnly",
|
},
|
||||||
typeCheckingMode = "standard",
|
ignore = {
|
||||||
autoSearchPath = true,
|
"ANN",
|
||||||
-- diagnosticSeverityOverrides = false,
|
"COM",
|
||||||
logLevel = "Trace",
|
"C90",
|
||||||
|
"DJ",
|
||||||
|
"EXE",
|
||||||
|
"T10",
|
||||||
|
"TID",
|
||||||
|
"D100",
|
||||||
|
"D101",
|
||||||
|
"D102",
|
||||||
|
"D103",
|
||||||
|
"D104",
|
||||||
|
"D105",
|
||||||
|
"D106",
|
||||||
|
"D107",
|
||||||
|
"D200",
|
||||||
|
"D205",
|
||||||
|
"D212",
|
||||||
|
"D400",
|
||||||
|
"D401",
|
||||||
|
"D415",
|
||||||
|
"E402",
|
||||||
|
"E501",
|
||||||
|
"ERA001",
|
||||||
|
"TRY003",
|
||||||
|
"TD002",
|
||||||
|
"TD003",
|
||||||
|
"T201",
|
||||||
|
"FIX002",
|
||||||
|
"N803",
|
||||||
|
"PD901",
|
||||||
|
-- "F401",
|
||||||
|
"I001",
|
||||||
|
"RET504",
|
||||||
|
"PLR2004",
|
||||||
|
"W291",
|
||||||
|
"PLW2901",
|
||||||
|
"D213",
|
||||||
|
"D202",
|
||||||
|
"PLR0402",
|
||||||
|
"EM101",
|
||||||
|
"TRY301",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
-- python = {
|
|
||||||
-- },
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
49
lua/plugins/contexts.lua
Normal file
49
lua/plugins/contexts.lua
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
-- Treesitter context
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"nvim-treesitter/nvim-treesitter-context",
|
||||||
|
event = "User AstroFile",
|
||||||
|
cmd = { "TSContext" },
|
||||||
|
opts = {
|
||||||
|
on_attach = function()
|
||||||
|
vim.api.nvim_set_hl(0, "TreesitterContext", { underline = true, sp = "Red", bg = "#1e1e3f" })
|
||||||
|
end,
|
||||||
|
max_lines = 2,
|
||||||
|
},
|
||||||
|
dependencies = {
|
||||||
|
"AstroNvim/astrocore",
|
||||||
|
opts = {
|
||||||
|
mappings = {
|
||||||
|
n = {
|
||||||
|
["<Leader>uT"] = {
|
||||||
|
"<cmd>TSContext toggle<CR>",
|
||||||
|
desc = "Toggle treesitter context",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Virtual text context
|
||||||
|
{
|
||||||
|
"andersevenrud/nvim_context_vt",
|
||||||
|
event = "User AstroFile",
|
||||||
|
cmd = { "NvimContextVtToggle" },
|
||||||
|
dependencies = {
|
||||||
|
"AstroNvim/astrocore",
|
||||||
|
opts = {
|
||||||
|
mappings = {
|
||||||
|
n = {
|
||||||
|
["<Leader>uv"] = {
|
||||||
|
function()
|
||||||
|
require("nvim_context_vt").toggle()
|
||||||
|
end,
|
||||||
|
desc = "Toggle virutal text context",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -20,6 +20,16 @@ return {
|
|||||||
-- install any other package
|
-- install any other package
|
||||||
"tree-sitter-cli",
|
"tree-sitter-cli",
|
||||||
},
|
},
|
||||||
|
ui = {
|
||||||
|
border = "single",
|
||||||
|
width = 0.8,
|
||||||
|
height = 0.9,
|
||||||
|
icons = {
|
||||||
|
package_installed = " ",
|
||||||
|
package_pending = " ",
|
||||||
|
package_uninstalled = " ",
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
127
lua/plugins/motions.lua
Normal file
127
lua/plugins/motions.lua
Normal file
@@ -0,0 +1,127 @@
|
|||||||
|
-- Motion, Navigation and Multiple Cursors
|
||||||
|
return {
|
||||||
|
-- Multi-cursors support
|
||||||
|
{
|
||||||
|
"brenton-leighton/multiple-cursors.nvim",
|
||||||
|
version = "*",
|
||||||
|
opts = {},
|
||||||
|
keys = {
|
||||||
|
{ "<C-Down>", "<Cmd>MultipleCursorsAddDown<CR>", mode = { "n", "i", "x" } },
|
||||||
|
{ "<C-Up>", "<Cmd>MultipleCursorsAddUp<CR>", mode = { "n", "i", "x" } },
|
||||||
|
{ "<A-LeftMouse>", "<Cmd>MultipleCursorsMouseAddDelete<CR>", mode = { "n", "i" } },
|
||||||
|
{ "<Leader>a", "<Cmd>MultipleCursorsAddMatches<CR>", mode = { "n", "x" } },
|
||||||
|
{ "<C-D>", "<Cmd>MultipleCursorsAddJumpNextMatch<CR>", mode = { "n", "x" } },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
-- Alternative multi-cursor plugin
|
||||||
|
{
|
||||||
|
"mg979/vim-visual-multi",
|
||||||
|
event = "BufRead",
|
||||||
|
},
|
||||||
|
-- Better move by word
|
||||||
|
{
|
||||||
|
"chrisgrieser/nvim-spider",
|
||||||
|
opts = {},
|
||||||
|
keys = {
|
||||||
|
{ "w", "<Cmd>lua require('spider').motion('w')<CR>", mode = { "n", "o", "x" }, desc = "Spider-w" },
|
||||||
|
{ "e", "<Cmd>lua require('spider').motion('e')<CR>", mode = { "n", "o", "x" }, desc = "Spider-e" },
|
||||||
|
{ "b", "<Cmd>lua require('spider').motion('b')<CR>", mode = { "n", "o", "x" }, desc = "Spider-b" },
|
||||||
|
{ "ge", "<Cmd>lua require('spider').motion('ge')<CR>", mode = { "n", "o", "x" }, desc = "Spider-ge" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Better character motion
|
||||||
|
{
|
||||||
|
"folke/flash.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
|
opts = {},
|
||||||
|
keys = {
|
||||||
|
{ "gj", function() require("flash").jump() end, mode = { "n", "x", "o" }, desc = "Flash" },
|
||||||
|
{
|
||||||
|
"gJ",
|
||||||
|
function() require("flash").treesitter() end,
|
||||||
|
mode = { "n", "x", "o" },
|
||||||
|
desc = "Flash Treesitter",
|
||||||
|
},
|
||||||
|
{ "r", function() require("flash").remote() end, mode = "o", desc = "Remote Flash" },
|
||||||
|
{
|
||||||
|
"R",
|
||||||
|
function() require("flash").treesitter_search() end,
|
||||||
|
mode = { "x", "o" },
|
||||||
|
desc = "Treesitter Search",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Move code block
|
||||||
|
{
|
||||||
|
"echasnovski/mini.move",
|
||||||
|
event = "BufRead",
|
||||||
|
config = function()
|
||||||
|
require("mini.move").setup {
|
||||||
|
mappings = {
|
||||||
|
left = "<M-a>",
|
||||||
|
right = "<M-d>",
|
||||||
|
down = "<M-s>",
|
||||||
|
up = "<M-w>",
|
||||||
|
line_left = "<M-a>",
|
||||||
|
line_right = "<M-d>",
|
||||||
|
line_down = "<M-s>",
|
||||||
|
line_up = "<M-w>",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"mrjones2014/smart-splits.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
|
opts = function(_, opts)
|
||||||
|
opts.ignored_filetypes = { "nofile", "quickfix", "qf", "prompt", "NvimTree" }
|
||||||
|
opts.ignored_buftypes = { "nofile" }
|
||||||
|
opts.log_level = "error"
|
||||||
|
end,
|
||||||
|
keys = {
|
||||||
|
{
|
||||||
|
"<C-h>",
|
||||||
|
function() require("smart-splits").move_cursor_left() end,
|
||||||
|
mode = { "n" },
|
||||||
|
desc = "Move to left split",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<C-l>",
|
||||||
|
function() require("smart-splits").move_cursor_right() end,
|
||||||
|
mode = { "n", "t" },
|
||||||
|
desc = "Move to right split",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<C-k>",
|
||||||
|
function() require("smart-splits").move_cursor_up() end,
|
||||||
|
mode = { "n" },
|
||||||
|
desc = "Move to above split",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<C-j>",
|
||||||
|
function() require("smart-splits").move_cursor_down() end,
|
||||||
|
mode = { "n" },
|
||||||
|
desc = "Move to below split",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<S-h>",
|
||||||
|
function() require("smart-splits").resize_left() end,
|
||||||
|
mode = { "n" },
|
||||||
|
desc = "Resize split left",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<S-l>",
|
||||||
|
function() require("smart-splits").resize_right() end,
|
||||||
|
mode = { "n" },
|
||||||
|
desc = "Resize split right",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Disabled motion plugins
|
||||||
|
{ "Wansmer/treesj", enabled = false },
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"ribru17/bamboo.nvim",
|
|
||||||
lazy = false,
|
|
||||||
priority = 1000,
|
|
||||||
config = function()
|
|
||||||
require("bamboo").setup {
|
|
||||||
integrations = { mini = true },
|
|
||||||
terminal_colors = false
|
|
||||||
}
|
|
||||||
require("bamboo").load()
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
43
lua/plugins/ui.lua
Normal file
43
lua/plugins/ui.lua
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"ribru17/bamboo.nvim",
|
||||||
|
lazy = false,
|
||||||
|
priority = 1000,
|
||||||
|
config = function()
|
||||||
|
require("bamboo").setup {
|
||||||
|
integrations = { mini = true },
|
||||||
|
terminal_colors = false
|
||||||
|
}
|
||||||
|
require("bamboo").load()
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"rebelot/heirline.nvim",
|
||||||
|
opts = function(_, opts)
|
||||||
|
opts.statusline = require("plugins.configs.ui.heirline").statusline
|
||||||
|
opts.winbar = require("plugins.configs.ui.heirline").winbar
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"folke/which-key.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
|
opts = {
|
||||||
|
-- your configuration comes here
|
||||||
|
-- or leave it empty to use the default settings
|
||||||
|
-- refer to the configuration section below
|
||||||
|
preset = "helix",
|
||||||
|
layout = {
|
||||||
|
height = { min = 6 },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
keys = {
|
||||||
|
{
|
||||||
|
"<leader>?",
|
||||||
|
function() require("which-key").show { global = false } end,
|
||||||
|
desc = "Buffer Local Keymaps (which-key)",
|
||||||
|
},
|
||||||
|
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -29,26 +29,24 @@ return {
|
|||||||
keys = {},
|
keys = {},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
scope = {
|
|
||||||
char = ""
|
|
||||||
},
|
|
||||||
indent = {
|
indent = {
|
||||||
priority = 1,
|
priority = 1,
|
||||||
enabled = true, -- enable indent guides
|
enabled = true, -- enable indent guides
|
||||||
char = "l",
|
-- char = "l",
|
||||||
only_scope = false, -- only show indent guides of the scope
|
only_scope = true, -- only show indent guides of the scope
|
||||||
only_current = false, -- only show indent guides in the current window
|
only_current = false, -- only show indent guides in the current window
|
||||||
hl = "SnacksIndent", ---@type string|string[] hl groups for indent guides
|
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 = "out",
|
style = "out",
|
||||||
easing = "linear",
|
easing = "linear",
|
||||||
duration = {
|
duration = {
|
||||||
step = 20, -- ms per step
|
step = 10, -- ms per step
|
||||||
total = 500, -- maximum duration
|
total = 500, -- maximum duration
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
---@class snacks.indent.Scope.Config: snacks.scope.Config
|
|
||||||
scope = {
|
scope = {
|
||||||
enabled = true, -- enable highlighting the current scope
|
enabled = true, -- enable highlighting the current scope
|
||||||
priority = 200,
|
priority = 200,
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
if true then return end -- WARN: REMOVE THIS LINE TO ACTIVATE THIS FILE
|
|
||||||
|
|
||||||
-- This will run last in the setup process.
|
-- This will run last in the setup process.
|
||||||
-- This is just pure lua so anything that doesn't
|
-- This is just pure lua so anything that doesn't
|
||||||
-- fit in the normal config locations above can go here
|
-- fit in the normal config locations above can go here
|
||||||
|
|
||||||
|
require"core.autocmds"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user