Compare commits
23
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bd160f982b | ||
|
|
356fa923b1 | ||
|
|
4e26404bd0 | ||
|
|
393bd9598b | ||
|
|
4d38ef5b31 | ||
|
|
f957a60c58 | ||
|
|
a55472780d | ||
|
|
016fbbfc44 | ||
|
|
3d2a4e07d9 | ||
|
|
1d92852c4a | ||
|
|
89ed1b189e | ||
|
|
d3e2ea602e | ||
|
|
e1429b3224 | ||
|
|
06e6665f52 | ||
|
|
2c15d04597 | ||
|
|
e6ea1320e0 | ||
|
|
3719efd378 | ||
|
|
e94a81a067 | ||
|
|
001836a880 | ||
|
|
b980e786bf | ||
|
|
eeda4c7b92 | ||
|
|
4d10724f93 | ||
|
|
3325c48cb2 |
No files matched your search
@@ -19,14 +19,15 @@ vim.cmd("set tabstop=4")
|
|||||||
vim.cmd("set shiftwidth=4")
|
vim.cmd("set shiftwidth=4")
|
||||||
vim.cmd("set noexpandtab") -- expandtab to use spaces instead of tabs
|
vim.cmd("set noexpandtab") -- expandtab to use spaces instead of tabs
|
||||||
vim.cmd("set wrap")
|
vim.cmd("set wrap")
|
||||||
|
-- vim.cmd("set cmdheight=0") -- HACK: hide command line while is not being used, no idea why this works without logic
|
||||||
vim.lsp.inlay_hint.enable(false)
|
vim.lsp.inlay_hint.enable(false)
|
||||||
vim.o.sessionoptions = "blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions"
|
vim.o.sessionoptions = "blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions"
|
||||||
|
|
||||||
-- ╭─────────────╮
|
-- ╭─────────────╮
|
||||||
-- │ Colorscheme │
|
-- │ Colorscheme │
|
||||||
-- ╰─────────────╯
|
-- ╰─────────────╯
|
||||||
vim.cmd("colorscheme komau") -- rose-pine, gruvbox, koda-{dark/light/moss/glade}, komau
|
vim.cmd("colorscheme gruvbox") -- rose-pine, gruvbox, koda-{dark/light/moss/glade}, komau
|
||||||
vim.o.background = "dark" -- "dark" or "light"
|
vim.o.background = "light" -- "dark" or "light"
|
||||||
|
|
||||||
-- ╭───────────────────╮
|
-- ╭───────────────────╮
|
||||||
-- │ Default clipboard │
|
-- │ Default clipboard │
|
||||||
@@ -37,8 +38,13 @@ vim.cmd("set clipboard=unnamedplus")
|
|||||||
-- │ Chars │
|
-- │ Chars │
|
||||||
-- ╰───────╯
|
-- ╰───────╯
|
||||||
vim.opt.fillchars = {
|
vim.opt.fillchars = {
|
||||||
horiz = "━",
|
horiz = "―", -- ⎯, ⎯
|
||||||
vert = "▎", -- │ ▎▍▌▋▊▉█
|
horizup = " ", -- ○
|
||||||
|
horizdown = " ",
|
||||||
|
vert = "▏", -- ▏│ ▎▍▌▋▊▉█
|
||||||
|
vertleft = "◗", -- ⏴
|
||||||
|
vertright = "◗", -- ⏵
|
||||||
|
verthoriz = "◗",
|
||||||
stl = " ",
|
stl = " ",
|
||||||
eob = " ",
|
eob = " ",
|
||||||
}
|
}
|
||||||
@@ -52,8 +58,21 @@ vim.fn.sign_define("DiagnosticSignWarn", { text = " ", texthl = "DiagnosticSi
|
|||||||
vim.fn.sign_define("DiagnosticSignInfo", { text = " ", texthl = "DiagnosticSignInfo" })
|
vim.fn.sign_define("DiagnosticSignInfo", { text = " ", texthl = "DiagnosticSignInfo" })
|
||||||
vim.fn.sign_define("DiagnosticSignHint", { text = "", texthl = "DiagnosticSignHint" })
|
vim.fn.sign_define("DiagnosticSignHint", { text = "", texthl = "DiagnosticSignHint" })
|
||||||
|
|
||||||
-- ╭─────────────────────╮
|
vim.diagnostic.config({
|
||||||
-- │ IA initial disables │
|
virtual_text = false, -- floating text next to code is too noisy
|
||||||
-- ╰─────────────────────╯
|
underline = true,
|
||||||
vim.b.copilot_enabled = false
|
signs = {
|
||||||
vim.g.copilot_enabled = false
|
text = {
|
||||||
|
[vim.diagnostic.severity.ERROR] = "",
|
||||||
|
[vim.diagnostic.severity.WARN] = "",
|
||||||
|
[vim.diagnostic.severity.INFO] = "",
|
||||||
|
[vim.diagnostic.severity.HINT] = "",
|
||||||
|
},
|
||||||
|
linehl = {
|
||||||
|
[vim.diagnostic.severity.ERROR] = "ErrorMsg",
|
||||||
|
},
|
||||||
|
numhl = {
|
||||||
|
[vim.diagnostic.severity.WARN] = "WarningMsg",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
+31
-31
@@ -1,44 +1,44 @@
|
|||||||
{
|
{
|
||||||
"aerial.nvim": { "branch": "master", "commit": "645d108a5242ec7b378cbe643eb6d04d4223f034" },
|
"aerial.nvim": { "branch": "master", "commit": "28fe6e822ae344544c379d60fcb13c9519a1f08a" },
|
||||||
"auto-session": { "branch": "main", "commit": "62437532b38495551410b3f377bcf4aaac574ebe" },
|
"auto-session": { "branch": "main", "commit": "c8e6139a2e52a38101fecaba6014d7dd75489044" },
|
||||||
"autoclose.nvim": { "branch": "main", "commit": "3f86702b54a861a17d7994b2e32a7c648cb12fb1" },
|
"autoclose.nvim": { "branch": "main", "commit": "27063904b2238ce7867e430885b6abcfb08357ea" },
|
||||||
"blink.cmp": { "branch": "main", "commit": "4b18c32adef2898f95cdef6192cbd5796c1a332d" },
|
"barbar.nvim": { "branch": "master", "commit": "53b5a2f34b68875898f0531032fbf090e3952ad7" },
|
||||||
|
"blink.cmp": { "branch": "main", "commit": "78336bc89ee5365633bcf754d93df01678b5c08f" },
|
||||||
"blueprints": { "branch": "main", "commit": "e5825c30464f98e77e8b5ffb88d59fd98df6c802" },
|
"blueprints": { "branch": "main", "commit": "e5825c30464f98e77e8b5ffb88d59fd98df6c802" },
|
||||||
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
|
"conform.nvim": { "branch": "master", "commit": "016802de402556da54c36bd7359b441266b01cdd" },
|
||||||
"codecompanion.nvim": { "branch": "main", "commit": "1913b5aa05745bca90d7912c76ed118f1744a620" },
|
"flash.nvim": { "branch": "main", "commit": "5f0f270fdc7c5b0c21d903ee85b9cb06f2ac636a" },
|
||||||
"conform.nvim": { "branch": "master", "commit": "086a40dc7ed8242c03be9f47fbcee68699cc2395" },
|
|
||||||
"copilot.vim": { "branch": "release", "commit": "a12fd5672110c8aa7e3c8419e28c96943ca179be" },
|
|
||||||
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
|
|
||||||
"flash.nvim": { "branch": "main", "commit": "fcea7ff883235d9024dc41e638f164a450c14ca2" },
|
|
||||||
"friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" },
|
"friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" },
|
||||||
"gitsigns.nvim": { "branch": "main", "commit": "7c4faa3540d0781a28588cafbd4dd187a28ac6e3" },
|
"gitsigns.nvim": { "branch": "main", "commit": "5be654f2232c10ddcad19c1607a67b6b4b78fc29" },
|
||||||
"grug-far.nvim": { "branch": "main", "commit": "ac52ee2d87399dfd7b0d59d5b1d2bbaf2a4028f1" },
|
"grug-far.nvim": { "branch": "main", "commit": "11595bf747edc270bce2069d1020502ad4ae56cf" },
|
||||||
"gruvbox.nvim": { "branch": "main", "commit": "334d5fd49fc8033f26408425366c66c6390c57bb" },
|
"gruvbox.nvim": { "branch": "main", "commit": "5f14f3426f34914b96d3595fa70a70b70329759a" },
|
||||||
"indent-blankline.nvim": { "branch": "master", "commit": "d28a3f70721c79e3c5f6693057ae929f3d9c0a03" },
|
"indent-blankline.nvim": { "branch": "master", "commit": "d28a3f70721c79e3c5f6693057ae929f3d9c0a03" },
|
||||||
"koda.nvim": { "branch": "main", "commit": "a560a332ccc1eb2caacb280a390213bb9f37b3cb" },
|
"komau.vim": { "branch": "master", "commit": "f7c7a00c0cbb67ed269b565a4ada47d96dce14f3" },
|
||||||
"komau.vim": { "branch": "master", "commit": "4666b5b15f4ab3f6f59f6aae13a394f9e8652767" },
|
|
||||||
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
|
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
|
||||||
"lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" },
|
"lualine.nvim": { "branch": "master", "commit": "221ce6b2d999187044529f49da6554a92f740a96" },
|
||||||
"mini.clue": { "branch": "main", "commit": "8b748316c5a5ab24ab18ccd5db9d62fe86fdddee" },
|
"mason.nvim": { "branch": "main", "commit": "2a6940af80375532e5e9e7c1f2fc6319a1b7a69d" },
|
||||||
"mini.icons": { "branch": "main", "commit": "5b9076dae1bfbe47ba4a14bc8b967cde0ab5d77e" },
|
"mini.clue": { "branch": "main", "commit": "4d506660e7030a15748ab073bebfe3ed03884000" },
|
||||||
"neo-tree.nvim": { "branch": "main", "commit": "9d6826582a3e8c84787bd7355df22a2812a1ad59" },
|
"mini.icons": { "branch": "main", "commit": "98faae31e9be1cc054ae63485e58ceb185efcad0" },
|
||||||
|
"neo-tree.nvim": { "branch": "main", "commit": "3352e998cb8343a4b8d82eca50c74aa17bc61f5e" },
|
||||||
"no-neck-pain.nvim": { "branch": "main", "commit": "434fed70b1ee553f8f27e6da7b3899f71b3c6f99" },
|
"no-neck-pain.nvim": { "branch": "main", "commit": "434fed70b1ee553f8f27e6da7b3899f71b3c6f99" },
|
||||||
"noice.nvim": { "branch": "main", "commit": "7bfd942445fb63089b59f97ca487d605e715f155" },
|
"noice.nvim": { "branch": "main", "commit": "7bfd942445fb63089b59f97ca487d605e715f155" },
|
||||||
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
|
"nui.nvim": { "branch": "main", "commit": "10fc361835c856ba4233ef5ea135b919bf3dce97" },
|
||||||
"nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" },
|
"nvim-colorizer.lua": { "branch": "master", "commit": "72a05f62c52241bc7441c820eb53946f92b2e6a4" },
|
||||||
|
"nvim-lint": { "branch": "master", "commit": "3d55c8f67c6ae5c15e1042571e107c7a3d5c5f4e" },
|
||||||
"nvim-scrollbar": { "branch": "main", "commit": "f8e87b96cd6362ef8579be456afee3b38fd7e2a8" },
|
"nvim-scrollbar": { "branch": "main", "commit": "f8e87b96cd6362ef8579be456afee3b38fd7e2a8" },
|
||||||
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
|
"nvim-treesitter": { "branch": "main", "commit": "857651fce37eba032ebe28f3a206283cdc65c45a" },
|
||||||
"nvim-treesitter-context": { "branch": "master", "commit": "529ee357b8c03d76ff71233afed68fd0f5fe10b1" },
|
"nvim-treesitter-context": { "branch": "master", "commit": "f3061339b8eaf9fda873600bc425b8d2d8502533" },
|
||||||
"nvim-ts-autotag": { "branch": "main", "commit": "8e1c0a389f20bf7f5b0dd0e00306c1247bda2595" },
|
"nvim-ts-autotag": { "branch": "main", "commit": "88c1453db4ba7dd24131086fe51fdf74e587d275" },
|
||||||
"nvim-web-devicons": { "branch": "master", "commit": "d7462543c9e366c0d196c7f67a945eaaf5d99414" },
|
"nvim-web-devicons": { "branch": "master", "commit": "2ae6958df7ced50baac5035cec0c15799eedfbf7" },
|
||||||
"nvim-window-picker": { "branch": "main", "commit": "6382540b2ae5de6c793d4aa2e3fe6dbb518505ec" },
|
"nvim-window-picker": { "branch": "main", "commit": "6382540b2ae5de6c793d4aa2e3fe6dbb518505ec" },
|
||||||
"overseer.nvim": { "branch": "master", "commit": "a2194447f4c5a1baf95139c5c7b539fa7b0d012f" },
|
"overseer.nvim": { "branch": "master", "commit": "a93d9f6d6defdac4bcd6d2c8ba988650e42e0a0e" },
|
||||||
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
|
"peek.nvim": { "branch": "master", "commit": "5820d937d5414baea5f586dc2a3d912a74636e5b" },
|
||||||
"smear-cursor.nvim": { "branch": "main", "commit": "c85bdbb25db096fbcf616bc4e1357bd61fe2c199" },
|
"plenary.nvim": { "branch": "master", "commit": "74b06c6c75e4eeb3108ec01852001636d85a932b" },
|
||||||
"snacks.nvim": { "branch": "main", "commit": "9912042fc8bca2209105526ac7534e9a0c2071b2" },
|
"scope.nvim": { "branch": "main", "commit": "228aabdb1b9cc74f0c0ccec88e79873857236e49" },
|
||||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c" },
|
"smear-cursor.nvim": { "branch": "main", "commit": "9e9378d6ee34bb3782e0e8c63d9ec8ca618b479b" },
|
||||||
|
"snacks.nvim": { "branch": "main", "commit": "882c996cf28183f4d63640de0b4c02ec886d01f2" },
|
||||||
|
"telescope-fzf-native.nvim": { "branch": "main", "commit": "b25b749b9db64d375d782094e2b9dce53ad53a40" },
|
||||||
"telescope-git-file-history.nvim": { "branch": "master", "commit": "4442114f9257e682e60a8cb6de14cf988e26055c" },
|
"telescope-git-file-history.nvim": { "branch": "master", "commit": "4442114f9257e682e60a8cb6de14cf988e26055c" },
|
||||||
"telescope.nvim": { "branch": "master", "commit": "5255aa27c422de944791318024167ad5d40aad20" },
|
"telescope.nvim": { "branch": "master", "commit": "40aedd8a68c78a656a10a8d62d80c54af59420fb" },
|
||||||
"todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" },
|
"todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" },
|
||||||
"trouble.nvim": { "branch": "main", "commit": "bd67efe408d4816e25e8491cc5ad4088e708a69a" },
|
"trouble.nvim": { "branch": "main", "commit": "bd67efe408d4816e25e8491cc5ad4088e708a69a" },
|
||||||
"undotree": { "branch": "master", "commit": "6fa6b57cda8459e1e4b2ca34df702f55242f4e4d" },
|
"undotree": { "branch": "master", "commit": "6fa6b57cda8459e1e4b2ca34df702f55242f4e4d" },
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
return {
|
||||||
|
|
||||||
|
cmd = { "cssmodules-language-server" },
|
||||||
|
filetypes = {
|
||||||
|
"typescript",
|
||||||
|
"typescriptreact",
|
||||||
|
"typescript.tsx",
|
||||||
|
"javascript",
|
||||||
|
"javascriptreact",
|
||||||
|
"javascript.jsx",
|
||||||
|
"js",
|
||||||
|
"jsx",
|
||||||
|
"ts",
|
||||||
|
"tsx",
|
||||||
|
},
|
||||||
|
root_markers = { ".git" },
|
||||||
|
settings = {},
|
||||||
|
init_options = {
|
||||||
|
camelCase = false,
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
return {
|
||||||
|
|
||||||
|
cmd = { "css-variables-language-server", "--stdio" },
|
||||||
|
filetypes = { "css", "scss", "less" },
|
||||||
|
root_markers = { ".git" },
|
||||||
|
settings = {
|
||||||
|
cssVariables = {
|
||||||
|
lookupFiles = { "**/*.less", "**/*.scss", "**/*.sass", "**/*.css" },
|
||||||
|
blacklistFolders = {
|
||||||
|
"**/.cache",
|
||||||
|
"**/.DS_Store",
|
||||||
|
"**/.git",
|
||||||
|
"**/.hg",
|
||||||
|
"**/.next",
|
||||||
|
"**/.svn",
|
||||||
|
"**/bower_components",
|
||||||
|
"**/CVS",
|
||||||
|
"**/dist",
|
||||||
|
"**/node_modules",
|
||||||
|
"**/tests",
|
||||||
|
"**/tmp",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
+3
-3
@@ -1,5 +1,5 @@
|
|||||||
return {
|
return {
|
||||||
cmd = { 'pylsp' },
|
cmd = { "pyright-langserver", "--stdio" },
|
||||||
filetypes = { 'python' },
|
filetypes = { "python", "py" },
|
||||||
root_markers = { 'pyproject.toml', 'setup.py', 'setup.cfg', 'requirements.txt', '.git' },
|
root_markers = { "pyproject.toml", "setup.py", "setup.cfg", "requirements.txt", ".git" },
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
return {
|
||||||
|
cmd = { "ruff", "server" },
|
||||||
|
filetypes = { "python" },
|
||||||
|
root_markers = { "pyproject.toml", "ruff.toml", ".ruff.toml", ".git" },
|
||||||
|
init_options = {
|
||||||
|
settings = {
|
||||||
|
-- Ruff language server settings go here
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
-- NOTE: NOT USED, currently using lint plugin
|
||||||
|
|
||||||
|
return {
|
||||||
|
cmd = { "stylelint-lsp", "--stdio" },
|
||||||
|
filetypes = { "css", "less", "scss", "sugarss", "wxss" },
|
||||||
|
root_markers = { 'stylelint.config.mjs', '.stylelintrc.json' }
|
||||||
|
}
|
||||||
+16
-10
@@ -1,12 +1,18 @@
|
|||||||
local autocmd = vim.api.nvim_create_autocmd
|
local autocmd = vim.api.nvim_create_autocmd
|
||||||
|
|
||||||
autocmd("ModeChanged", {
|
-- Replaced with config field, kept in case of issues
|
||||||
callback = function(opts)
|
-- autocmd("ModeChanged", {
|
||||||
require("lualine").refresh()
|
-- callback = function(opts)
|
||||||
end,
|
-- require("lualine").refresh()
|
||||||
})
|
-- end,
|
||||||
vim.api.nvim_create_autocmd("CursorMoved", {
|
-- })
|
||||||
callback = function(opts)
|
-- autocmd("CursorMoved", {
|
||||||
require("lualine").refresh()
|
-- callback = function(opts)
|
||||||
end,
|
-- require("lualine").refresh()
|
||||||
})
|
-- end,
|
||||||
|
-- })
|
||||||
|
-- vim.api.nvim_create_autocmd("BufWritePost", {
|
||||||
|
-- callback = function(event)
|
||||||
|
-- vim.notify(("Saved: %s"):format(vim.fn.fnamemodify(event.file, ":t")), vim.log.levels.INFO)
|
||||||
|
-- end,
|
||||||
|
-- })
|
||||||
+20
-16
@@ -1,19 +1,23 @@
|
|||||||
-- ╭─────╮
|
-- ╭─────╮
|
||||||
-- │ LSP │
|
-- │ LSP │
|
||||||
-- ╰─────╯
|
-- ╰─────╯
|
||||||
vim.lsp.enable('astro')
|
vim.lsp.enable("astro")
|
||||||
vim.lsp.enable('bashls')
|
vim.lsp.enable("bashls")
|
||||||
vim.lsp.enable('clangd')
|
vim.lsp.enable("clangd")
|
||||||
vim.lsp.enable('cssls')
|
vim.lsp.enable("cssls")
|
||||||
vim.lsp.enable('emmet')
|
vim.lsp.enable("emmet")
|
||||||
vim.lsp.enable('gopls')
|
vim.lsp.enable("gopls")
|
||||||
vim.lsp.enable('html')
|
vim.lsp.enable("html")
|
||||||
vim.lsp.enable('jdtls')
|
vim.lsp.enable("jdtls")
|
||||||
vim.lsp.enable('denols')
|
vim.lsp.enable("denols")
|
||||||
vim.lsp.enable('luals')
|
vim.lsp.enable("luals")
|
||||||
vim.lsp.enable('pyright')
|
vim.lsp.enable("pyright")
|
||||||
vim.lsp.enable('rust_analyzer')
|
-- vim.lsp.enable("ruff")
|
||||||
vim.lsp.enable('solargraph')
|
vim.lsp.enable("rust_analyzer")
|
||||||
vim.lsp.enable('ts_ls')
|
vim.lsp.enable("solargraph")
|
||||||
vim.lsp.enable('volar')
|
vim.lsp.enable("ts_ls")
|
||||||
vim.lsp.enable('jsonls')
|
vim.lsp.enable("volar")
|
||||||
|
vim.lsp.enable("jsonls")
|
||||||
|
vim.lsp.enable("stylelint")
|
||||||
|
vim.lsp.enable("css_variables")
|
||||||
|
vim.lsp.enable("css_modules")
|
||||||
+63
-27
@@ -1,20 +1,29 @@
|
|||||||
vim.g.mapleader = " "
|
vim.g.mapleader = " "
|
||||||
local map = vim.keymap.set
|
local map = vim.keymap.set
|
||||||
|
|
||||||
|
-- <leader> + :
|
||||||
|
-- B{uffers}
|
||||||
|
-- F{ind}
|
||||||
|
-- T{toggle}
|
||||||
|
-- G{it}
|
||||||
|
-- E{xplorer}
|
||||||
|
-- N{ew}
|
||||||
|
-- W{indow}
|
||||||
|
|
||||||
---- Bufferline ----
|
---- Bufferline ----
|
||||||
-- Not used but maybe in the future
|
-- Not used but maybe in the future
|
||||||
-- map("n", "bg", "<CMD>BufferLinePick<CR>")
|
-- map("n", "bg", "<CMD>BufferLinePick<CR>")
|
||||||
|
-- TODO: implement close others
|
||||||
-- map("n", "<leader>bpx", "<CMD>BufferLinePickClose<CR>")
|
-- map("n", "<leader>bpx", "<CMD>BufferLinePickClose<CR>")
|
||||||
map("n", "<leader>box", "<CMD>BufferLineCloseOthers<CR>")
|
-- map("n", "<leader>box", "<CMD>BufferLineCloseOthers<CR>")
|
||||||
map("n", "<Tab>", "<CMD>BufferLineCycleNext<CR>")
|
map("n", "<Tab>", "<CMD>BufferNext<CR>")
|
||||||
map("n", "<S-Tab>", "<CMD>BufferLineCyclePrev<CR>")
|
map("n", "<S-Tab>", "<CMD>BufferPrevious<CR>")
|
||||||
map("n", "<leader>bsd", "<CMD>BufferLineSortByDirectory<CR>")
|
map("n", "<leader>bsd", "<CMD>BufferOrderByDirectory<CR>")
|
||||||
map("n", "<leader>bse", "<CMD>BufferLineSortByExtension<CR>")
|
map("n", "<leader>bse", "<CMD>BufferOrderByLanguage<CR>")
|
||||||
map("n", "<leader>bsr", "<CMD>BufferLineSortByRelativeDirectory<CR>")
|
map("n", "<leader>bsb", "<CMD>BufferOrderByBufferNumber<CR>")
|
||||||
map("n", "<leader>bst", "<CMD>BufferLineSortByTabs<CR>")
|
|
||||||
-- buffers
|
-- buffers
|
||||||
map("n", "<S-h>", "<cmd>BufferLineMovePrev<cr>", { desc = "Move buffer to left" })
|
map("n", "<S-h>", "<cmd>BufferMovePrevious<cr>", { desc = "Move buffer to left" })
|
||||||
map("n", "<S-l>", "<cmd>BufferLineMoveNext<cr>", { desc = "Move buffer to right" })
|
map("n", "<S-l>", "<cmd>BufferMoveNext<cr>", { desc = "Move buffer to right" })
|
||||||
map("n", "[b", "<cmd>bprevious<cr>", { desc = "Prev Buffer" })
|
map("n", "[b", "<cmd>bprevious<cr>", { desc = "Prev Buffer" })
|
||||||
map("n", "]b", "<cmd>bnext<cr>", { desc = "Next Buffer" })
|
map("n", "]b", "<cmd>bnext<cr>", { desc = "Next Buffer" })
|
||||||
map("n", "<leader>bd", function()
|
map("n", "<leader>bd", function()
|
||||||
@@ -39,6 +48,8 @@ map("n", "<leader>ct", "<cmd>lua require('blueprints').createFromTemplateTelesco
|
|||||||
|
|
||||||
---- Git ----
|
---- Git ----
|
||||||
map("n", "<leader>gb", "<CMD>Gitsigns blame<CR>", { desc = "Git blame" })
|
map("n", "<leader>gb", "<CMD>Gitsigns blame<CR>", { desc = "Git blame" })
|
||||||
|
map("n", "<leader>gr", "<CMD>Gitsigns reset_hunk<CR>", { desc = "Git next change" })
|
||||||
|
map("n", "<leader>ga", "<CMD>Gitsigns stage_hunk<CR>", { desc = "Git next change" })
|
||||||
map("n", "]g", "<CMD>Gitsigns next_hunk<CR>", { desc = "Git next change" })
|
map("n", "]g", "<CMD>Gitsigns next_hunk<CR>", { desc = "Git next change" })
|
||||||
map("n", "[g", "<CMD>Gitsigns prev_hunk<CR>", { desc = "Git prev change" })
|
map("n", "[g", "<CMD>Gitsigns prev_hunk<CR>", { desc = "Git prev change" })
|
||||||
map("n", "<leader>gdo", "<CMD>DiffviewOpen<CR>", { desc = "Git diff view open" })
|
map("n", "<leader>gdo", "<CMD>DiffviewOpen<CR>", { desc = "Git diff view open" })
|
||||||
@@ -46,6 +57,13 @@ map("n", "<leader>gdx", "<CMD>DiffviewClose<CR>", { desc = "Git diff view close"
|
|||||||
map("n", "<leader>gh", "<CMD>Gitsigns preview_hunk_inline<CR>", { desc = "Git preview hunk inline" })
|
map("n", "<leader>gh", "<CMD>Gitsigns preview_hunk_inline<CR>", { desc = "Git preview hunk inline" })
|
||||||
map("n", "<leader>gtb", "<CMD>Gitsigns toggle_current_line_blame<CR>", { desc = "Git toggle line blame" })
|
map("n", "<leader>gtb", "<CMD>Gitsigns toggle_current_line_blame<CR>", { desc = "Git toggle line blame" })
|
||||||
map("n", "<leader>gtd", "<CMD>Gitsigns toggle_deleted<CR>", { desc = "Git toggle deleted" })
|
map("n", "<leader>gtd", "<CMD>Gitsigns toggle_deleted<CR>", { desc = "Git toggle deleted" })
|
||||||
|
map("n", "<leader>gco", "<CMD>GitConflictChooseOurs<CR>", { desc = "Git conflict resolve ours" })
|
||||||
|
map("n", "<leader>gct", "<CMD>GitConflictChooseTheirs<CR>", { desc = "Git conflict resolve theirs" })
|
||||||
|
map("n", "<leader>gcb", "<CMD>GitConflictChooseBoth<CR>", { desc = "Git conflict resolve both" })
|
||||||
|
map("n", "<leader>gcn", "<CMD>GitConflictChooseNone<CR>", { desc = "Git conflict resolve none" })
|
||||||
|
map("n", "<leader>gcq", "<CMD>GitConflictListQf<CR>", { desc = "Git conflicts to quickfix" })
|
||||||
|
map("n", "]c", "<CMD>GitConflictNextConflict<CR>", { desc = "Git conflicts find next" })
|
||||||
|
map("n", "[c", "<CMD>GitConflictPrevConflict<CR>", { desc = "Git conflicts find prev" })
|
||||||
|
|
||||||
-- lazygit
|
-- lazygit
|
||||||
map("n", "<leader>gg", function()
|
map("n", "<leader>gg", function()
|
||||||
@@ -140,17 +158,29 @@ map("n", "<leader>fh", "<cmd> Telescope help_tags <CR>", { desc = "Help page" })
|
|||||||
map("n", "<leader>fo", "<cmd> Telescope oldfiles <CR>", { desc = "Fild old files" })
|
map("n", "<leader>fo", "<cmd> Telescope oldfiles <CR>", { desc = "Fild old files" })
|
||||||
map("n", "<leader>fz", "<cmd> Telescope current_buffer_fuzzy_find <CR>", { desc = "Find in current buffer" })
|
map("n", "<leader>fz", "<cmd> Telescope current_buffer_fuzzy_find <CR>", { desc = "Find in current buffer" })
|
||||||
map("n", "<C-/>", "<cmd> Telescope current_buffer_fuzzy_find <CR>", { desc = "Find in current buffer" })
|
map("n", "<C-/>", "<cmd> Telescope current_buffer_fuzzy_find <CR>", { desc = "Find in current buffer" })
|
||||||
|
map("n", "<leader>ft", function()
|
||||||
|
Snacks.picker("todo_comments")
|
||||||
|
end, { desc = "Help page" })
|
||||||
|
|
||||||
|
-- Flash search (better "f")
|
||||||
|
map({ "n", "x", "o" }, "s", function()
|
||||||
|
require("flash").jump()
|
||||||
|
end, { desc = "Flash jump in file" })
|
||||||
|
map({ "n", "x", "o" }, "S", function()
|
||||||
|
require("flash").treesitter()
|
||||||
|
end, { desc = "Flash jump in file" })
|
||||||
|
|
||||||
---- Replace ----
|
---- Replace ----
|
||||||
map("n", "<leader>/", "<cmd> GrugFar <CR>", { desc = "Find in current buffer" })
|
map("n", "<leader>/", "<cmd> GrugFar <CR>", { desc = "Find and replace" })
|
||||||
|
map("n", "<leader>fr", "<cmd> GrugFar <CR>", { desc = "Find and replace" })
|
||||||
|
|
||||||
-----------------------------------------------------------
|
-----------------------------------------------------------
|
||||||
|
|
||||||
-- better up/down
|
-- better up/down
|
||||||
-- map({ "n", "x" }, "j", "v:count == 0 ? 'gj' : 'j'", { desc = "Down", expr = true, silent = true })
|
map({ "n", "x" }, "j", "v:count == 0 ? 'gj' : 'j'", { desc = "Down", expr = true, silent = true })
|
||||||
-- map({ "n", "x" }, "<Down>", "v:count == 0 ? 'gj' : 'j'", { desc = "Down", expr = true, silent = true })
|
map({ "n", "x" }, "<Down>", "v:count == 0 ? 'gj' : 'j'", { desc = "Down", expr = true, silent = true })
|
||||||
-- map({ "n", "x" }, "k", "v:count == 0 ? 'gk' : 'k'", { desc = "Up", expr = true, silent = true })
|
map({ "n", "x" }, "k", "v:count == 0 ? 'gk' : 'k'", { desc = "Up", expr = true, silent = true })
|
||||||
-- map({ "n", "x" }, "<Up>", "v:count == 0 ? 'gk' : 'k'", { desc = "Up", expr = true, silent = true })
|
map({ "n", "x" }, "<Up>", "v:count == 0 ? 'gk' : 'k'", { desc = "Up", expr = true, silent = true })
|
||||||
|
|
||||||
---- Movement ----
|
---- Movement ----
|
||||||
|
|
||||||
@@ -222,6 +252,7 @@ map("n", "]w", diagnostic_goto(true, "WARN"), { desc = "Next Warning" })
|
|||||||
map("n", "[w", diagnostic_goto(false, "WARN"), { desc = "Prev Warning" })
|
map("n", "[w", diagnostic_goto(false, "WARN"), { desc = "Prev Warning" })
|
||||||
|
|
||||||
---- Toggle options ----
|
---- Toggle options ----
|
||||||
|
map("n", "<leader>ts", "<cmd>ScrollbarToggle<CR>", { desc = "Toggle scrollbar" })
|
||||||
map("n", "<leader>um", function()
|
map("n", "<leader>um", function()
|
||||||
require("monkey-alert").enable() -- does not toggle :O
|
require("monkey-alert").enable() -- does not toggle :O
|
||||||
end, { desc = "Toggle monkey alert" })
|
end, { desc = "Toggle monkey alert" })
|
||||||
@@ -274,10 +305,6 @@ map("n", "<leader>ua", "<cmd>AerialToggle<cr>", { desc = "Toggle aerial view" })
|
|||||||
map("n", "<leader>ui", vim.show_pos, { desc = "Inspect Pos" })
|
map("n", "<leader>ui", vim.show_pos, { desc = "Inspect Pos" })
|
||||||
map("n", "<leader>uI", "<cmd>InspectTree<cr>", { desc = "Inspect Tree" })
|
map("n", "<leader>uI", "<cmd>InspectTree<cr>", { desc = "Inspect Tree" })
|
||||||
|
|
||||||
---- Terminal ----
|
|
||||||
|
|
||||||
map("n", "<leader>nz", "<cmd>terminal<CR>", { desc = "Open new terminal" })
|
|
||||||
|
|
||||||
-- Terminal Mappings
|
-- Terminal Mappings
|
||||||
map("t", "<esc><esc>", "<c-\\><c-n>", { desc = "Enter Normal Mode" })
|
map("t", "<esc><esc>", "<c-\\><c-n>", { desc = "Enter Normal Mode" })
|
||||||
map("t", "<C-h>", "<cmd>wincmd h<cr>", { desc = "Go to Left Window" })
|
map("t", "<C-h>", "<cmd>wincmd h<cr>", { desc = "Go to Left Window" })
|
||||||
@@ -286,6 +313,12 @@ map("t", "<C-k>", "<cmd>wincmd k<cr>", { desc = "Go to Upper Window" })
|
|||||||
map("t", "<C-l>", "<cmd>wincmd l<cr>", { desc = "Go to Right Window" })
|
map("t", "<C-l>", "<cmd>wincmd l<cr>", { desc = "Go to Right Window" })
|
||||||
map("t", "<C-/>", "<cmd>close<cr>", { desc = "Hide Terminal" })
|
map("t", "<C-/>", "<cmd>close<cr>", { desc = "Hide Terminal" })
|
||||||
map("t", "<c-_>", "<cmd>close<cr>", { desc = "which_key_ignore" })
|
map("t", "<c-_>", "<cmd>close<cr>", { desc = "which_key_ignore" })
|
||||||
|
map("t", "<C-t>", function()
|
||||||
|
Snacks.terminal.open()
|
||||||
|
end, { desc = "Open new terminal" })
|
||||||
|
map("n", "<leader>tt", function()
|
||||||
|
Snacks.terminal()
|
||||||
|
end, { desc = "Toggle terminal" })
|
||||||
|
|
||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
|
|
||||||
@@ -305,16 +338,16 @@ map("n", "<C-j>", "<C-w>j", { desc = "Go to Lower Window", remap = true })
|
|||||||
map("n", "<C-k>", "<C-w>k", { desc = "Go to Upper Window", remap = true })
|
map("n", "<C-k>", "<C-w>k", { desc = "Go to Upper Window", remap = true })
|
||||||
map("n", "<C-l>", "<C-w>l", { desc = "Go to Right Window", remap = true })
|
map("n", "<C-l>", "<C-w>l", { desc = "Go to Right Window", remap = true })
|
||||||
|
|
||||||
map("n", "<C-A-k>", "<cmd>resize +2<cr>", { desc = "Increase Window Height" })
|
map("n", "<C-A-k>", "<cmd>resize +8<cr>", { desc = "Increase Window Height" })
|
||||||
map("n", "<C-A-j>", "<cmd>resize -2<cr>", { desc = "Decrease Window Height" })
|
map("n", "<C-A-j>", "<cmd>resize -8<cr>", { desc = "Decrease Window Height" })
|
||||||
map("n", "<C-A-h>", "<cmd>vertical resize -2<cr>", { desc = "Decrease Window Width" })
|
map("n", "<C-A-h>", "<cmd>vertical resize -8<cr>", { desc = "Decrease Window Width" })
|
||||||
map("n", "<C-A-l>", "<cmd>vertical resize +2<cr>", { desc = "Increase Window Width" })
|
map("n", "<C-A-l>", "<cmd>vertical resize +8<cr>", { desc = "Increase Window Width" })
|
||||||
|
|
||||||
-- Resize window using <ctrl> arrow keys
|
-- Resize window using <ctrl> arrow keys
|
||||||
map("n", "<C-Up>", "<cmd>resize +2<cr>", { desc = "Increase Window Height" })
|
map("n", "<C-Up>", "<cmd>resize +8<cr>", { desc = "Increase Window Height" })
|
||||||
map("n", "<C-Down>", "<cmd>resize -2<cr>", { desc = "Decrease Window Height" })
|
map("n", "<C-Down>", "<cmd>resize -8<cr>", { desc = "Decrease Window Height" })
|
||||||
map("n", "<C-Left>", "<cmd>vertical resize -2<cr>", { desc = "Decrease Window Width" })
|
map("n", "<C-Left>", "<cmd>vertical resize -8<cr>", { desc = "Decrease Window Width" })
|
||||||
map("n", "<C-Right>", "<cmd>vertical resize +2<cr>", { desc = "Increase Window Width" })
|
map("n", "<C-Right>", "<cmd>vertical resize +8<cr>", { desc = "Increase Window Width" })
|
||||||
|
|
||||||
-- quit
|
-- quit
|
||||||
map("n", "<leader>qq", "<cmd>qa<cr>", { desc = "Quit All" })
|
map("n", "<leader>qq", "<cmd>qa<cr>", { desc = "Quit All" })
|
||||||
@@ -324,9 +357,12 @@ map("n", "<leader>qq", "<cmd>qa<cr>", { desc = "Quit All" })
|
|||||||
---- Utils ----
|
---- Utils ----
|
||||||
|
|
||||||
-- undotree
|
-- undotree
|
||||||
map("n", "<leader>ut", "<cmd>UndotreeToggle<cr>", { desc = "Toggle undotree" })
|
map("n", "<leader>tu", "<cmd>UndotreeToggle<cr>", { desc = "Toggle undotree" })
|
||||||
|
|
||||||
-- aerial
|
-- aerial
|
||||||
map("n", "<leader>a", "<cmd>AerialToggle<cr>", { desc = "Toggle aerial view" })
|
map("n", "<leader>a", "<cmd>AerialToggle<cr>", { desc = "Toggle aerial view" })
|
||||||
map("n", "]a", "<cmd>AerialNext<cr>", { desc = "Next aerial view" })
|
map("n", "]a", "<cmd>AerialNext<cr>", { desc = "Next aerial view" })
|
||||||
map("n", "[a", "<cmd>AerialPrev<cr>", { desc = "Prev aerial view" })
|
map("n", "[a", "<cmd>AerialPrev<cr>", { desc = "Prev aerial view" })
|
||||||
|
|
||||||
|
-- colorizer
|
||||||
|
map("n", "tc", "<cmd>ColorizerToggle<cr>", { desc = "Toggle Colorizer" })
|
||||||
@@ -5,11 +5,13 @@ return {
|
|||||||
-- │ Code parse │
|
-- │ Code parse │
|
||||||
{
|
{
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
branch = "main",
|
||||||
|
build = ":TSUpdate",
|
||||||
opts = function()
|
opts = function()
|
||||||
return require("plugins.opts.treesitter")
|
return require("plugins.opts.treesitter")
|
||||||
end,
|
end,
|
||||||
config = function(_, opts)
|
config = function(_, opts)
|
||||||
require("nvim-treesitter.configs").setup(opts)
|
require("nvim-treesitter.config").setup(opts)
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -25,42 +27,9 @@ return {
|
|||||||
"saghen/blink.cmp",
|
"saghen/blink.cmp",
|
||||||
dependencies = { "rafamadriz/friendly-snippets" },
|
dependencies = { "rafamadriz/friendly-snippets" },
|
||||||
version = "1.*",
|
version = "1.*",
|
||||||
-- build = "cargo build --release",
|
opts = function()
|
||||||
opts = {
|
return require("plugins.opts.blink")
|
||||||
-- C-e: Hide menu
|
end,
|
||||||
-- C-k: Toggle signature help (if signature.enabled = true)
|
|
||||||
keymap = {
|
|
||||||
preset = "default",
|
|
||||||
["<Enter>"] = { "accept", "fallback" },
|
|
||||||
["<Tab>"] = { "select_next", "fallback" },
|
|
||||||
["<S-Tab>"] = { "select_prev", "fallback" },
|
|
||||||
},
|
|
||||||
appearance = {
|
|
||||||
nerd_font_variant = "mono",
|
|
||||||
},
|
|
||||||
completion = {
|
|
||||||
accept = { auto_brackets = { enabled = false }, },
|
|
||||||
list = { selection = { preselect = false, auto_insert = true } },
|
|
||||||
menu = {
|
|
||||||
auto_show = true,
|
|
||||||
|
|
||||||
-- nvim-cmp style menu
|
|
||||||
draw = {
|
|
||||||
columns = {
|
|
||||||
{ "label", "label_description", gap = 1 },
|
|
||||||
{ "kind_icon", "kind" }
|
|
||||||
},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Show documentation when selecting a completion item
|
|
||||||
documentation = { auto_show = true, auto_show_delay_ms = 500 },
|
|
||||||
-- Display a preview of the selected item on the current line
|
|
||||||
ghost_text = { enabled = true },
|
|
||||||
},
|
|
||||||
sources = {},
|
|
||||||
fuzzy = { implementation = "prefer_rust_with_warning" },
|
|
||||||
},
|
|
||||||
opts_extend = { "sources.default" },
|
opts_extend = { "sources.default" },
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -79,7 +48,7 @@ return {
|
|||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
'm4xshen/autoclose.nvim',
|
"m4xshen/autoclose.nvim",
|
||||||
opts = function()
|
opts = function()
|
||||||
return require("plugins.opts.autoclose")
|
return require("plugins.opts.autoclose")
|
||||||
end,
|
end,
|
||||||
|
|||||||
+20
-6
@@ -3,14 +3,26 @@
|
|||||||
-- ╰─────────╯
|
-- ╰─────────╯
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"akinsho/bufferline.nvim",
|
"romgrk/barbar.nvim",
|
||||||
version = "*",
|
dependencies = {
|
||||||
dependencies = "nvim-tree/nvim-web-devicons",
|
"lewis6991/gitsigns.nvim", -- OPTIONAL: for git status
|
||||||
opts = function()
|
"nvim-tree/nvim-web-devicons", -- OPTIONAL: for file icons
|
||||||
return require("plugins.opts.bufferline")
|
},
|
||||||
|
init = function()
|
||||||
|
vim.g.barbar_auto_setup = false
|
||||||
end,
|
end,
|
||||||
|
config = function(_, opts)
|
||||||
|
require("barbar").setup(opts)
|
||||||
|
end,
|
||||||
|
opts = {
|
||||||
|
animation = false,
|
||||||
|
},
|
||||||
|
version = "^1.0.0", -- optional: only update when a new 1.x version is released
|
||||||
},
|
},
|
||||||
|
|
||||||
|
-- Have buffers by tab
|
||||||
|
{ "tiagovla/scope.nvim", config = true },
|
||||||
|
|
||||||
{
|
{
|
||||||
"nvim-lualine/lualine.nvim",
|
"nvim-lualine/lualine.nvim",
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
@@ -50,7 +62,9 @@ return {
|
|||||||
|
|
||||||
{
|
{
|
||||||
"stevearc/aerial.nvim",
|
"stevearc/aerial.nvim",
|
||||||
opts = {},
|
opts = function()
|
||||||
|
return require("plugins.opts.aerialview")
|
||||||
|
end,
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
"nvim-tree/nvim-web-devicons",
|
"nvim-tree/nvim-web-devicons",
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
return {
|
||||||
|
-- multiple cursors and stuff like that, not supported yet
|
||||||
|
}
|
||||||
+16
-5
@@ -9,13 +9,24 @@ return {
|
|||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
|
||||||
"sindrets/diffview.nvim",
|
|
||||||
lazy = false,
|
|
||||||
},
|
|
||||||
|
|
||||||
{ "tpope/vim-fugitive" },
|
{ "tpope/vim-fugitive" },
|
||||||
|
|
||||||
|
{
|
||||||
|
'akinsho/git-conflict.nvim',
|
||||||
|
version = "*",
|
||||||
|
opts = {
|
||||||
|
default_mappings = true, -- disable buffer local mapping created by this plugin
|
||||||
|
default_commands = true, -- disable commands created by this plugin
|
||||||
|
disable_diagnostics = false, -- This will disable the diagnostics in a buffer whilst it is conflicted
|
||||||
|
list_opener = 'copen',
|
||||||
|
highlights = {
|
||||||
|
incoming = 'DiffAdd',
|
||||||
|
current = 'DiffText',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
config = true
|
||||||
|
}
|
||||||
|
|
||||||
-- {
|
-- {
|
||||||
-- -- dir = "~/Documents/Code/monkey-alert.nvim",
|
-- -- dir = "~/Documents/Code/monkey-alert.nvim",
|
||||||
-- "dqnid/monkey-alert.nvim",
|
-- "dqnid/monkey-alert.nvim",
|
||||||
|
|||||||
+39
-56
@@ -2,67 +2,50 @@
|
|||||||
-- │ Usage help │
|
-- │ Usage help │
|
||||||
-- ╰────────────╯
|
-- ╰────────────╯
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"nvim-mini/mini.clue",
|
"nvim-mini/mini.clue",
|
||||||
opts = {
|
opts = {
|
||||||
triggers = {
|
triggers = {
|
||||||
-- Leader triggers
|
-- Leader triggers
|
||||||
{ mode = 'n', keys = '<Leader>' },
|
{ mode = "n", keys = "<Leader>" },
|
||||||
{ mode = 'x', keys = '<Leader>' },
|
{ mode = "x", keys = "<Leader>" },
|
||||||
|
|
||||||
-- Built-in completion
|
-- Built-in completion
|
||||||
{ mode = 'i', keys = '<C-x>' },
|
{ mode = "i", keys = "<C-x>" },
|
||||||
|
|
||||||
-- `g` key
|
-- `g` key
|
||||||
{ mode = 'n', keys = 'g' },
|
{ mode = "n", keys = "g" },
|
||||||
{ mode = 'x', keys = 'g' },
|
{ mode = "x", keys = "g" },
|
||||||
|
|
||||||
-- Marks
|
-- Marks
|
||||||
{ mode = 'n', keys = "'" },
|
{ mode = "n", keys = "'" },
|
||||||
{ mode = 'n', keys = '`' },
|
{ mode = "n", keys = "`" },
|
||||||
{ mode = 'x', keys = "'" },
|
{ mode = "x", keys = "'" },
|
||||||
{ mode = 'x', keys = '`' },
|
{ mode = "x", keys = "`" },
|
||||||
|
|
||||||
-- Registers
|
-- Registers
|
||||||
{ mode = 'n', keys = '"' },
|
{ mode = "n", keys = '"' },
|
||||||
{ mode = 'x', keys = '"' },
|
{ mode = "x", keys = '"' },
|
||||||
{ mode = 'i', keys = '<C-r>' },
|
{ mode = "i", keys = "<C-r>" },
|
||||||
{ mode = 'c', keys = '<C-r>' },
|
{ mode = "c", keys = "<C-r>" },
|
||||||
|
|
||||||
-- Window commands
|
-- Window commands
|
||||||
{ mode = 'n', keys = '<C-w>' },
|
{ mode = "n", keys = "<C-w>" },
|
||||||
|
|
||||||
-- `z` key
|
-- `z` key
|
||||||
{ mode = 'n', keys = 'z' },
|
{ mode = "n", keys = "z" },
|
||||||
{ mode = 'x', keys = 'z' },
|
{ mode = "x", keys = "z" },
|
||||||
},
|
},
|
||||||
|
|
||||||
clues = {
|
clues = {
|
||||||
-- Enhance this by adding descriptions for <Leader> mapping groups
|
-- Enhance this by adding descriptions for <Leader> mapping groups
|
||||||
-- miniclue.gen_clues.builtin_completion(),
|
-- miniclue.gen_clues.builtin_completion(),
|
||||||
-- miniclue.gen_clues.g(),
|
-- miniclue.gen_clues.g(),
|
||||||
-- miniclue.gen_clues.marks(),
|
-- miniclue.gen_clues.marks(),
|
||||||
-- miniclue.gen_clues.registers(),
|
-- miniclue.gen_clues.registers(),
|
||||||
-- miniclue.gen_clues.windows(),
|
-- miniclue.gen_clues.windows(),
|
||||||
-- miniclue.gen_clues.z(),
|
-- miniclue.gen_clues.z(),
|
||||||
},
|
},
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
-- Breaks LSP attach
|
|
||||||
-- {
|
|
||||||
-- "folke/which-key.nvim",
|
|
||||||
-- event = "VeryLazy",
|
|
||||||
-- opts = function()
|
|
||||||
-- return require("plugins.opts.whichKey")
|
|
||||||
-- end,
|
|
||||||
-- keys = {
|
|
||||||
-- {
|
|
||||||
-- "<leader>?",
|
|
||||||
-- function()
|
|
||||||
-- require("which-key").show({ global = false })
|
|
||||||
-- end,
|
|
||||||
-- desc = "Buffer Local Keymaps (which-key)",
|
|
||||||
-- },
|
|
||||||
-- },
|
|
||||||
-- }
|
|
||||||
}
|
}
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"github/copilot.vim",
|
|
||||||
enabled = false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"olimorris/codecompanion.nvim",
|
|
||||||
enabled = false,
|
|
||||||
dependencies = {
|
|
||||||
"nvim-lua/plenary.nvim",
|
|
||||||
"nvim-treesitter/nvim-treesitter",
|
|
||||||
},
|
|
||||||
opts = {
|
|
||||||
opts = {
|
|
||||||
log_level = "DEBUG", -- or "TRACE"
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"mfussenegger/nvim-lint",
|
||||||
|
events = { "BufWritePost", "BufReadPost", "InsertLeave" },
|
||||||
|
opts = {
|
||||||
|
linters_by_ft = {
|
||||||
|
fish = { "fish" },
|
||||||
|
css = { "stylelint" },
|
||||||
|
scss = { "stylelint" },
|
||||||
|
ts = { "eslint_d" },
|
||||||
|
js = { "eslint_d" },
|
||||||
|
jsx = { "eslint_d" },
|
||||||
|
tsx = { "eslint_d" },
|
||||||
|
-- Use the "*" filetype to run linters on all filetypes.
|
||||||
|
-- ['*'] = { 'global linter' },
|
||||||
|
-- Use the "_" filetype to run linters on filetypes that don't have other linters configured.
|
||||||
|
-- ['_'] = { 'fallback linter' },
|
||||||
|
-- ["*"] = { "typos" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
config = function()
|
||||||
|
local lint = require("lint")
|
||||||
|
|
||||||
|
lint.linters_by_ft = {
|
||||||
|
css = { "stylelint" },
|
||||||
|
scss = { "stylelint" },
|
||||||
|
ts = { "eslint_d" },
|
||||||
|
js = { "eslint_d" },
|
||||||
|
javascript = { "eslint_d" },
|
||||||
|
typescript = { "eslint_d" },
|
||||||
|
typescriptreact = { "eslint_d" },
|
||||||
|
wpjsx = { "eslint_d" },
|
||||||
|
svelte = { "biomejs" },
|
||||||
|
python = { "ruff" },
|
||||||
|
go = { "golangcilint" },
|
||||||
|
}
|
||||||
|
|
||||||
|
local lint_augroup = vim.api.nvim_create_augroup("lint", { clear = true })
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd({ "BufEnter", "BufWritePost", "InsertLeave" }, {
|
||||||
|
group = lint_augroup,
|
||||||
|
callback = function()
|
||||||
|
lint.try_lint()
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
return {
|
|
||||||
}
|
|
||||||
@@ -95,16 +95,7 @@ local config = {
|
|||||||
-- A list of all symbols to display. Set to false to display all symbols.
|
-- A list of all symbols to display. Set to false to display all symbols.
|
||||||
-- This can be a filetype map (see :help aerial-filetype-map)
|
-- This can be a filetype map (see :help aerial-filetype-map)
|
||||||
-- To see all available values, see :help SymbolKind
|
-- To see all available values, see :help SymbolKind
|
||||||
filter_kind = {
|
filter_kind = false,
|
||||||
"Class",
|
|
||||||
"Constructor",
|
|
||||||
"Enum",
|
|
||||||
"Function",
|
|
||||||
"Interface",
|
|
||||||
"Module",
|
|
||||||
"Method",
|
|
||||||
"Struct",
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Determines line highlighting mode when multiple splits are visible.
|
-- Determines line highlighting mode when multiple splits are visible.
|
||||||
-- split_width Each open window will have its cursor location marked in the
|
-- split_width Each open window will have its cursor location marked in the
|
||||||
|
|||||||
@@ -0,0 +1,34 @@
|
|||||||
|
return {
|
||||||
|
-- C-k: Toggle signature help (if signature.enabled = true)
|
||||||
|
keymap = {
|
||||||
|
preset = "default",
|
||||||
|
["<Enter>"] = { "accept", "fallback" },
|
||||||
|
["<Tab>"] = { "select_next", "fallback" },
|
||||||
|
["<S-Tab>"] = { "select_prev", "fallback" },
|
||||||
|
},
|
||||||
|
appearance = {
|
||||||
|
nerd_font_variant = "mono",
|
||||||
|
},
|
||||||
|
completion = {
|
||||||
|
accept = { auto_brackets = { enabled = false } },
|
||||||
|
list = { selection = { preselect = false, auto_insert = true } },
|
||||||
|
menu = {
|
||||||
|
auto_show = true,
|
||||||
|
|
||||||
|
-- nvim-cmp style menu
|
||||||
|
draw = {
|
||||||
|
columns = {
|
||||||
|
{ "label", "label_description", gap = 1 },
|
||||||
|
{ "kind_icon", "kind" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Show documentation when selecting a completion item
|
||||||
|
documentation = { auto_show = true, auto_show_delay_ms = 500 },
|
||||||
|
-- Display a preview of the selected item on the current line
|
||||||
|
ghost_text = { enabled = true },
|
||||||
|
},
|
||||||
|
sources = {},
|
||||||
|
fuzzy = { implementation = "prefer_rust_with_warning" },
|
||||||
|
}
|
||||||
@@ -1,112 +0,0 @@
|
|||||||
local config = {
|
|
||||||
highlights = {
|
|
||||||
buffer_selected = { bold = true },
|
|
||||||
diagnostic_selected = { bold = true },
|
|
||||||
info_selected = { bold = true },
|
|
||||||
info_diagnostic_selected = { bold = true },
|
|
||||||
warning_selected = { bold = true },
|
|
||||||
warning_diagnostic_selected = { bold = true },
|
|
||||||
error_selected = { bold = true },
|
|
||||||
error_diagnostic_selected = { bold = true },
|
|
||||||
},
|
|
||||||
options = {
|
|
||||||
themeable = true,
|
|
||||||
numbers = "none",
|
|
||||||
diagnostics = "nvim_lsp", -- or "coc"
|
|
||||||
max_prefix_length = 8,
|
|
||||||
close_command = "b# | bd#",
|
|
||||||
right_mouse_command = "b# | bd#",
|
|
||||||
left_mouse_command = "buffer %d",
|
|
||||||
buffer_close_icon = "",
|
|
||||||
modified_icon = "●",
|
|
||||||
close_icon = "",
|
|
||||||
left_trunc_marker = "",
|
|
||||||
right_trunc_marker = "",
|
|
||||||
max_name_length = 18,
|
|
||||||
truncate_names = true,
|
|
||||||
tab_size = 18,
|
|
||||||
color_icons = true,
|
|
||||||
show_buffer_icons = true,
|
|
||||||
show_buffer_close_icons = true,
|
|
||||||
show_tab_indicators = true,
|
|
||||||
duplicates_across_groups = true, -- whether to consider duplicate paths in different groups as duplicates
|
|
||||||
persist_buffer_sort = true, -- whether or not custom sorted buffers should persist
|
|
||||||
separator_style = { "▍", "" }, -- { "▏", "" } | "slant" | "slope" | "thick" | "thin" | { 'any', 'any' },
|
|
||||||
-- always_show_bufferline = false,
|
|
||||||
auto_toggle_bufferline = true,
|
|
||||||
show_close_icon = true,
|
|
||||||
hover = {
|
|
||||||
enabled = true,
|
|
||||||
delay = 200,
|
|
||||||
reveal = { "close" },
|
|
||||||
},
|
|
||||||
offsets = {
|
|
||||||
{
|
|
||||||
filetype = "neo-tree",
|
|
||||||
text = "",
|
|
||||||
highlight = "Directory",
|
|
||||||
separator = "▎", -- use a "true" to enable the default, or set your own character
|
|
||||||
},
|
|
||||||
},
|
|
||||||
groups = {
|
|
||||||
options = {
|
|
||||||
toggle_hidden_on_enter = true, -- when you re-enter a hidden group this options re-opens that group so the buffer is visible
|
|
||||||
},
|
|
||||||
items = {
|
|
||||||
-- {
|
|
||||||
-- name = "Tests",
|
|
||||||
-- -- icon = " ",
|
|
||||||
-- highlight = { underline = false },
|
|
||||||
-- priority = 2,
|
|
||||||
-- matcher = function(buf)
|
|
||||||
-- return buf.path:match("%.test") or buf.path:match("%_test") or buf.path:match("%_spec")
|
|
||||||
-- end,
|
|
||||||
-- },
|
|
||||||
-- {
|
|
||||||
-- name = "Docs",
|
|
||||||
-- -- icon = " ",
|
|
||||||
-- priority = 3,
|
|
||||||
-- -- highlight = { undercurl = false, sp = "grey" },
|
|
||||||
-- highlight = { undercurl = false },
|
|
||||||
-- auto_close = false,
|
|
||||||
-- matcher = function(buf)
|
|
||||||
-- return buf.path:match("%.md") or buf.path:match("%.txt")
|
|
||||||
-- end,
|
|
||||||
-- separator = {
|
|
||||||
-- style = require("bufferline.groups").separator.tab,
|
|
||||||
-- },
|
|
||||||
-- },
|
|
||||||
{
|
|
||||||
name = "Sh",
|
|
||||||
-- icon = " ",
|
|
||||||
highlight = { undercurl = false },
|
|
||||||
auto_close = false,
|
|
||||||
priority = 4,
|
|
||||||
matcher = function(buf)
|
|
||||||
return buf.path:match("zsh")
|
|
||||||
end,
|
|
||||||
separator = {
|
|
||||||
style = require("bufferline.groups").separator.tab,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name = "Container",
|
|
||||||
highlight = { undercurl = false },
|
|
||||||
auto_close = false,
|
|
||||||
-- icon = " ",
|
|
||||||
matcher = function(buf)
|
|
||||||
return buf.path:match("dockerfile")
|
|
||||||
or buf.path:match("DOCKERFILE")
|
|
||||||
or buf.path:match("Dockerfile")
|
|
||||||
or buf.path:match("docker%-compose%.yml")
|
|
||||||
end,
|
|
||||||
separator = {
|
|
||||||
style = require("bufferline.groups").separator.tab,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
return config
|
|
||||||
@@ -1,83 +0,0 @@
|
|||||||
local cmp = require("cmp")
|
|
||||||
|
|
||||||
local function border(hl_name)
|
|
||||||
return {
|
|
||||||
{ "╭", hl_name },
|
|
||||||
{ "─", hl_name },
|
|
||||||
{ "╮", hl_name },
|
|
||||||
{ "│", hl_name },
|
|
||||||
{ "╯", hl_name },
|
|
||||||
{ "─", hl_name },
|
|
||||||
{ "╰", hl_name },
|
|
||||||
{ "│", hl_name },
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
local options = {
|
|
||||||
completion = {
|
|
||||||
completeopt = "menu,menuone",
|
|
||||||
},
|
|
||||||
|
|
||||||
window = {
|
|
||||||
completion = {
|
|
||||||
side_padding = 1,
|
|
||||||
scrollbar = false,
|
|
||||||
},
|
|
||||||
documentation = {
|
|
||||||
border = border("CmpDocBorder"),
|
|
||||||
winhighlight = "Normal:CmpDoc",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
snippet = {
|
|
||||||
expand = function(args)
|
|
||||||
require("luasnip").lsp_expand(args.body)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
preselect = cmp.PreselectMode.None,
|
|
||||||
mapping = {
|
|
||||||
["<C-p>"] = cmp.mapping.select_prev_item(),
|
|
||||||
["<C-n>"] = cmp.mapping.select_next_item(),
|
|
||||||
["<C-d>"] = cmp.mapping.scroll_docs(-4),
|
|
||||||
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
|
||||||
["<C-Space>"] = cmp.mapping.complete(),
|
|
||||||
["<C-e>"] = cmp.mapping.close(),
|
|
||||||
["<CR>"] = cmp.mapping.confirm({
|
|
||||||
behavior = cmp.ConfirmBehavior.Insert,
|
|
||||||
select = true,
|
|
||||||
}),
|
|
||||||
["<Tab>"] = cmp.mapping(function(fallback)
|
|
||||||
if cmp.visible() then
|
|
||||||
cmp.select_next_item()
|
|
||||||
elseif require("luasnip").expand_or_jumpable() then
|
|
||||||
vim.fn.feedkeys(vim.api.nvim_replace_termcodes("<Plug>luasnip-expand-or-jump", true, true, true), "")
|
|
||||||
else
|
|
||||||
fallback()
|
|
||||||
end
|
|
||||||
end, {
|
|
||||||
"i",
|
|
||||||
"s",
|
|
||||||
}),
|
|
||||||
["<S-Tab>"] = cmp.mapping(function(fallback)
|
|
||||||
if cmp.visible() then
|
|
||||||
cmp.select_prev_item()
|
|
||||||
elseif require("luasnip").jumpable(-1) then
|
|
||||||
vim.fn.feedkeys(vim.api.nvim_replace_termcodes("<Plug>luasnip-jump-prev", true, true, true), "")
|
|
||||||
else
|
|
||||||
fallback()
|
|
||||||
end
|
|
||||||
end, {
|
|
||||||
"i",
|
|
||||||
"s",
|
|
||||||
}),
|
|
||||||
},
|
|
||||||
sources = {
|
|
||||||
{ name = "nvim_lsp" },
|
|
||||||
{ name = "luasnip" },
|
|
||||||
{ name = "buffer" },
|
|
||||||
{ name = "nvim_lua" },
|
|
||||||
{ name = "path" },
|
|
||||||
{ name = "emoji" },
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
return options
|
|
||||||
@@ -1,35 +1,39 @@
|
|||||||
local config = {
|
local config = {
|
||||||
-- Define your formatters
|
-- Define your formatters
|
||||||
formatters_by_ft = {
|
formatters_by_ft = {
|
||||||
rust = { "rustfmt" },
|
rust = { "rustfmt" },
|
||||||
lua = { "stylua" },
|
lua = { "stylua" },
|
||||||
go = { "goimports", "gofmt" },
|
go = { "goimports", "gofmt" },
|
||||||
javascript = { "prettierd", "prettier", "biome", stop_after_first = true },
|
javascript = { "biome", "prettierd", "prettier", stop_after_first = true },
|
||||||
javascriptreact = { "prettierd", "prettier", "biome", stop_after_first = true },
|
javascriptreact = { "biome", "prettierd", "prettier", stop_after_first = true },
|
||||||
typescript = { "prettierd", "prettier", "biome", stop_after_first = true },
|
typescript = { "biome", "prettierd", "prettier", stop_after_first = true },
|
||||||
typescriptreact = { "prettierd", "prettier", "biome", stop_after_first = true },
|
typescriptreact = { "biome", "prettierd", "prettier", stop_after_first = true },
|
||||||
css = { "prettierd", "prettier", "biome", stop_after_first = true },
|
css = { "biome", "prettierd", "prettier", stop_after_first = true },
|
||||||
scss = { "prettierd", "prettier", "biome", stop_after_first = true },
|
scss = { "biome", "prettierd", "prettier", stop_after_first = true },
|
||||||
-- python = function(bufnr)
|
python = {
|
||||||
-- if require("conform").get_formatter_info("ruff_format", bufnr).available then
|
-- To fix auto-fixable lint errors.
|
||||||
-- return { "ruff_format" }
|
"ruff_fix",
|
||||||
-- else
|
-- To run the Ruff formatter.
|
||||||
-- return { "isort", "black" }
|
"ruff_format",
|
||||||
-- end
|
-- To organize the imports.
|
||||||
-- end,
|
"ruff_organize_imports",
|
||||||
["_"] = { "trim_whitespace" }, -- run only on filetypes without formater
|
},
|
||||||
-- ["*"] = { "trim_whitespace" }, -- run in all filetypes
|
["_"] = { "trim_whitespace" }, -- run only on filetypes without formater
|
||||||
},
|
-- ["*"] = { "trim_whitespace" }, -- run in all filetypes
|
||||||
format_on_save = {
|
},
|
||||||
timeout_ms = 500,
|
format_on_save = {
|
||||||
lsp_format = "fallback",
|
timeout_ms = 500,
|
||||||
},
|
lsp_format = "fallback",
|
||||||
-- Customize formatters
|
},
|
||||||
formatters = {
|
-- Customize formatters
|
||||||
shfmt = {
|
formatters = {
|
||||||
prepend_args = { "-i", "2" },
|
ruff = {
|
||||||
},
|
prepend_args = { "format" },
|
||||||
},
|
},
|
||||||
|
shfmt = {
|
||||||
|
prepend_args = { "-i", "2" },
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
return config
|
return config
|
||||||
@@ -16,13 +16,26 @@ local options = {
|
|||||||
statusline = 1000,
|
statusline = 1000,
|
||||||
tabline = 1000,
|
tabline = 1000,
|
||||||
winbar = 1000,
|
winbar = 1000,
|
||||||
|
refresh_time = 16, -- ~60fps
|
||||||
|
events = {
|
||||||
|
"WinEnter",
|
||||||
|
"BufEnter",
|
||||||
|
"BufWritePost",
|
||||||
|
"SessionLoadPost",
|
||||||
|
"FileChangedShellPost",
|
||||||
|
"VimResized",
|
||||||
|
"Filetype",
|
||||||
|
"CursorMoved",
|
||||||
|
"CursorMovedI",
|
||||||
|
"ModeChanged",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
sections = {
|
sections = {
|
||||||
lualine_a = { "mode" },
|
lualine_a = { "mode" },
|
||||||
lualine_b = { "branch", "diff" },
|
lualine_b = { "branch", "diff" },
|
||||||
lualine_c = { "filename" },
|
lualine_c = { "filename", "diagnostics" },
|
||||||
lualine_x = { "diagnostics", "filetype", "encoding", "fileformat" },
|
lualine_x = { "lsp_status", "searchcount", "filetype", "encoding" },
|
||||||
lualine_y = { "progress" },
|
lualine_y = { "progress" },
|
||||||
lualine_z = { "location" },
|
lualine_z = { "location" },
|
||||||
},
|
},
|
||||||
|
|||||||
+277
-277
@@ -1,282 +1,282 @@
|
|||||||
local config = {
|
local config = {
|
||||||
close_if_last_window = false,
|
close_if_last_window = false,
|
||||||
popup_border_style = "rounded",
|
popup_border_style = "rounded",
|
||||||
enable_git_status = true,
|
enable_git_status = true,
|
||||||
enable_diagnostics = true,
|
enable_diagnostics = true,
|
||||||
open_files_do_not_replace_types = { "trouble", "qf" }, -- when opening files, do not use windows containing these filetypes or buftypes: "terminal" is an option
|
open_files_do_not_replace_types = { "trouble", "qf" }, -- when opening files, do not use windows containing these filetypes or buftypes: "terminal" is an option
|
||||||
sort_case_insensitive = false, -- used when sorting files and directories in the tree
|
sort_case_insensitive = false, -- used when sorting files and directories in the tree
|
||||||
sort_function = nil,
|
sort_function = nil,
|
||||||
follow_current_file = { enabled = true },
|
follow_current_file = { enabled = true },
|
||||||
source_selector = {
|
source_selector = {
|
||||||
winbar = false,
|
winbar = false,
|
||||||
statusline = false,
|
statusline = false,
|
||||||
},
|
},
|
||||||
default_component_configs = {
|
default_component_configs = {
|
||||||
container = {
|
container = {
|
||||||
enable_character_fade = true,
|
enable_character_fade = true,
|
||||||
},
|
},
|
||||||
diagnostics = {
|
diagnostics = {
|
||||||
symbols = {
|
symbols = {
|
||||||
hint = "H",
|
hint = "",
|
||||||
info = "I",
|
info = "",
|
||||||
warn = "!",
|
warn = "",
|
||||||
error = "X",
|
error = "",
|
||||||
},
|
},
|
||||||
highlights = {
|
highlights = {
|
||||||
hint = "DiagnosticSignHint",
|
hint = "DiagnosticSignHint",
|
||||||
info = "DiagnosticSignInfo",
|
info = "DiagnosticSignInfo",
|
||||||
warn = "DiagnosticSignWarn",
|
warn = "DiagnosticSignWarn",
|
||||||
error = "DiagnosticSignError",
|
error = "DiagnosticSignError",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
indent = {
|
indent = {
|
||||||
indent_size = 2,
|
indent_size = 2,
|
||||||
padding = 1, -- extra padding on left hand side
|
padding = 1, -- extra padding on left hand side
|
||||||
-- indent guides
|
-- indent guides
|
||||||
with_markers = true,
|
with_markers = true,
|
||||||
indent_marker = "│",
|
indent_marker = "│",
|
||||||
last_indent_marker = "└",
|
last_indent_marker = "└",
|
||||||
highlight = "NeoTreeIndentMarker",
|
highlight = "NeoTreeIndentMarker",
|
||||||
-- expander config, needed for nesting files
|
-- expander config, needed for nesting files
|
||||||
with_expanders = nil, -- if nil and file nesting is enabled, will enable expanders
|
with_expanders = nil, -- if nil and file nesting is enabled, will enable expanders
|
||||||
expander_collapsed = "",
|
expander_collapsed = "",
|
||||||
expander_expanded = "",
|
expander_expanded = "",
|
||||||
expander_highlight = "NeoTreeExpander",
|
expander_highlight = "NeoTreeExpander",
|
||||||
},
|
},
|
||||||
icon = {
|
icon = {
|
||||||
folder_closed = "",
|
folder_closed = "",
|
||||||
folder_open = "",
|
folder_open = "",
|
||||||
folder_empty = "",
|
folder_empty = "",
|
||||||
-- The next two settings are only a fallback, if you use nvim-web-devicons and configure default icons there
|
-- The next two settings are only a fallback, if you use nvim-web-devicons and configure default icons there
|
||||||
-- then these will never be used.
|
-- then these will never be used.
|
||||||
default = "*",
|
default = "*",
|
||||||
highlight = "NeoTreeFileIcon",
|
highlight = "NeoTreeFileIcon",
|
||||||
},
|
},
|
||||||
modified = {
|
modified = {
|
||||||
symbol = "[+]",
|
symbol = "[+]",
|
||||||
highlight = "NeoTreeModified",
|
highlight = "NeoTreeModified",
|
||||||
},
|
},
|
||||||
name = {
|
name = {
|
||||||
trailing_slash = false,
|
trailing_slash = false,
|
||||||
use_git_status_colors = true,
|
use_git_status_colors = true,
|
||||||
highlight = "NeoTreeFileName",
|
highlight = "NeoTreeFileName",
|
||||||
},
|
},
|
||||||
git_status = {
|
git_status = {
|
||||||
symbols = {
|
symbols = {
|
||||||
-- Change type
|
-- Change type
|
||||||
added = "", -- or "✚", but this is redundant info if you use git_status_colors on the name
|
added = "", -- or "✚", but this is redundant info if you use git_status_colors on the name
|
||||||
modified = "", -- or "", but this is redundant info if you use git_status_colors on the name
|
modified = "", -- or "", but this is redundant info if you use git_status_colors on the name
|
||||||
deleted = "✖", -- this can only be used in the git_status source
|
deleted = "✖", -- this can only be used in the git_status source
|
||||||
renamed = "", -- this can only be used in the git_status source
|
renamed = "", -- this can only be used in the git_status source
|
||||||
-- Status type
|
-- Status type
|
||||||
untracked = "",
|
untracked = "",
|
||||||
ignored = "",
|
ignored = "",
|
||||||
unstaged = "",
|
unstaged = "",
|
||||||
staged = "",
|
staged = "",
|
||||||
conflict = "",
|
conflict = "",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
-- If you don't want to use these columns, you can set `enabled = false` for each of them individually
|
-- If you don't want to use these columns, you can set `enabled = false` for each of them individually
|
||||||
file_size = {
|
file_size = {
|
||||||
enabled = true,
|
enabled = true,
|
||||||
required_width = 64, -- min width of window required to show this column
|
required_width = 64, -- min width of window required to show this column
|
||||||
},
|
},
|
||||||
type = {
|
type = {
|
||||||
enabled = true,
|
enabled = true,
|
||||||
required_width = 122, -- min width of window required to show this column
|
required_width = 122, -- min width of window required to show this column
|
||||||
},
|
},
|
||||||
last_modified = {
|
last_modified = {
|
||||||
enabled = true,
|
enabled = true,
|
||||||
required_width = 88, -- min width of window required to show this column
|
required_width = 88, -- min width of window required to show this column
|
||||||
},
|
},
|
||||||
created = {
|
created = {
|
||||||
enabled = true,
|
enabled = true,
|
||||||
required_width = 110, -- min width of window required to show this column
|
required_width = 110, -- min width of window required to show this column
|
||||||
},
|
},
|
||||||
symlink_target = {
|
symlink_target = {
|
||||||
enabled = false,
|
enabled = false,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
-- A list of functions, each representing a global custom command
|
-- A list of functions, each representing a global custom command
|
||||||
-- that will be available in all sources (if not overridden in `opts[source_name].commands`)
|
-- that will be available in all sources (if not overridden in `opts[source_name].commands`)
|
||||||
-- see `:h neo-tree-custom-commands-global`
|
-- see `:h neo-tree-custom-commands-global`
|
||||||
commands = {},
|
commands = {},
|
||||||
window = {
|
window = {
|
||||||
position = "left",
|
position = "left",
|
||||||
width = 40,
|
width = 40,
|
||||||
mapping_options = {
|
mapping_options = {
|
||||||
noremap = true,
|
noremap = true,
|
||||||
nowait = true,
|
nowait = true,
|
||||||
},
|
},
|
||||||
mappings = {
|
mappings = {
|
||||||
["<space>"] = {
|
["<space>"] = {
|
||||||
"toggle_node",
|
"toggle_node",
|
||||||
nowait = false, -- disable `nowait` if you have existing combos starting with this char that you want to use
|
nowait = false, -- disable `nowait` if you have existing combos starting with this char that you want to use
|
||||||
},
|
},
|
||||||
["<2-LeftMouse>"] = "open",
|
["<2-LeftMouse>"] = "open",
|
||||||
["<cr>"] = "open",
|
["<cr>"] = "open",
|
||||||
["<esc>"] = "cancel", -- close preview or floating neo-tree window
|
["<esc>"] = "cancel", -- close preview or floating neo-tree window
|
||||||
["P"] = { "toggle_preview", config = { use_float = true, use_image_nvim = true } },
|
["P"] = { "toggle_preview", config = { use_float = true, use_image_nvim = true } },
|
||||||
-- Read `# Preview Mode` for more information
|
-- Read `# Preview Mode` for more information
|
||||||
["l"] = "focus_preview",
|
["l"] = "focus_preview",
|
||||||
["S"] = "open_split",
|
["S"] = "open_split",
|
||||||
["s"] = "open_vsplit",
|
["s"] = "open_vsplit",
|
||||||
-- ["S"] = "split_with_window_picker",
|
-- ["S"] = "split_with_window_picker",
|
||||||
-- ["s"] = "vsplit_with_window_picker",
|
-- ["s"] = "vsplit_with_window_picker",
|
||||||
["t"] = "open_tabnew",
|
["t"] = "open_tabnew",
|
||||||
-- ["<cr>"] = "open_drop",
|
-- ["<cr>"] = "open_drop",
|
||||||
-- ["t"] = "open_tab_drop",
|
-- ["t"] = "open_tab_drop",
|
||||||
["w"] = "open_with_window_picker",
|
["w"] = "open_with_window_picker",
|
||||||
--["P"] = "toggle_preview", -- enter preview mode, which shows the current node without focusing
|
--["P"] = "toggle_preview", -- enter preview mode, which shows the current node without focusing
|
||||||
["C"] = "close_node",
|
["C"] = "close_node",
|
||||||
-- ['C'] = 'close_all_subnodes',
|
-- ['C'] = 'close_all_subnodes',
|
||||||
["z"] = "close_all_nodes",
|
["z"] = "close_all_nodes",
|
||||||
--["Z"] = "expand_all_nodes",
|
--["Z"] = "expand_all_nodes",
|
||||||
["a"] = {
|
["a"] = {
|
||||||
"add",
|
"add",
|
||||||
-- this command supports BASH style brace expansion ("x{a,b,c}" -> xa,xb,xc). see `:h neo-tree-file-actions` for details
|
-- this command supports BASH style brace expansion ("x{a,b,c}" -> xa,xb,xc). see `:h neo-tree-file-actions` for details
|
||||||
-- some commands may take optional config options, see `:h neo-tree-mappings` for details
|
-- some commands may take optional config options, see `:h neo-tree-mappings` for details
|
||||||
config = {
|
config = {
|
||||||
show_path = "none", -- "none", "relative", "absolute"
|
show_path = "none", -- "none", "relative", "absolute"
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
["A"] = "add_directory", -- also accepts the optional config.show_path option like "add". this also supports BASH style brace expansion.
|
["A"] = "add_directory", -- also accepts the optional config.show_path option like "add". this also supports BASH style brace expansion.
|
||||||
["d"] = "delete",
|
["d"] = "delete",
|
||||||
["r"] = "rename",
|
["r"] = "rename",
|
||||||
["y"] = "copy_to_clipboard",
|
["y"] = "copy_to_clipboard",
|
||||||
["x"] = "cut_to_clipboard",
|
["x"] = "cut_to_clipboard",
|
||||||
["p"] = "paste_from_clipboard",
|
["p"] = "paste_from_clipboard",
|
||||||
["c"] = "copy", -- takes text input for destination, also accepts the optional config.show_path option like "add":
|
["c"] = "copy", -- takes text input for destination, also accepts the optional config.show_path option like "add":
|
||||||
-- ["c"] = {
|
-- ["c"] = {
|
||||||
-- "copy",
|
-- "copy",
|
||||||
-- config = {
|
-- config = {
|
||||||
-- show_path = "none" -- "none", "relative", "absolute"
|
-- show_path = "none" -- "none", "relative", "absolute"
|
||||||
-- }
|
-- }
|
||||||
--}
|
--}
|
||||||
["m"] = "move", -- takes text input for destination, also accepts the optional config.show_path option like "add".
|
["m"] = "move", -- takes text input for destination, also accepts the optional config.show_path option like "add".
|
||||||
["q"] = "close_window",
|
["q"] = "close_window",
|
||||||
["R"] = "refresh",
|
["R"] = "refresh",
|
||||||
["?"] = "show_help",
|
["?"] = "show_help",
|
||||||
["<S-Tab>"] = "prev_source",
|
["<S-Tab>"] = "prev_source",
|
||||||
["<Tab>"] = "next_source",
|
["<Tab>"] = "next_source",
|
||||||
["i"] = "show_file_details",
|
["i"] = "show_file_details",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
nesting_rules = {},
|
nesting_rules = {},
|
||||||
document_symbols = {},
|
document_symbols = {},
|
||||||
filesystem = {
|
filesystem = {
|
||||||
filtered_items = {
|
filtered_items = {
|
||||||
visible = false, -- when true, they will just be displayed differently than normal items
|
visible = false, -- when true, they will just be displayed differently than normal items
|
||||||
hide_dotfiles = true,
|
hide_dotfiles = true,
|
||||||
hide_gitignored = true,
|
hide_gitignored = true,
|
||||||
hide_hidden = true, -- only works on Windows for hidden files/directories
|
hide_hidden = true, -- only works on Windows for hidden files/directories
|
||||||
hide_by_name = {
|
hide_by_name = {
|
||||||
--"node_modules"
|
--"node_modules"
|
||||||
},
|
},
|
||||||
hide_by_pattern = { -- uses glob style patterns
|
hide_by_pattern = { -- uses glob style patterns
|
||||||
--"*.meta",
|
--"*.meta",
|
||||||
--"*/src/*/tsconfig.json",
|
--"*/src/*/tsconfig.json",
|
||||||
},
|
},
|
||||||
always_show = { -- remains visible even if other settings would normally hide it
|
always_show = { -- remains visible even if other settings would normally hide it
|
||||||
--".gitignored",
|
--".gitignored",
|
||||||
},
|
},
|
||||||
always_show_by_pattern = { -- uses glob style patterns
|
always_show_by_pattern = { -- uses glob style patterns
|
||||||
--".env*",
|
--".env*",
|
||||||
},
|
},
|
||||||
never_show = { -- remains hidden even if visible is toggled to true, this overrides always_show
|
never_show = { -- remains hidden even if visible is toggled to true, this overrides always_show
|
||||||
--".DS_Store",
|
--".DS_Store",
|
||||||
--"thumbs.db"
|
--"thumbs.db"
|
||||||
},
|
},
|
||||||
never_show_by_pattern = { -- uses glob style patterns
|
never_show_by_pattern = { -- uses glob style patterns
|
||||||
--".null-ls_*",
|
--".null-ls_*",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
group_empty_dirs = false, -- when true, empty folders will be grouped together
|
group_empty_dirs = false, -- when true, empty folders will be grouped together
|
||||||
hijack_netrw_behavior = "open_default", -- netrw disabled, opening a directory opens neo-tree
|
hijack_netrw_behavior = "open_default", -- netrw disabled, opening a directory opens neo-tree
|
||||||
-- in whatever position is specified in window.position
|
-- in whatever position is specified in window.position
|
||||||
-- "open_current", -- netrw disabled, opening a directory opens within the
|
-- "open_current", -- netrw disabled, opening a directory opens within the
|
||||||
-- window like netrw would, regardless of window.position
|
-- window like netrw would, regardless of window.position
|
||||||
-- "disabled", -- netrw left alone, neo-tree does not handle opening dirs
|
-- "disabled", -- netrw left alone, neo-tree does not handle opening dirs
|
||||||
use_libuv_file_watcher = false, -- This will use the OS level file watchers to detect changes
|
use_libuv_file_watcher = false, -- This will use the OS level file watchers to detect changes
|
||||||
follow_current_file = { enabled = true },
|
follow_current_file = { enabled = true },
|
||||||
-- instead of relying on nvim autocmd events.
|
-- instead of relying on nvim autocmd events.
|
||||||
window = {
|
window = {
|
||||||
mappings = {
|
mappings = {
|
||||||
["<bs>"] = "navigate_up",
|
["<bs>"] = "navigate_up",
|
||||||
["."] = "set_root",
|
["."] = "set_root",
|
||||||
["H"] = "toggle_hidden",
|
["H"] = "toggle_hidden",
|
||||||
["/"] = "fuzzy_finder",
|
["/"] = "fuzzy_finder",
|
||||||
["D"] = "fuzzy_finder_directory",
|
["D"] = "fuzzy_finder_directory",
|
||||||
["#"] = "fuzzy_sorter", -- fuzzy sorting using the fzy algorithm
|
["#"] = "fuzzy_sorter", -- fuzzy sorting using the fzy algorithm
|
||||||
-- ["D"] = "fuzzy_sorter_directory",
|
-- ["D"] = "fuzzy_sorter_directory",
|
||||||
["f"] = "filter_on_submit",
|
["f"] = "filter_on_submit",
|
||||||
["<c-x>"] = "clear_filter",
|
["<c-x>"] = "clear_filter",
|
||||||
["[g"] = "prev_git_modified",
|
["[g"] = "prev_git_modified",
|
||||||
["]g"] = "next_git_modified",
|
["]g"] = "next_git_modified",
|
||||||
["o"] = { "show_help", nowait = false, config = { title = "Order by", prefix_key = "o" } },
|
["o"] = { "show_help", nowait = false, config = { title = "Order by", prefix_key = "o" } },
|
||||||
["oc"] = { "order_by_created", nowait = false },
|
["oc"] = { "order_by_created", nowait = false },
|
||||||
["od"] = { "order_by_diagnostics", nowait = false },
|
["od"] = { "order_by_diagnostics", nowait = false },
|
||||||
["og"] = { "order_by_git_status", nowait = false },
|
["og"] = { "order_by_git_status", nowait = false },
|
||||||
["om"] = { "order_by_modified", nowait = false },
|
["om"] = { "order_by_modified", nowait = false },
|
||||||
["on"] = { "order_by_name", nowait = false },
|
["on"] = { "order_by_name", nowait = false },
|
||||||
["os"] = { "order_by_size", nowait = false },
|
["os"] = { "order_by_size", nowait = false },
|
||||||
["ot"] = { "order_by_type", nowait = false },
|
["ot"] = { "order_by_type", nowait = false },
|
||||||
-- ['<key>'] = function(state) ... end,
|
-- ['<key>'] = function(state) ... end,
|
||||||
},
|
},
|
||||||
fuzzy_finder_mappings = { -- define keymaps for filter popup window in fuzzy_finder_mode
|
fuzzy_finder_mappings = { -- define keymaps for filter popup window in fuzzy_finder_mode
|
||||||
["<down>"] = "move_cursor_down",
|
["<down>"] = "move_cursor_down",
|
||||||
["<C-j>"] = "move_cursor_down",
|
["<C-j>"] = "move_cursor_down",
|
||||||
["<up>"] = "move_cursor_up",
|
["<up>"] = "move_cursor_up",
|
||||||
["<C-k>"] = "move_cursor_up",
|
["<C-k>"] = "move_cursor_up",
|
||||||
-- ['<key>'] = function(state, scroll_padding) ... end,
|
-- ['<key>'] = function(state, scroll_padding) ... end,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
commands = {}, -- Add a custom command or override a global one using the same function name
|
commands = {}, -- Add a custom command or override a global one using the same function name
|
||||||
},
|
},
|
||||||
buffers = {
|
buffers = {
|
||||||
follow_current_file = {
|
follow_current_file = {
|
||||||
enabled = true, -- This will find and focus the file in the active buffer every time
|
enabled = true, -- This will find and focus the file in the active buffer every time
|
||||||
leave_dirs_open = true, -- `false` closes auto expanded dirs, such as with `:Neotree reveal`
|
leave_dirs_open = true, -- `false` closes auto expanded dirs, such as with `:Neotree reveal`
|
||||||
},
|
},
|
||||||
group_empty_dirs = true, -- when true, empty folders will be grouped together
|
group_empty_dirs = true, -- when true, empty folders will be grouped together
|
||||||
show_unloaded = true,
|
show_unloaded = true,
|
||||||
window = {
|
window = {
|
||||||
mappings = {
|
mappings = {
|
||||||
["bd"] = "buffer_delete",
|
["bd"] = "buffer_delete",
|
||||||
["<bs>"] = "navigate_up",
|
["<bs>"] = "navigate_up",
|
||||||
["."] = "set_root",
|
["."] = "set_root",
|
||||||
["o"] = { "show_help", nowait = false, config = { title = "Order by", prefix_key = "o" } },
|
["o"] = { "show_help", nowait = false, config = { title = "Order by", prefix_key = "o" } },
|
||||||
["oc"] = { "order_by_created", nowait = false },
|
["oc"] = { "order_by_created", nowait = false },
|
||||||
["od"] = { "order_by_diagnostics", nowait = false },
|
["od"] = { "order_by_diagnostics", nowait = false },
|
||||||
["om"] = { "order_by_modified", nowait = false },
|
["om"] = { "order_by_modified", nowait = false },
|
||||||
["on"] = { "order_by_name", nowait = false },
|
["on"] = { "order_by_name", nowait = false },
|
||||||
["os"] = { "order_by_size", nowait = false },
|
["os"] = { "order_by_size", nowait = false },
|
||||||
["ot"] = { "order_by_type", nowait = false },
|
["ot"] = { "order_by_type", nowait = false },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
git_status = {
|
git_status = {
|
||||||
window = {
|
window = {
|
||||||
position = "float",
|
position = "float",
|
||||||
mappings = {
|
mappings = {
|
||||||
["A"] = "git_add_all",
|
["A"] = "git_add_all",
|
||||||
["gu"] = "git_unstage_file",
|
["gu"] = "git_unstage_file",
|
||||||
["ga"] = "git_add_file",
|
["ga"] = "git_add_file",
|
||||||
["gr"] = "git_revert_file",
|
["gr"] = "git_revert_file",
|
||||||
["gc"] = "git_commit",
|
["gc"] = "git_commit",
|
||||||
["gp"] = "git_push",
|
["gp"] = "git_push",
|
||||||
["gg"] = "git_commit_and_push",
|
["gg"] = "git_commit_and_push",
|
||||||
["o"] = { "show_help", nowait = false, config = { title = "Order by", prefix_key = "o" } },
|
["o"] = { "show_help", nowait = false, config = { title = "Order by", prefix_key = "o" } },
|
||||||
["oc"] = { "order_by_created", nowait = false },
|
["oc"] = { "order_by_created", nowait = false },
|
||||||
["od"] = { "order_by_diagnostics", nowait = false },
|
["od"] = { "order_by_diagnostics", nowait = false },
|
||||||
["om"] = { "order_by_modified", nowait = false },
|
["om"] = { "order_by_modified", nowait = false },
|
||||||
["on"] = { "order_by_name", nowait = false },
|
["on"] = { "order_by_name", nowait = false },
|
||||||
["os"] = { "order_by_size", nowait = false },
|
["os"] = { "order_by_size", nowait = false },
|
||||||
["ot"] = { "order_by_type", nowait = false },
|
["ot"] = { "order_by_type", nowait = false },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
return config
|
return config
|
||||||
+80
-77
@@ -1,81 +1,84 @@
|
|||||||
local config = {
|
local config = {
|
||||||
views = {
|
views = {
|
||||||
cmdline_popup = {
|
cmdline_popup = {
|
||||||
position = {
|
position = {
|
||||||
row = 3,
|
row = 3,
|
||||||
col = "50%",
|
col = "50%",
|
||||||
},
|
},
|
||||||
size = {
|
size = {
|
||||||
width = 60,
|
width = 60,
|
||||||
height = "auto",
|
height = "auto",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
cmdline_popupmenu = {
|
cmdline_popupmenu = {
|
||||||
position = {
|
position = {
|
||||||
row = 6,
|
row = 6,
|
||||||
col = "50%",
|
col = "50%",
|
||||||
},
|
},
|
||||||
size = {
|
size = {
|
||||||
width = 60,
|
width = 60,
|
||||||
height = "auto",
|
height = "auto",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
cmdline = {
|
cmdline = {
|
||||||
enabled = true,
|
enabled = true,
|
||||||
view = "cmdline", -- cmdline, cmdline_popup
|
view = "cmdline", -- cmdline, cmdline_popup
|
||||||
opts = {},
|
opts = {},
|
||||||
---@type table<string, CmdlineFormat>
|
---@type table<string, CmdlineFormat>
|
||||||
format = {
|
format = {
|
||||||
cmdline = { pattern = "^:", icon = "λ", lang = "vim", title = "" },
|
cmdline = { pattern = "^:", icon = "λ", lang = "vim", title = "" },
|
||||||
search_down = { kind = "search", pattern = "^/", icon = " ", lang = "regex" },
|
search_down = { kind = "search", pattern = "^/", icon = " ", lang = "regex" },
|
||||||
search_up = { kind = "search", pattern = "^%?", icon = " ", lang = "regex" },
|
search_up = { kind = "search", pattern = "^%?", icon = " ", lang = "regex" },
|
||||||
filter = { pattern = "^:%s*!", icon = "$", lang = "bash" },
|
filter = { pattern = "^:%s*!", icon = "$", lang = "bash" },
|
||||||
lua = {
|
lua = {
|
||||||
pattern = { "^:%s*lua%s+", "^:%s*lua%s*=%s*", "^:%s*=%s*" },
|
pattern = { "^:%s*lua%s+", "^:%s*lua%s*=%s*", "^:%s*=%s*" },
|
||||||
icon = "",
|
icon = "",
|
||||||
lang = "lua",
|
lang = "lua",
|
||||||
},
|
},
|
||||||
help = { pattern = "^:%s*he?l?p?%s+", icon = "" },
|
help = { pattern = "^:%s*he?l?p?%s+", icon = "" },
|
||||||
input = {}, -- Used by input()
|
input = {}, -- Used by input()
|
||||||
-- lua = false, -- to disable a format, set to `false`
|
-- lua = false, -- to disable a format, set to `false`
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
notify = {
|
notify = {
|
||||||
-- Noice can be used as `vim.notify` so you can route any notification like other messages
|
enabled = false,
|
||||||
-- Notification messages have their level and other properties set.
|
view = "notify",
|
||||||
-- event is always "notify" and kind can be any log level as a string
|
},
|
||||||
-- The default routes will forward notifications to nvim-notify
|
lsp = {
|
||||||
-- Benefit of using Noice for this is the routing and consistent history view
|
override = {
|
||||||
enabled = false,
|
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
|
||||||
view = "notify",
|
["vim.lsp.util.stylize_markdown"] = true,
|
||||||
},
|
},
|
||||||
lsp = {
|
-- Bottom right notifications with the lsp executions
|
||||||
-- override markdown rendering so that **cmp** and other plugins use **Treesitter**
|
progress = {
|
||||||
override = {
|
enabled = false,
|
||||||
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
|
--- @type NoiceFormat|string
|
||||||
["vim.lsp.util.stylize_markdown"] = true,
|
format = "lsp_progress",
|
||||||
["cmp.entry.get_documentation"] = true, -- requires hrsh7th/nvim-cmp
|
--- @type NoiceFormat|string
|
||||||
},
|
format_done = "lsp_progress_done",
|
||||||
},
|
throttle = 1000 / 30, -- frequency to update lsp progress message
|
||||||
presets = {
|
view = "mini",
|
||||||
bottom_search = true, -- use a classic bottom cmdline for search
|
},
|
||||||
command_palette = true, -- position the cmdline and popupmenu together
|
},
|
||||||
long_message_to_split = true, -- long messages will be sent to a split
|
presets = {
|
||||||
inc_rename = false, -- enables an input dialog for inc-rename.nvim
|
bottom_search = true, -- use a classic bottom cmdline for search
|
||||||
lsp_doc_border = false, -- add a border to hover docs and signature help
|
command_palette = true, -- position the cmdline and popupmenu together
|
||||||
},
|
long_message_to_split = true, -- long messages will be sent to a split
|
||||||
routes = {
|
inc_rename = false, -- enables an input dialog for inc-rename.nvim
|
||||||
{ view = "cmdline", filter = { event = "msg_showmode" } },
|
lsp_doc_border = false, -- add a border to hover docs and signature help
|
||||||
{
|
},
|
||||||
filter = {
|
routes = {
|
||||||
event = "msg_show",
|
{ view = "cmdline", filter = { event = "msg_showmode" } },
|
||||||
kind = "",
|
{
|
||||||
find = "written",
|
filter = {
|
||||||
},
|
event = "msg_show",
|
||||||
opts = { skip = true },
|
kind = "",
|
||||||
},
|
find = "written",
|
||||||
},
|
},
|
||||||
|
opts = { skip = true },
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
return config
|
return config
|
||||||
@@ -34,7 +34,7 @@ return {
|
|||||||
highlight = "Search",
|
highlight = "Search",
|
||||||
},
|
},
|
||||||
Error = {
|
Error = {
|
||||||
text = { "-", "x" },
|
text = { "-", "" },
|
||||||
priority = 2,
|
priority = 2,
|
||||||
gui = nil,
|
gui = nil,
|
||||||
color = nil,
|
color = nil,
|
||||||
@@ -43,7 +43,7 @@ return {
|
|||||||
highlight = "DiagnosticVirtualTextError",
|
highlight = "DiagnosticVirtualTextError",
|
||||||
},
|
},
|
||||||
Warn = {
|
Warn = {
|
||||||
text = { "-", "!" },
|
text = { "-", "" },
|
||||||
priority = 3,
|
priority = 3,
|
||||||
gui = nil,
|
gui = nil,
|
||||||
color = nil,
|
color = nil,
|
||||||
@@ -61,7 +61,7 @@ return {
|
|||||||
highlight = "DiagnosticVirtualTextInfo",
|
highlight = "DiagnosticVirtualTextInfo",
|
||||||
},
|
},
|
||||||
Hint = {
|
Hint = {
|
||||||
text = { "-", "=" },
|
text = { "-", "" },
|
||||||
priority = 5,
|
priority = 5,
|
||||||
gui = nil,
|
gui = nil,
|
||||||
color = nil,
|
color = nil,
|
||||||
|
|||||||
@@ -1,63 +1,63 @@
|
|||||||
local options = {
|
local options = {
|
||||||
defaults = {
|
defaults = {
|
||||||
vimgrep_arguments = {
|
vimgrep_arguments = {
|
||||||
"rg",
|
"rg",
|
||||||
"-L",
|
"-L",
|
||||||
"--color=never",
|
"--color=never",
|
||||||
"--no-heading",
|
"--no-heading",
|
||||||
"--with-filename",
|
"--with-filename",
|
||||||
"--line-number",
|
"--line-number",
|
||||||
"--column",
|
"--column",
|
||||||
"--smart-case",
|
"--smart-case",
|
||||||
},
|
},
|
||||||
prompt_prefix = " ",
|
prompt_prefix = " ",
|
||||||
selection_caret = " ",
|
selection_caret = " ",
|
||||||
entry_prefix = " ",
|
entry_prefix = " ",
|
||||||
initial_mode = "insert",
|
initial_mode = "insert",
|
||||||
selection_strategy = "reset",
|
selection_strategy = "reset",
|
||||||
sorting_strategy = "ascending",
|
sorting_strategy = "ascending",
|
||||||
layout_strategy = "horizontal",
|
layout_strategy = "horizontal",
|
||||||
layout_config = {
|
layout_config = {
|
||||||
horizontal = {
|
horizontal = {
|
||||||
prompt_position = "top",
|
prompt_position = "top",
|
||||||
preview_width = 0.55,
|
preview_width = 0.55,
|
||||||
results_width = 0.8,
|
results_width = 0.8,
|
||||||
},
|
},
|
||||||
vertical = {
|
vertical = {
|
||||||
mirror = false,
|
mirror = false,
|
||||||
},
|
},
|
||||||
width = 0.87,
|
width = 0.87,
|
||||||
height = 0.80,
|
height = 0.80,
|
||||||
preview_cutoff = 120,
|
preview_cutoff = 120,
|
||||||
},
|
},
|
||||||
file_sorter = require("telescope.sorters").get_fuzzy_file,
|
file_sorter = require("telescope.sorters").get_fuzzy_file,
|
||||||
file_ignore_patterns = { "node_modules" },
|
file_ignore_patterns = { "node_modules" },
|
||||||
generic_sorter = require("telescope.sorters").get_generic_fuzzy_sorter,
|
generic_sorter = require("telescope.sorters").get_generic_fuzzy_sorter,
|
||||||
path_display = { "truncate" },
|
path_display = { "truncate" },
|
||||||
winblend = 0,
|
winblend = 0, -- transparency
|
||||||
border = {},
|
border = {},
|
||||||
borderchars = { "─", "│", "─", "│", "╭", "╮", "╯", "╰" },
|
borderchars = { "─", "│", "─", "│", "╭", "╮", "╯", "╰" },
|
||||||
color_devicons = true,
|
color_devicons = true,
|
||||||
set_env = { ["COLORTERM"] = "truecolor" }, -- default = nil,
|
set_env = { ["COLORTERM"] = "truecolor" }, -- default = nil,
|
||||||
file_previewer = require("telescope.previewers").vim_buffer_cat.new,
|
file_previewer = require("telescope.previewers").vim_buffer_cat.new,
|
||||||
grep_previewer = require("telescope.previewers").vim_buffer_vimgrep.new,
|
grep_previewer = require("telescope.previewers").vim_buffer_vimgrep.new,
|
||||||
qflist_previewer = require("telescope.previewers").vim_buffer_qflist.new,
|
qflist_previewer = require("telescope.previewers").vim_buffer_qflist.new,
|
||||||
-- Developer configurations: Not meant for general override
|
-- Developer configurations: Not meant for general override
|
||||||
buffer_previewer_maker = require("telescope.previewers").buffer_previewer_maker,
|
buffer_previewer_maker = require("telescope.previewers").buffer_previewer_maker,
|
||||||
mappings = {
|
mappings = {
|
||||||
n = { ["q"] = require("telescope.actions").close },
|
n = { ["q"] = require("telescope.actions").close },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
extensions_list = { "fzf" },
|
extensions_list = { "fzf" },
|
||||||
extensions = {
|
extensions = {
|
||||||
fzf = {
|
fzf = {
|
||||||
fuzzy = true,
|
fuzzy = true,
|
||||||
override_generic_sorter = true,
|
override_generic_sorter = true,
|
||||||
override_file_sorter = true,
|
override_file_sorter = true,
|
||||||
case_mode = "smart_case",
|
case_mode = "smart_case",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
return options
|
return options
|
||||||
@@ -1,35 +1,35 @@
|
|||||||
local options = {
|
local options = {
|
||||||
auto_install = true,
|
auto_install = true,
|
||||||
ensure_installed = {
|
ensure_installed = {
|
||||||
"lua",
|
"lua",
|
||||||
"css",
|
"css",
|
||||||
"scss",
|
"scss",
|
||||||
"html",
|
"html",
|
||||||
"json",
|
"json",
|
||||||
"tsx",
|
"tsx",
|
||||||
"bash",
|
"bash",
|
||||||
"javascript",
|
"javascript",
|
||||||
"json",
|
"json",
|
||||||
"markdown",
|
"markdown",
|
||||||
"markdown_inline",
|
"markdown_inline",
|
||||||
"python",
|
"python",
|
||||||
"query",
|
"query",
|
||||||
"regex",
|
"regex",
|
||||||
"typescript",
|
"typescript",
|
||||||
"styled",
|
"styled",
|
||||||
"vim",
|
"vim",
|
||||||
"yaml",
|
"yaml",
|
||||||
"rust",
|
"rust",
|
||||||
"ruby",
|
"ruby",
|
||||||
"c",
|
"c",
|
||||||
},
|
},
|
||||||
|
|
||||||
highlight = {
|
highlight = {
|
||||||
enable = true,
|
enable = true,
|
||||||
use_languagetree = true,
|
use_languagetree = true,
|
||||||
},
|
},
|
||||||
|
|
||||||
indent = { enable = true },
|
indent = { enable = true },
|
||||||
}
|
}
|
||||||
|
|
||||||
return options
|
return options
|
||||||
@@ -1,14 +1,14 @@
|
|||||||
local options = {
|
local options = {
|
||||||
enable = true, -- Enable this plugin (Can be enabled/disabled later via commands)
|
enable = false, -- Enable this plugin (Can be enabled/disabled later via commands)
|
||||||
max_lines = 1, -- How many lines the window should span. Values <= 0 mean no limit.
|
max_lines = 0, -- How many lines the window should span. Values <= 0 mean no limit.
|
||||||
min_window_height = 0, -- Minimum editor window height to enable context. Values <= 0 mean no limit.
|
min_window_height = 0, -- Minimum editor window height to enable context. Values <= 0 mean no limit.
|
||||||
line_numbers = true,
|
line_numbers = true,
|
||||||
multiline_threshold = 20, -- Maximum number of lines to show for a single context
|
multiline_threshold = 20, -- Maximum number of lines to show for a single context
|
||||||
trim_scope = "outer", -- Which context lines to discard if `max_lines` is exceeded. Choices: 'inner', 'outer'
|
trim_scope = "outer", -- Which context lines to discard if `max_lines` is exceeded. Choices: 'inner', 'outer'
|
||||||
mode = "cursor", -- Line used to calculate context. Choices: 'cursor', 'topline'
|
mode = "topline", -- Line used to calculate context. Choices: 'cursor', 'topline'
|
||||||
-- Separator between context and content. Should be a single character string, like '-'.
|
-- Separator between context and content. Should be a single character string, like '-'.
|
||||||
-- When separator is set, the context will only show up when there are at least 2 lines above cursorline.
|
-- When separator is set, the context will only show up when there are at least 2 lines above cursorline.
|
||||||
separator = nil,
|
separator = "─",
|
||||||
zindex = 20, -- The Z-index of the context window
|
zindex = 20, -- The Z-index of the context window
|
||||||
on_attach = nil, -- (fun(buf: integer): boolean) return false to disable attaching
|
on_attach = nil, -- (fun(buf: integer): boolean) return false to disable attaching
|
||||||
}
|
}
|
||||||
|
|||||||
+51
-13
@@ -1,18 +1,56 @@
|
|||||||
return {
|
return {
|
||||||
-- {
|
|
||||||
-- "toppair/peek.nvim",
|
|
||||||
-- event = { "VeryLazy" },
|
|
||||||
-- build = "deno task --quiet build:fast",
|
|
||||||
-- config = function()
|
|
||||||
-- require("peek").setup()
|
|
||||||
-- vim.api.nvim_create_user_command("PeekOpen", require("peek").open, {})
|
|
||||||
-- vim.api.nvim_create_user_command("PeekClose", require("peek").close, {})
|
|
||||||
-- end,
|
|
||||||
-- },
|
|
||||||
{
|
{
|
||||||
"norcalli/nvim-colorizer.lua",
|
"NvChad/nvim-colorizer.lua",
|
||||||
init = function(_, opts)
|
config = function()
|
||||||
return require("colorizer").setup(opts)
|
require("colorizer").setup({
|
||||||
|
filetypes = { "css", "javascript", html = { mode = "foreground" }, "astro", "vue", "scss", "text" },
|
||||||
|
user_default_options = {
|
||||||
|
RGB = true, -- #RGB hex codes
|
||||||
|
RRGGBB = true, -- #RRGGBB hex codes
|
||||||
|
names = true, -- "Name" codes like Blue or blue
|
||||||
|
RRGGBBAA = true, -- #RRGGBBAA hex codes
|
||||||
|
AARRGGBB = false, -- 0xAARRGGBB hex codes
|
||||||
|
rgb_fn = true, -- CSS rgb() and rgba() functions
|
||||||
|
hsl_fn = true, -- CSS hsl() and hsla() functions
|
||||||
|
css = true, -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB
|
||||||
|
css_fn = true, -- Enable all CSS *functions*: rgb_fn, hsl_fn
|
||||||
|
-- Available modes for `mode`: foreground, background, virtualtext
|
||||||
|
mode = "virtualtext", -- Set the display mode.
|
||||||
|
-- Available methods are false / true / "normal" / "lsp" / "both"
|
||||||
|
-- True is same as normal
|
||||||
|
tailwind = false, -- Enable tailwind colors
|
||||||
|
-- parsers can contain values used in |user_default_options|
|
||||||
|
sass = { enable = true, parsers = { "css" } }, -- Enable sass colors
|
||||||
|
virtualtext = "■",
|
||||||
|
-- update color values even if buffer is not focused
|
||||||
|
-- example use: cmp_menu, cmp_docs
|
||||||
|
always_update = false,
|
||||||
|
},
|
||||||
|
-- all the sub-options of filetypes apply to buftypes
|
||||||
|
buftypes = {},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"toppair/peek.nvim",
|
||||||
|
event = { "VeryLazy" },
|
||||||
|
build = "deno task --quiet build:fast",
|
||||||
|
opts = {
|
||||||
|
auto_load = true, -- whether to automatically load preview when
|
||||||
|
close_on_bdelete = true,
|
||||||
|
syntax = true,
|
||||||
|
theme = "light", -- 'dark' or 'light'
|
||||||
|
update_on_change = true,
|
||||||
|
-- app = "webview", -- 'webview', 'browser', string or a table of strings
|
||||||
|
app = { "surf" },
|
||||||
|
filetype = { "markdown" }, -- list of filetypes to recognize as markdown
|
||||||
|
throttle_at = 200000, -- start throttling when file exceeds this
|
||||||
|
throttle_time = "auto", -- minimum amount of time in milliseconds
|
||||||
|
},
|
||||||
|
config = function(_, opts)
|
||||||
|
require("peek").setup(opts)
|
||||||
|
vim.api.nvim_create_user_command("PeekOpen", require("peek").open, {})
|
||||||
|
vim.api.nvim_create_user_command("PeekClose", require("peek").close, {})
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
+42
-4
@@ -1,4 +1,39 @@
|
|||||||
local config = {
|
local config = {
|
||||||
|
{
|
||||||
|
"folke/noice.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
|
opts = function()
|
||||||
|
return require("plugins.opts.noice")
|
||||||
|
end,
|
||||||
|
dependencies = {
|
||||||
|
"MunifTanjim/nui.nvim",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"mason-org/mason.nvim",
|
||||||
|
opts = {
|
||||||
|
ui = {
|
||||||
|
icons = {
|
||||||
|
package_installed = "✓",
|
||||||
|
package_pending = "➜",
|
||||||
|
package_uninstalled = "✗",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
ensure_isntalled = {
|
||||||
|
lsp = {
|
||||||
|
"typescript-language-server",
|
||||||
|
"eslint-lsp",
|
||||||
|
},
|
||||||
|
dap = {},
|
||||||
|
linter = {
|
||||||
|
"eslint_d",
|
||||||
|
},
|
||||||
|
formatter = {
|
||||||
|
"prettier",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"folke/snacks.nvim",
|
"folke/snacks.nvim",
|
||||||
priority = 1000,
|
priority = 1000,
|
||||||
@@ -10,16 +45,20 @@ local config = {
|
|||||||
indent = { enabled = false },
|
indent = { enabled = false },
|
||||||
input = { enabled = false },
|
input = { enabled = false },
|
||||||
picker = { enabled = true },
|
picker = { enabled = true },
|
||||||
notifier = { enabled = false },
|
notifier = { enabled = true },
|
||||||
|
notify = { enabled = true },
|
||||||
quickfile = { enabled = false },
|
quickfile = { enabled = false },
|
||||||
scope = { enabled = true },
|
scope = { enabled = true },
|
||||||
|
terminal = { enabled = true },
|
||||||
scroll = { enabled = true },
|
scroll = { enabled = true },
|
||||||
statuscolumn = { enabled = true },
|
statuscolumn = { enabled = true },
|
||||||
words = { enabled = true },
|
words = { enabled = true },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
-- Task runner
|
||||||
|
-- TODO: think if really necessary
|
||||||
{
|
{
|
||||||
'stevearc/overseer.nvim',
|
"stevearc/overseer.nvim",
|
||||||
opts = {},
|
opts = {},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -29,8 +68,7 @@ local config = {
|
|||||||
opts = {
|
opts = {
|
||||||
suppressed_dirs = { "~/", "~/Downloads", "/" },
|
suppressed_dirs = { "~/", "~/Downloads", "/" },
|
||||||
},
|
},
|
||||||
}
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return config
|
return config
|
||||||
+3
-15
@@ -27,27 +27,15 @@ return {
|
|||||||
for _, ext in ipairs(opts.extensions_list) do
|
for _, ext in ipairs(opts.extensions_list) do
|
||||||
telescope.load_extension(ext)
|
telescope.load_extension(ext)
|
||||||
end
|
end
|
||||||
|
require("plugins.utils.telescope").setup()
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{ 'mbbill/undotree' },
|
{ "mbbill/undotree" },
|
||||||
{
|
{
|
||||||
"folke/flash.nvim",
|
"folke/flash.nvim",
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
---@type Flash.Config
|
|
||||||
opts = {},
|
|
||||||
keys = {
|
|
||||||
{ "s", mode = { "n", "x", "o" }, function() require("flash").jump() end, desc = "Flash" },
|
|
||||||
{ "S", mode = { "n", "x", "o" }, function() require("flash").treesitter() end, desc = "Flash Treesitter" },
|
|
||||||
{ "r", mode = "o", function() require("flash").remote() end, desc = "Remote Flash" },
|
|
||||||
{ "R", mode = { "o", "x" }, function() require("flash").treesitter_search() end, desc = "Treesitter Search" },
|
|
||||||
{ "<c-s>", mode = { "c" }, function() require("flash").toggle() end, desc = "Toggle Flash Search" },
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'MagicDuck/grug-far.nvim',
|
"MagicDuck/grug-far.nvim",
|
||||||
-- config = function()
|
|
||||||
-- require('grug-far').setup({
|
|
||||||
-- });
|
|
||||||
-- end
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
+3
-22
@@ -10,11 +10,6 @@ return {
|
|||||||
-- variant = "darker", -- dark, light, darker | dawn
|
-- variant = "darker", -- dark, light, darker | dawn
|
||||||
-- },
|
-- },
|
||||||
-- },
|
-- },
|
||||||
{
|
|
||||||
"oskarnurm/koda.nvim",
|
|
||||||
lazy = false,
|
|
||||||
priority = 1000,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"dqnid/komau.vim",
|
"dqnid/komau.vim",
|
||||||
-- dir = "~/Documents/Code/komau.vim",
|
-- dir = "~/Documents/Code/komau.vim",
|
||||||
@@ -41,7 +36,8 @@ return {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ellisonleao/gruvbox.nvim",
|
"dqnid/gruvbox.nvim",
|
||||||
|
-- dir = "~/Documents/Code/gruvbox.nvim",
|
||||||
priority = 1000,
|
priority = 1000,
|
||||||
config = true,
|
config = true,
|
||||||
opts = {
|
opts = {
|
||||||
@@ -62,7 +58,7 @@ return {
|
|||||||
invert_signs = false,
|
invert_signs = false,
|
||||||
invert_tabline = false,
|
invert_tabline = false,
|
||||||
inverse = true, -- invert background for search, diffs, statuslines and errors
|
inverse = true, -- invert background for search, diffs, statuslines and errors
|
||||||
contrast = "", -- can be "hard", "soft" or empty string
|
contrast = "soft", -- can be "hard", "soft" or empty string
|
||||||
palette_overrides = {},
|
palette_overrides = {},
|
||||||
overrides = {},
|
overrides = {},
|
||||||
dim_inactive = false,
|
dim_inactive = false,
|
||||||
@@ -72,21 +68,6 @@ return {
|
|||||||
|
|
||||||
{ "echasnovski/mini.icons" },
|
{ "echasnovski/mini.icons" },
|
||||||
|
|
||||||
{
|
|
||||||
"folke/noice.nvim",
|
|
||||||
event = "VeryLazy",
|
|
||||||
opts = function()
|
|
||||||
return require("plugins.opts.noice")
|
|
||||||
end,
|
|
||||||
dependencies = {
|
|
||||||
"MunifTanjim/nui.nvim",
|
|
||||||
-- OPTIONAL:
|
|
||||||
-- `nvim-notify` is only needed, if you want to use the notification view.
|
|
||||||
-- If not available, we use `mini` as the fallback
|
|
||||||
-- "rcarriga/nvim-notify",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
{
|
||||||
"shortcuts/no-neck-pain.nvim",
|
"shortcuts/no-neck-pain.nvim",
|
||||||
version = "*",
|
version = "*",
|
||||||
|
|||||||
@@ -0,0 +1,55 @@
|
|||||||
|
local pickers = require("telescope.pickers")
|
||||||
|
local finders = require("telescope.finders")
|
||||||
|
local make_entry = require("telescope.make_entry")
|
||||||
|
local conf = require("telescope.config").values
|
||||||
|
|
||||||
|
local M = {}
|
||||||
|
|
||||||
|
local live_multigrep = function(opts)
|
||||||
|
opts = opts or {}
|
||||||
|
opts.cwd = opts.cwd or vim.uv.cwd()
|
||||||
|
|
||||||
|
local finder = finders.new_async_job({
|
||||||
|
command_generator = function(prompt)
|
||||||
|
if not prompt or prompt == "" then
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
|
||||||
|
local pieces = vim.split(prompt, " ")
|
||||||
|
local args = { "rg" }
|
||||||
|
if pieces[1] then
|
||||||
|
table.insert(args, "-e")
|
||||||
|
table.insert(args, pieces[1])
|
||||||
|
end
|
||||||
|
|
||||||
|
if pieces[2] then
|
||||||
|
table.insert(args, "-g")
|
||||||
|
table.insert(args, pieces[2])
|
||||||
|
end
|
||||||
|
|
||||||
|
---@diagnostic disable-next-line: deprecated
|
||||||
|
return vim.tbl_flatten({
|
||||||
|
args,
|
||||||
|
{ "--color=never", "--no-heading", "--with-filename", "--line-number", "--column", "--smart-case" },
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
entry_maker = make_entry.gen_from_vimgrep(opts),
|
||||||
|
cwd = opts.cwd,
|
||||||
|
})
|
||||||
|
|
||||||
|
pickers
|
||||||
|
.new(opts, {
|
||||||
|
debounce = 100,
|
||||||
|
prompt_title = "Multi Grep",
|
||||||
|
finder = finder,
|
||||||
|
previewer = conf.grep_previewer(opts),
|
||||||
|
sorter = require("telescope.sorters").empty(),
|
||||||
|
})
|
||||||
|
:find()
|
||||||
|
end
|
||||||
|
|
||||||
|
M.setup = function()
|
||||||
|
vim.keymap.set("n", "<leader>fW", live_multigrep)
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
Reference in new issue
Block a user