Compare commits
54 Commits
master
...
01dc6da430
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
01dc6da430 | ||
|
|
dc74cfc951 | ||
|
|
c6c8c6f5c3 | ||
|
|
efcbd0be30 | ||
|
|
1f58bb91cc | ||
|
|
3a383abe5a | ||
|
|
191d86f197 | ||
|
|
a993f440b1 | ||
|
|
98a100af8b | ||
|
|
19f8fcd06e | ||
|
|
118decfd8a | ||
|
|
610ff2426c | ||
| 7c32724416 | |||
|
|
904665d86c | ||
|
|
657a1cdc06 | ||
|
|
73c3e42eb2 | ||
|
|
ade185ece7 | ||
|
|
140f7483e1 | ||
|
|
8cd716f592 | ||
| 7d8d1a62a3 | |||
| a3f6e37e2d | |||
|
|
3a67710814 | ||
|
|
53b225e31f | ||
|
|
cb30bcc532 | ||
|
|
5c9d817d73 | ||
|
|
54ac7d5ce5 | ||
|
|
1c18db6ce9 | ||
|
|
5728cfae22 | ||
|
|
6f36503b48 | ||
|
|
89b7af86ff | ||
|
|
481ad345a1 | ||
|
|
b44a2b20de | ||
|
|
7dd8871a48 | ||
|
|
dea2a9e4e5 | ||
|
|
3f346ba288 | ||
|
|
4dda237702 | ||
| e93d0952cd | |||
| ee7e4f018a | |||
| bdad7dbab3 | |||
| 068782f050 | |||
| bb026a1bf6 | |||
| 1f597043eb | |||
| f17b2cd074 | |||
| e7cea6c88d | |||
| 2ea53bfb09 | |||
| 29017286ed | |||
| 059484dc4b | |||
| 13700286da | |||
| 186e2def11 | |||
| c234f6957a | |||
| d7b6c3b450 | |||
| cd3a5784fb | |||
| 850670d44c | |||
| 1d0b4786d1 |
@@ -1,54 +1,46 @@
|
|||||||
{
|
{
|
||||||
"FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" },
|
"blink.cmp": { "branch": "main", "commit": "9bcb14b43852a6f2bfd5ac9ef29cb5cf09b1b39b" },
|
||||||
"auto-session": { "branch": "main", "commit": "6cde3874a9283c2db55627acca5f28e4fa402320" },
|
|
||||||
"blink.cmp": { "branch": "main", "commit": "78336bc89ee5365633bcf754d93df01678b5c08f" },
|
|
||||||
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
|
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
|
||||||
"conform.nvim": { "branch": "master", "commit": "619363c30309d29ffa631e67c8183f2a72caa373" },
|
"conform.nvim": { "branch": "master", "commit": "8132ec733eed3bf415b97b76797ca41b59f51d7d" },
|
||||||
"fidget.nvim": { "branch": "main", "commit": "82404b196e73a00b1727a91903beef5ddc319d22" },
|
"fidget.nvim": { "branch": "main", "commit": "d9ba6b7bfe29b3119a610892af67602641da778e" },
|
||||||
"flash.nvim": { "branch": "main", "commit": "fcea7ff883235d9024dc41e638f164a450c14ca2" },
|
"flash.nvim": { "branch": "main", "commit": "3c942666f115e2811e959eabbdd361a025db8b63" },
|
||||||
"friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" },
|
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
|
||||||
"fzf-lua": { "branch": "main", "commit": "988416cc782dfe28bff3f0da9b8c943b236cd86a" },
|
"fzf-lua": { "branch": "main", "commit": "05eaee319fcf2f5a0d378c2848641858c8b8962e" },
|
||||||
"git-blame.nvim": { "branch": "master", "commit": "54da04264ec5313d602aebea7c5dc90141696ad7" },
|
"git-blame.nvim": { "branch": "master", "commit": "8503b199edf9a666fe7b1a989cf14e3c26b2eb03" },
|
||||||
"gitsigns.nvim": { "branch": "main", "commit": "25050e4ed39e628282831d4cbecb1850454ce915" },
|
"gitsigns.nvim": { "branch": "main", "commit": "88205953bd748322b49b26e1dfb0389932520dc9" },
|
||||||
"json-to-types.nvim": { "branch": "main", "commit": "b3547d2de9b2f1a6f4fd555f9a505a4f8c1d1880" },
|
"json-to-types.nvim": { "branch": "main", "commit": "e8dcc6ac710c59fcac354255a835f72916171ba8" },
|
||||||
"kanagawa.nvim": { "branch": "master", "commit": "bb85e4bfc8d89b0e62c8fa53ccdd13d12e2f77b3" },
|
"kanagawa.nvim": { "branch": "master", "commit": "debe91547d7fb1eef34ce26a5106f277fbfdd109" },
|
||||||
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
|
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
|
||||||
"lazydev.nvim": { "branch": "main", "commit": "ff2cbcba459b637ec3fd165a2be59b7bbaeedf0d" },
|
"lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" },
|
||||||
"markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" },
|
"mason-lspconfig.nvim": { "branch": "main", "commit": "f54e3c11fc9ebfcfc27e696182b0295b071d0811" },
|
||||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "21c5b3ebeaa0412e28096bb0701434c51c1fbf76" },
|
"mason-tool-installer.nvim": { "branch": "main", "commit": "93a9ff9b34c91c0cb0f7de8d5f7e4abce51d8903" },
|
||||||
"mason-tool-installer.nvim": { "branch": "main", "commit": "443f1ef8b5e6bf47045cb2217b6f748a223cf7dc" },
|
"mason.nvim": { "branch": "main", "commit": "8024d64e1330b86044fed4c8494ef3dcd483a67c" },
|
||||||
"mason.nvim": { "branch": "main", "commit": "2a6940af80375532e5e9e7c1f2fc6319a1b7a69d" },
|
"mini.icons": { "branch": "main", "commit": "94848dad1589a199f876539bd79befb0c5e3abf0" },
|
||||||
"mini.icons": { "branch": "main", "commit": "d48ad47359218d2b019034f95f601b3861180885" },
|
"mini.nvim": { "branch": "main", "commit": "94cae4660a8b2d95dbbd56e1fbc6fcfa2716d152" },
|
||||||
"mini.nvim": { "branch": "main", "commit": "a995fe9cd4193fb492b5df69175a351a74b3d36b" },
|
"mini.statusline": { "branch": "main", "commit": "452d27d764720cddcb9909b786598bb9e80c1ce8" },
|
||||||
"mini.statusline": { "branch": "main", "commit": "7091f554d7d26b5d55f4c937634da53ba277a44a" },
|
"neo-tree.nvim": { "branch": "v3.x", "commit": "f481de16a0eb59c985abac8985e3f2e2f75b4875" },
|
||||||
"neo-tree.nvim": { "branch": "v3.x", "commit": "ebd66767191714e008ce73b769518a763ff31bdc" },
|
|
||||||
"neotest": { "branch": "master", "commit": "ad991822b7076b1d940b33a9d6d0d30416d5df81" },
|
|
||||||
"neotest-jest": { "branch": "main", "commit": "0e7979d51301dfae5ef839d771bd28cf593fde3f" },
|
|
||||||
"neotest-plenary": { "branch": "master", "commit": "3523adcf9ffaad1911960c5813b0136c1b63a2ec" },
|
|
||||||
"neotest-vitest": { "branch": "main", "commit": "2f19d215d7d4d7f121826f99f6f35a81e2c18a6f" },
|
|
||||||
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
|
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
|
||||||
"nvim-dap": { "branch": "master", "commit": "531771530d4f82ad2d21e436e3cc052d68d7aebb" },
|
"nvim-dap": { "branch": "master", "commit": "2edd6375692d9ac1053d50acfe415c1eb2ba92d0" },
|
||||||
"nvim-dap-ui": { "branch": "master", "commit": "1a66cabaa4a4da0be107d5eda6d57242f0fe7e49" },
|
"nvim-dap-ui": { "branch": "master", "commit": "73a26abf4941aa27da59820fd6b028ebcdbcf932" },
|
||||||
"nvim-dap-virtual-text": { "branch": "master", "commit": "fbdb48c2ed45f4a8293d0d483f7730d24467ccb6" },
|
"nvim-dap-virtual-text": { "branch": "master", "commit": "fbdb48c2ed45f4a8293d0d483f7730d24467ccb6" },
|
||||||
"nvim-lsp-file-operations": { "branch": "master", "commit": "b9c795d3973e8eec22706af14959bc60c579e771" },
|
"nvim-lsp-file-operations": { "branch": "master", "commit": "9744b738183a5adca0f916527922078a965515ed" },
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "a683e0ddf0cf64c6cd689e18ffb480ade3c162b7" },
|
"nvim-lspconfig": { "branch": "master", "commit": "314b35335cc84bc2a085c84c69da955ba22da163" },
|
||||||
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
|
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
|
||||||
"nvim-treesitter": { "branch": "main", "commit": "4916d6592ede8c07973490d9322f187e07dfefac" },
|
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
|
||||||
"nvim-treesitter-context": { "branch": "master", "commit": "b311b30818951d01f7b4bf650521b868b3fece16" },
|
"nvim-treesitter-context": { "branch": "master", "commit": "1a1a7c5d6d75cb49bf64049dafab15ebe294a79f" },
|
||||||
"nvim-treesitter-textobjects": { "branch": "main", "commit": "851e865342e5a4cb1ae23d31caf6e991e1c99f1e" },
|
"nvim-treesitter-textobjects": { "branch": "master", "commit": "89ebe73cd2836db80a22d9748999ace0241917a5" },
|
||||||
"nvim-vtsls": { "branch": "main", "commit": "0b5f73c9e50ce95842ea07bb3f05c7d66d87d14a" },
|
"nvim-vtsls": { "branch": "main", "commit": "60b493e641d3674c030c660cabe7a2a3f7a914be" },
|
||||||
"nvim-web-devicons": { "branch": "master", "commit": "dfbfaa967a6f7ec50789bead7ef87e336c1fa63c" },
|
"nvim-web-devicons": { "branch": "master", "commit": "1fb58cca9aebbc4fd32b086cb413548ce132c127" },
|
||||||
"oil.nvim": { "branch": "master", "commit": "b73018b75affd13fa38e2fc94ef753b465f770d7" },
|
"nvim-window-picker": { "branch": "main", "commit": "6382540b2ae5de6c793d4aa2e3fe6dbb518505ec" },
|
||||||
"otter.nvim": { "branch": "main", "commit": "d781eda3bc18dbc8677f9a24abdc705fb74e4428" },
|
"oil.nvim": { "branch": "master", "commit": "08c2bce8b00fd780fb7999dbffdf7cd174e896fb" },
|
||||||
"plenary.nvim": { "branch": "master", "commit": "74b06c6c75e4eeb3108ec01852001636d85a932b" },
|
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
|
||||||
"project.nvim": { "branch": "main", "commit": "8c6bad7d22eef1b71144b401c9f74ed01526a4fb" },
|
"project.nvim": { "branch": "main", "commit": "8c6bad7d22eef1b71144b401c9f74ed01526a4fb" },
|
||||||
"rainbow-delimiters.nvim": { "branch": "master", "commit": "a798325b7f36acc62741d1029930a7b96d4dd4bf" },
|
"rainbow-delimiters.nvim": { "branch": "master", "commit": "55ad4fb76ab68460f700599b7449385f0c4e858e" },
|
||||||
"rustaceanvim": { "branch": "master", "commit": "88575b98bb9937fb9983ddec5e532b67e75ce677" },
|
"rustaceanvim": { "branch": "master", "commit": "b554761a920d807c3a7e8388d0dd34205ae4fd0d" },
|
||||||
"snacks.nvim": { "branch": "main", "commit": "882c996cf28183f4d63640de0b4c02ec886d01f2" },
|
"snacks.nvim": { "branch": "main", "commit": "bc0630e43be5699bb94dadc302c0d21615421d93" },
|
||||||
"toggleterm.nvim": { "branch": "main", "commit": "50ea089fc548917cc3cc16b46a8211833b9e3c7c" },
|
"toggleterm.nvim": { "branch": "main", "commit": "50ea089fc548917cc3cc16b46a8211833b9e3c7c" },
|
||||||
"trouble.nvim": { "branch": "main", "commit": "bd67efe408d4816e25e8491cc5ad4088e708a69a" },
|
"trouble.nvim": { "branch": "main", "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" },
|
||||||
"vim-helm": { "branch": "master", "commit": "2c8525fd98e57472769d137317bca83e477858ce" },
|
"vim-helm": { "branch": "master", "commit": "cc5ac22444332381f38084a6c7f023c25eef6201" },
|
||||||
"vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" },
|
"vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" },
|
||||||
"which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" },
|
"which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" }
|
||||||
"window-picker": { "branch": "main", "commit": "6382540b2ae5de6c793d4aa2e3fe6dbb518505ec" }
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,27 +1,2 @@
|
|||||||
vim.keymap.set("n", "-", "<cmd>Oil --float<cr>", { desc = "Open Parent Dir in Oil" })
|
vim.keymap.set("n", "-", "<cmd>Oil --float<cr>", {desc="Open Parent Dir in Oil"})
|
||||||
vim.keymap.set("n", "<leader>l", "<cmd>Lazy<cr>", { desc = "Open Lazy" })
|
vim.keymap.set("n", "<leader>l", "<cmd>Lazy<cr>", {desc="Open Lazy"})
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>wp", function()
|
|
||||||
local entry = require("oil").get_cursor_entry()
|
|
||||||
if entry.type ~= "file" then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
local dir = require("oil").get_current_dir()
|
|
||||||
require("oil").close({ exit_if_last_buf = false })
|
|
||||||
local win = require("window-picker").pick_window({
|
|
||||||
filter_rules = {
|
|
||||||
autoselect_one = true,
|
|
||||||
include_current_win = true,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
if win then
|
|
||||||
vim.api.nvim_set_current_win(win)
|
|
||||||
local path = vim.fs.joinpath(dir, entry.name)
|
|
||||||
vim.cmd.edit(path)
|
|
||||||
end
|
|
||||||
end, {
|
|
||||||
desc = "Open with window picker",
|
|
||||||
buffer = true,
|
|
||||||
nowait = true,
|
|
||||||
})
|
|
||||||
|
|||||||
@@ -1,17 +1,17 @@
|
|||||||
-- Bootstrap lazy.nvim
|
-- Bootstrap lazy.nvim
|
||||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||||
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||||
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
||||||
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
|
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
|
||||||
if vim.v.shell_error ~= 0 then
|
if vim.v.shell_error ~= 0 then
|
||||||
vim.api.nvim_echo({
|
vim.api.nvim_echo({
|
||||||
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
||||||
{ out, "WarningMsg" },
|
{ out, "WarningMsg" },
|
||||||
{ "\nPress any key to exit..." },
|
{ "\nPress any key to exit..." },
|
||||||
}, true, {})
|
}, true, {})
|
||||||
vim.fn.getchar()
|
vim.fn.getchar()
|
||||||
os.exit(1)
|
os.exit(1)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
vim.opt.rtp:prepend(lazypath)
|
vim.opt.rtp:prepend(lazypath)
|
||||||
|
|
||||||
@@ -25,16 +25,15 @@ require("config.options")
|
|||||||
|
|
||||||
-- Setup lazy.nvim
|
-- Setup lazy.nvim
|
||||||
require("lazy").setup({
|
require("lazy").setup({
|
||||||
spec = {
|
spec = {
|
||||||
-- import your plugins
|
-- import your plugins
|
||||||
{ import = "plugins" },
|
{ import = "plugins" },
|
||||||
},
|
},
|
||||||
-- Configure any other settings here. See the documentation for more details.
|
-- Configure any other settings here. See the documentation for more details.
|
||||||
-- colorscheme that will be used when installing plugins.
|
-- colorscheme that will be used when installing plugins.
|
||||||
install = { colorscheme = { "kanagawa" } },
|
install = { colorscheme = { "kanagawa" } },
|
||||||
-- automatically check for plugin updates
|
-- automatically check for plugin updates
|
||||||
checker = { enabled = true },
|
checker = { enabled = true },
|
||||||
})
|
})
|
||||||
|
|
||||||
require("config.keymap")
|
require("config.keymap")
|
||||||
require("fzf-lua").register_ui_select()
|
|
||||||
|
|||||||
@@ -1,17 +1,15 @@
|
|||||||
vim.o.sessionoptions = "blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions"
|
vim.o.fillchars = 'eob: ,fold: ,foldopen:,foldsep: ,foldclose:'
|
||||||
vim.o.fillchars = "eob: ,fold: ,foldopen:,foldsep: ,foldclose:"
|
vim.o.foldcolumn = '1'
|
||||||
vim.o.foldcolumn = "1"
|
|
||||||
vim.o.foldenable = true
|
vim.o.foldenable = true
|
||||||
vim.o.foldexpr = "v:lua.vim.lsp.foldexpr()"
|
vim.o.foldexpr = 'v:lua.vim.lsp.foldexpr()'
|
||||||
vim.o.foldlevel = 99
|
vim.o.foldlevel = 99
|
||||||
vim.o.foldlevelstart = 99
|
vim.o.foldlevelstart = 99
|
||||||
vim.o.foldmethod = "expr"
|
vim.o.foldmethod = 'expr'
|
||||||
-- vim.o.winborder = "bold"
|
|
||||||
|
|
||||||
vim.opt.langmap = "+]ü["
|
vim.opt.langmap = "+]ü["
|
||||||
vim.keymap.set("n", "ü", "[", { remap = true })
|
vim.keymap.set("n", "ü", "[", { remap = true })
|
||||||
|
|
||||||
vim.opt.expandtab = false
|
vim.opt.expandtab = true
|
||||||
vim.opt.shiftwidth = 4
|
vim.opt.shiftwidth = 4
|
||||||
vim.opt.tabstop = 4
|
vim.opt.tabstop = 4
|
||||||
vim.opt.softtabstop = 4
|
vim.opt.softtabstop = 4
|
||||||
@@ -30,7 +28,7 @@ vim.opt.number = true
|
|||||||
vim.opt.relativenumber = true
|
vim.opt.relativenumber = true
|
||||||
|
|
||||||
-- Enable mouse mode, can be useful for resizing splits for example!
|
-- Enable mouse mode, can be useful for resizing splits for example!
|
||||||
vim.opt.mouse = "a"
|
vim.opt.mouse = 'a'
|
||||||
|
|
||||||
-- Don't show the mode, since it's already in the status line
|
-- Don't show the mode, since it's already in the status line
|
||||||
vim.opt.showmode = false
|
vim.opt.showmode = false
|
||||||
@@ -40,7 +38,7 @@ vim.opt.showmode = false
|
|||||||
-- Remove this option if you want your OS clipboard to remain independent.
|
-- Remove this option if you want your OS clipboard to remain independent.
|
||||||
-- See `:help 'clipboard'`
|
-- See `:help 'clipboard'`
|
||||||
vim.schedule(function()
|
vim.schedule(function()
|
||||||
vim.opt.clipboard = "unnamedplus"
|
vim.opt.clipboard = 'unnamedplus'
|
||||||
end)
|
end)
|
||||||
|
|
||||||
-- Enable break indent
|
-- Enable break indent
|
||||||
@@ -54,7 +52,7 @@ vim.opt.ignorecase = true
|
|||||||
vim.opt.smartcase = true
|
vim.opt.smartcase = true
|
||||||
|
|
||||||
-- Keep signcolumn on by default
|
-- Keep signcolumn on by default
|
||||||
vim.opt.signcolumn = "yes"
|
vim.opt.signcolumn = 'yes'
|
||||||
|
|
||||||
-- Decrease update time
|
-- Decrease update time
|
||||||
vim.opt.updatetime = 250
|
vim.opt.updatetime = 250
|
||||||
@@ -70,10 +68,10 @@ vim.opt.splitbelow = true
|
|||||||
-- See `:help 'list'`
|
-- See `:help 'list'`
|
||||||
-- and `:help 'listchars'`
|
-- and `:help 'listchars'`
|
||||||
vim.opt.list = true
|
vim.opt.list = true
|
||||||
vim.opt.listchars = { tab = "» ", trail = "·", nbsp = "␣" }
|
vim.opt.listchars = { tab = '» ', trail = '·', nbsp = '␣' }
|
||||||
|
|
||||||
-- Preview substitutions live, as you type!
|
-- Preview substitutions live, as you type!
|
||||||
vim.opt.inccommand = "split"
|
vim.opt.inccommand = 'split'
|
||||||
|
|
||||||
-- Show which line your cursor is on
|
-- Show which line your cursor is on
|
||||||
vim.opt.cursorline = true
|
vim.opt.cursorline = true
|
||||||
@@ -98,10 +96,10 @@ vim.diagnostic.config({ virtual_text = true })
|
|||||||
|
|
||||||
-- Clear highlights on search when pressing <Esc> in normal mode
|
-- Clear highlights on search when pressing <Esc> in normal mode
|
||||||
-- See `:help hlsearch`
|
-- See `:help hlsearch`
|
||||||
vim.keymap.set("n", "<Esc>", "<cmd>nohlsearch<CR>")
|
vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>')
|
||||||
|
|
||||||
-- Diagnostic keymaps
|
-- Diagnostic keymaps
|
||||||
vim.keymap.set("n", "<leader>q", vim.diagnostic.setloclist, { desc = "Open diagnostic [Q]uickfix list" })
|
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagnostic [Q]uickfix list' })
|
||||||
|
|
||||||
-- Exit terminal mode in the builtin terminal with a shortcut that is a bit easier
|
-- Exit terminal mode in the builtin terminal with a shortcut that is a bit easier
|
||||||
-- for people to discover. Otherwise, you normally need to press <C-\><C-n>, which
|
-- for people to discover. Otherwise, you normally need to press <C-\><C-n>, which
|
||||||
@@ -109,7 +107,7 @@ vim.keymap.set("n", "<leader>q", vim.diagnostic.setloclist, { desc = "Open diagn
|
|||||||
--
|
--
|
||||||
-- NOTE: This won't work in all terminal emulators/tmux/etc. Try your own mapping
|
-- NOTE: This won't work in all terminal emulators/tmux/etc. Try your own mapping
|
||||||
-- or just use <C-\><C-n> to exit terminal mode
|
-- or just use <C-\><C-n> to exit terminal mode
|
||||||
vim.keymap.set("t", "<Esc><Esc>", "<C-\\><C-n>", { desc = "Exit terminal mode" })
|
vim.keymap.set('t', '<Esc><Esc>', '<C-\\><C-n>', { desc = 'Exit terminal mode' })
|
||||||
|
|
||||||
-- TIP: Disable arrow keys in normal mode
|
-- TIP: Disable arrow keys in normal mode
|
||||||
-- vim.keymap.set('n', '<left>', '<cmd>echo "Use h to move!!"<CR>')
|
-- vim.keymap.set('n', '<left>', '<cmd>echo "Use h to move!!"<CR>')
|
||||||
@@ -121,17 +119,17 @@ vim.keymap.set("t", "<Esc><Esc>", "<C-\\><C-n>", { desc = "Exit terminal mode" }
|
|||||||
-- Use CTRL+<hjkl> to switch between windows
|
-- Use CTRL+<hjkl> to switch between windows
|
||||||
--
|
--
|
||||||
-- See `:help wincmd` for a list of all window commands
|
-- See `:help wincmd` for a list of all window commands
|
||||||
vim.keymap.set("n", "<C-h>", "<C-w><C-h>", { desc = "Move focus to the left window" })
|
vim.keymap.set('n', '<C-h>', '<C-w><C-h>', { desc = 'Move focus to the left window' })
|
||||||
vim.keymap.set("n", "<C-l>", "<C-w><C-l>", { desc = "Move focus to the right window" })
|
vim.keymap.set('n', '<C-l>', '<C-w><C-l>', { desc = 'Move focus to the right window' })
|
||||||
vim.keymap.set("n", "<C-j>", "<C-w><C-j>", { desc = "Move focus to the lower window" })
|
vim.keymap.set('n', '<C-j>', '<C-w><C-j>', { desc = 'Move focus to the lower window' })
|
||||||
vim.keymap.set("n", "<C-k>", "<C-w><C-k>", { desc = "Move focus to the upper window" })
|
vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper window' })
|
||||||
|
|
||||||
-- Highlight when yanking (copying) text
|
-- Highlight when yanking (copying) text
|
||||||
-- Try it with `yap` in normal mode
|
-- Try it with `yap` in normal mode
|
||||||
-- See `:help vim.highlight.on_yank()`
|
-- See `:help vim.highlight.on_yank()`
|
||||||
vim.api.nvim_create_autocmd("TextYankPost", {
|
vim.api.nvim_create_autocmd('TextYankPost', {
|
||||||
desc = "Highlight when yanking (copying) text",
|
desc = 'Highlight when yanking (copying) text',
|
||||||
group = vim.api.nvim_create_augroup("kickstart-highlight-yank", { clear = true }),
|
group = vim.api.nvim_create_augroup('kickstart-highlight-yank', { clear = true }),
|
||||||
callback = function()
|
callback = function()
|
||||||
vim.highlight.on_yank()
|
vim.highlight.on_yank()
|
||||||
end,
|
end,
|
||||||
|
|||||||
@@ -10,10 +10,6 @@ return {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
opts = {
|
opts = {
|
||||||
async = true,
|
|
||||||
format = {
|
|
||||||
timeout_ms = 5000,
|
|
||||||
},
|
|
||||||
formatters_by_ft = {
|
formatters_by_ft = {
|
||||||
lua = { "stylua" },
|
lua = { "stylua" },
|
||||||
-- Conform will run multiple formatters sequentially
|
-- Conform will run multiple formatters sequentially
|
||||||
@@ -23,10 +19,10 @@ return {
|
|||||||
-- Conform will run the first available formatter
|
-- Conform will run the first available formatter
|
||||||
javascript = { "eslint_d", "prettierd", "prettier", stop_after_first = true },
|
javascript = { "eslint_d", "prettierd", "prettier", stop_after_first = true },
|
||||||
typescript = { "eslint_d", "prettierd", "prettier", stop_after_first = true },
|
typescript = { "eslint_d", "prettierd", "prettier", stop_after_first = true },
|
||||||
prisma = { "null-ls", lsp_format = false },
|
|
||||||
format_on_save = {
|
format_on_save = {
|
||||||
-- These options will be passed to conform.format()
|
-- These options will be passed to conform.format()
|
||||||
timeout_ms = 5000,
|
timeout_ms = 500,
|
||||||
|
lsp_format = "fallback",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ return {
|
|||||||
dependencies = {
|
dependencies = {
|
||||||
"rcarriga/nvim-dap-ui",
|
"rcarriga/nvim-dap-ui",
|
||||||
"nvim-neotest/nvim-nio",
|
"nvim-neotest/nvim-nio",
|
||||||
"theHamsta/nvim-dap-virtual-text",
|
"theHamsta/nvim-dap-virtual-text"
|
||||||
},
|
},
|
||||||
keys = {
|
keys = {
|
||||||
{
|
{
|
||||||
@@ -21,51 +21,6 @@ return {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
local dap = require("dap")
|
|
||||||
require("dapui").setup()
|
require("dapui").setup()
|
||||||
dap.adapters["pwa-node"] = {
|
|
||||||
type = "server",
|
|
||||||
host = "localhost",
|
|
||||||
port = "${port}",
|
|
||||||
executable = {
|
|
||||||
command = "js-debug-adapter",
|
|
||||||
args = {
|
|
||||||
"${port}",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
for _, language in ipairs({ "typescript", "javascript" }) do
|
|
||||||
dap.configurations[language] = {
|
|
||||||
{
|
|
||||||
type = "pwa-node",
|
|
||||||
request = "launch",
|
|
||||||
name = "Launch file",
|
|
||||||
program = "${file}",
|
|
||||||
cwd = "${workspaceFolder}",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type = "pwa-node",
|
|
||||||
request = "attach",
|
|
||||||
name = "Attach to process ID",
|
|
||||||
processId = require("dap.utils").pick_process,
|
|
||||||
cwd = "${workspaceFolder}",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
end
|
|
||||||
-- require("dap").configurations.typescript = {
|
|
||||||
-- type = "pwa-node",
|
|
||||||
-- request = "launch",
|
|
||||||
-- name = "Launch file",
|
|
||||||
-- program = "${file}",
|
|
||||||
-- cwd = "${workspaceFolder}",
|
|
||||||
-- }
|
|
||||||
-- require("dap").configurations.javascript = {
|
|
||||||
-- type = "pwa-node",
|
|
||||||
-- request = "launch",
|
|
||||||
-- name = "Launch file",
|
|
||||||
-- program = "${file}",
|
|
||||||
-- cwd = "${workspaceFolder}",
|
|
||||||
-- }
|
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,92 +1,23 @@
|
|||||||
return {
|
return {
|
||||||
"ibhagwan/fzf-lua",
|
"ibhagwan/fzf-lua",
|
||||||
dependencies = { "echasnovski/mini.icons" },
|
dependencies = { "echasnovski/mini.icons" },
|
||||||
config = function()
|
opts = {
|
||||||
require("fzf-lua").setup({
|
winopts={
|
||||||
winopts = {
|
height = 0.85,
|
||||||
height = 0.85,
|
width = 0.95,
|
||||||
width = 0.95,
|
}
|
||||||
},
|
|
||||||
})
|
|
||||||
require("fzf-lua").register_ui_select()
|
|
||||||
end,
|
|
||||||
keys = {
|
|
||||||
{
|
|
||||||
"<leader>ff",
|
|
||||||
function()
|
|
||||||
require("fzf-lua").files()
|
|
||||||
end,
|
|
||||||
desc = "Find Files in current dir",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>fb",
|
|
||||||
function()
|
|
||||||
require("fzf-lua").buffers()
|
|
||||||
end,
|
|
||||||
desc = "Find open buffers",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader><leader>",
|
|
||||||
function()
|
|
||||||
require("fzf-lua").buffers()
|
|
||||||
end,
|
|
||||||
desc = "Find open buffers",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>fgf",
|
|
||||||
function()
|
|
||||||
require("fzf-lua").git_files()
|
|
||||||
end,
|
|
||||||
desc = "Find git files",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>fgb",
|
|
||||||
function()
|
|
||||||
require("fzf-lua").git_branches()
|
|
||||||
end,
|
|
||||||
desc = "Find git branches",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>fB",
|
|
||||||
function()
|
|
||||||
require("fzf-lua").builtin()
|
|
||||||
end,
|
|
||||||
desc = "Find builtin finders",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>fr",
|
|
||||||
function()
|
|
||||||
require("fzf-lua").resume()
|
|
||||||
end,
|
|
||||||
desc = "Resume last search",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>fG",
|
|
||||||
function()
|
|
||||||
require("fzf-lua").live_grep()
|
|
||||||
end,
|
|
||||||
desc = "Grep files live",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>fw",
|
|
||||||
function()
|
|
||||||
require("fzf-lua").grep_cword()
|
|
||||||
end,
|
|
||||||
desc = "Grep current word",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>fW",
|
|
||||||
function()
|
|
||||||
require("fzf-lua").grep_cWORD()
|
|
||||||
end,
|
|
||||||
desc = "Grep current WORD",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>/",
|
|
||||||
function()
|
|
||||||
require("fzf-lua").lgrep_curbuf()
|
|
||||||
end,
|
|
||||||
desc = "Grep current buffer",
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
|
keys = {
|
||||||
|
{ "<leader>ff", function() require('fzf-lua').files() end, desc="Find Files in current dir"},
|
||||||
|
{ "<leader>fb", function() require('fzf-lua').buffers() end, desc="Find open buffers"},
|
||||||
|
{ "<leader><leader>", function() require('fzf-lua').buffers() end, desc="Find open buffers"},
|
||||||
|
{ "<leader>fgf", function() require('fzf-lua').git_files() end, desc="Find git files"},
|
||||||
|
{ "<leader>fgb", function() require('fzf-lua').git_branches() end, desc="Find git branches"},
|
||||||
|
{ "<leader>fB", function() require('fzf-lua').builtin() end, desc="Find builtin finders"},
|
||||||
|
{ "<leader>fr", function() require('fzf-lua').resume() end, desc="Resume last search"},
|
||||||
|
{ "<leader>fG", function() require('fzf-lua').live_grep() end, desc="Grep files live"},
|
||||||
|
{ "<leader>fw", function() require('fzf-lua').grep_cword() end, desc="Grep current word"},
|
||||||
|
{ "<leader>fW", function() require('fzf-lua').grep_cWORD() end, desc="Grep current WORD"},
|
||||||
|
{ "<leader>/", function() require('fzf-lua').lgrep_curbuf() end, desc="Grep current buffer"},
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,9 +6,6 @@ return {
|
|||||||
"WhoIsSethDaniel/mason-tool-installer.nvim",
|
"WhoIsSethDaniel/mason-tool-installer.nvim",
|
||||||
"yioneko/nvim-vtsls",
|
"yioneko/nvim-vtsls",
|
||||||
opts = {
|
opts = {
|
||||||
format = {
|
|
||||||
timeout_ms = 10000,
|
|
||||||
},
|
|
||||||
settings = {
|
settings = {
|
||||||
typescript = {
|
typescript = {
|
||||||
inlayHints = {
|
inlayHints = {
|
||||||
@@ -23,7 +20,7 @@ return {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
{ "j-hui/fidget.nvim", opts = {} },
|
{ "j-hui/fidget.nvim", opts = {} },
|
||||||
|
|
||||||
"saghen/blink.cmp",
|
"saghen/blink.cmp",
|
||||||
},
|
},
|
||||||
@@ -90,7 +87,7 @@ return {
|
|||||||
|
|
||||||
local client = vim.lsp.get_client_by_id(event.data.client_id)
|
local client = vim.lsp.get_client_by_id(event.data.client_id)
|
||||||
if
|
if
|
||||||
client and client_supports_method(client, vim.lsp.protocol.Methods.textDocument_documentHighlight, event.buf)
|
client and client_supports_method(client, vim.lsp.protocol.Methods.textDocument_documentHighlight, event.buf)
|
||||||
then
|
then
|
||||||
local highlight_augroup = vim.api.nvim_create_augroup("kickstart-lsp-highlight", { clear = false })
|
local highlight_augroup = vim.api.nvim_create_augroup("kickstart-lsp-highlight", { clear = false })
|
||||||
vim.api.nvim_create_autocmd({ "CursorHold", "CursorHoldI" }, {
|
vim.api.nvim_create_autocmd({ "CursorHold", "CursorHoldI" }, {
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
return {
|
|
||||||
"iamcco/markdown-preview.nvim",
|
|
||||||
cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" },
|
|
||||||
build = "cd app && yarn install",
|
|
||||||
init = function()
|
|
||||||
vim.g.mkdp_filetypes = { "markdown" }
|
|
||||||
end,
|
|
||||||
ft = { "markdown" },
|
|
||||||
}
|
|
||||||
@@ -1,20 +1,20 @@
|
|||||||
return {
|
return {
|
||||||
"nvim-mini/mini.nvim",
|
"echasnovski/mini.nvim",
|
||||||
version = "*",
|
version = "*",
|
||||||
config = function()
|
config = function()
|
||||||
require("mini.pairs").setup({})
|
require("mini.pairs").setup({})
|
||||||
require("mini.surround").setup({
|
require("mini.surround").setup({
|
||||||
mappings = {
|
mappings = {
|
||||||
add = "gza", -- Add surrounding in Normal and Visual modes
|
add = "gza", -- Add surrounding in Normal and Visual modes
|
||||||
delete = "gzd", -- Delete surrounding
|
delete = "gzd", -- Delete surrounding
|
||||||
find = "gzf", -- Find surrounding (to the right)
|
find = "gzf", -- Find surrounding (to the right)
|
||||||
find_left = "gzF", -- Find surrounding (to the left)
|
find_left = "gzF", -- Find surrounding (to the left)
|
||||||
highlight = "gzh", -- Highlight surrounding
|
highlight = "gzh", -- Highlight surrounding
|
||||||
replace = "gzr", -- Replace surrounding
|
replace = "gzr", -- Replace surrounding
|
||||||
update_n_lines = "gzn", -- Update `n_lines`
|
update_n_lines = "gzn", -- Update `n_lines`
|
||||||
|
|
||||||
suffix_last = "l", -- Suffix to search with "prev" method
|
suffix_last = "l", -- Suffix to search with "prev" method
|
||||||
suffix_next = "n", -- Suffix to search with "next" method
|
suffix_next = "n", -- Suffix to search with "next" method
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
|
|||||||
@@ -1,37 +0,0 @@
|
|||||||
return {
|
|
||||||
"nvim-neotest/neotest",
|
|
||||||
dependencies = {
|
|
||||||
"nvim-neotest/nvim-nio",
|
|
||||||
"nvim-lua/plenary.nvim",
|
|
||||||
"antoinemadec/FixCursorHold.nvim",
|
|
||||||
"nvim-treesitter/nvim-treesitter",
|
|
||||||
"marilari88/neotest-vitest",
|
|
||||||
"nvim-neotest/neotest-jest",
|
|
||||||
"nvim-neotest/neotest-plenary",
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
require("neotest").setup({
|
|
||||||
adapters = {
|
|
||||||
|
|
||||||
require("neotest-jest")({
|
|
||||||
jestCommand = "npm test --",
|
|
||||||
jestArguments = function(defaultArguments, context)
|
|
||||||
return defaultArguments
|
|
||||||
end,
|
|
||||||
jestConfigFile = "custom.jest.config.ts",
|
|
||||||
env = { CI = true },
|
|
||||||
cwd = function(path)
|
|
||||||
return vim.fn.getcwd()
|
|
||||||
end,
|
|
||||||
isTestFile = require("neotest-jest.jest-util").defaultIsTestFile,
|
|
||||||
}),
|
|
||||||
require("neotest-vitest"),
|
|
||||||
require("neotest-plenary"),
|
|
||||||
|
|
||||||
--require("neotest-vim-test")({
|
|
||||||
-- ignore_file_types = { "python", "vim", "lua" },
|
|
||||||
-- }),
|
|
||||||
},
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
@@ -1,11 +1,62 @@
|
|||||||
return {
|
return {
|
||||||
"nvim-treesitter/nvim-treesitter-textobjects",
|
"nvim-treesitter/nvim-treesitter-textobjects",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter"
|
||||||
},
|
},
|
||||||
init = function()
|
init = function()
|
||||||
vim.g.no_plugin_maps = true
|
require'nvim-treesitter.configs'.setup {
|
||||||
end,
|
textobjects = {
|
||||||
config = function()
|
select = {
|
||||||
end,
|
enable = true,
|
||||||
|
|
||||||
|
-- Automatically jump forward to textobj, similar to targets.vim
|
||||||
|
lookahead = true,
|
||||||
|
|
||||||
|
keymaps = {
|
||||||
|
-- You can use the capture groups defined in textobjects.scm
|
||||||
|
["af"] = "@function.outer",
|
||||||
|
["if"] = "@function.inner",
|
||||||
|
["ac"] = "@class.outer",
|
||||||
|
["bi"] = "@block.inner",
|
||||||
|
-- You can optionally set descriptions to the mappings (used in the desc parameter of
|
||||||
|
-- nvim_buf_set_keymap) which plugins like which-key display
|
||||||
|
["ic"] = { query = "@class.inner", desc = "Select inner part of a class region" },
|
||||||
|
-- You can also use captures from other query groups like `locals.scm`
|
||||||
|
["as"] = { query = "@local.scope", query_group = "locals", desc = "Select language scope" },
|
||||||
|
},
|
||||||
|
-- You can choose the select mode (default is charwise 'v')
|
||||||
|
--
|
||||||
|
-- Can also be a function which gets passed a table with the keys
|
||||||
|
-- * query_string: eg '@function.inner'
|
||||||
|
-- * method: eg 'v' or 'o'
|
||||||
|
-- and should return the mode ('v', 'V', or '<c-v>') or a table
|
||||||
|
-- mapping query_strings to modes.
|
||||||
|
selection_modes = {
|
||||||
|
['@parameter.outer'] = 'v', -- charwise
|
||||||
|
['@function.outer'] = 'V', -- linewise
|
||||||
|
['@class.outer'] = '<c-v>', -- blockwise
|
||||||
|
},
|
||||||
|
-- If you set this to `true` (default is `false`) then any textobject is
|
||||||
|
-- extended to include preceding or succeeding whitespace. Succeeding
|
||||||
|
-- whitespace has priority in order to act similarly to eg the built-in
|
||||||
|
-- `ap`.
|
||||||
|
--
|
||||||
|
-- Can also be a function which gets passed a table with the keys
|
||||||
|
-- * query_string: eg '@function.inner'
|
||||||
|
-- * selection_mode: eg 'v'
|
||||||
|
-- and should return true or false
|
||||||
|
include_surrounding_whitespace = true,
|
||||||
|
},
|
||||||
|
swap = {
|
||||||
|
enable = true,
|
||||||
|
swap_next = {
|
||||||
|
["<leader>a"] = "@parameter.inner",
|
||||||
|
},
|
||||||
|
swap_previous = {
|
||||||
|
["<leader>s"] = "@parameter.inner",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,24 +1,23 @@
|
|||||||
return {
|
return {
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
build = ":TSUpdate",
|
build = ":TSUpdate",
|
||||||
branch = "main",
|
config = function ()
|
||||||
config = function()
|
local configs = require("nvim-treesitter.configs")
|
||||||
local configs = require("nvim-treesitter.config")
|
|
||||||
--
|
configs.setup({
|
||||||
-- configs.setup({
|
ensure_installed = "all",
|
||||||
-- ensure_installed = "all",
|
sync_install = false,
|
||||||
-- sync_install = false,
|
highlight = { enable = true },
|
||||||
-- highlight = { enable = true },
|
indent = { enable = true },
|
||||||
-- indent = { enable = true },
|
incremental_selection = {
|
||||||
-- incremental_selection = {
|
enable = true,
|
||||||
-- enable = true,
|
keymaps = {
|
||||||
-- keymaps = {
|
init_selection = "<Enter>",
|
||||||
-- init_selection = "<Enter>",
|
node_incremental = "<Enter>",
|
||||||
-- node_incremental = "<Enter>",
|
scope_incremental = false,
|
||||||
-- scope_incremental = false,
|
node_decremental = "<Backspace>"
|
||||||
-- node_decremental = "<Backspace>",
|
},
|
||||||
-- },
|
}
|
||||||
-- },
|
})
|
||||||
-- })
|
end
|
||||||
end,
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
return {
|
|
||||||
"jmbuhr/otter.nvim",
|
|
||||||
dependencies = {
|
|
||||||
"nvim-treesitter/nvim-treesitter",
|
|
||||||
},
|
|
||||||
opts = {},
|
|
||||||
}
|
|
||||||
@@ -1,57 +0,0 @@
|
|||||||
return {
|
|
||||||
"rmagatti/auto-session",
|
|
||||||
lazy = false,
|
|
||||||
keys = {
|
|
||||||
-- Will use Telescope if installed or a vim.ui.select picker otherwise
|
|
||||||
{ "<leader>wr", "<cmd>AutoSession search<CR>", desc = "Session search" },
|
|
||||||
{ "<leader>ws", "<cmd>AutoSession save<CR>", desc = "Save session" },
|
|
||||||
{ "<leader>wa", "<cmd>AutoSession toggle<CR>", desc = "Toggle autosave" },
|
|
||||||
},
|
|
||||||
|
|
||||||
---enables autocomplete for opts
|
|
||||||
---@module "auto-session"
|
|
||||||
---@type AutoSession.Config
|
|
||||||
opts = {
|
|
||||||
-- The following are already the default values, no need to provide them if these are already the settings you want.
|
|
||||||
session_lens = {
|
|
||||||
picker = nil, -- "telescope"|"snacks"|"fzf"|"select"|nil Pickers are detected automatically but you can also manually choose one. Falls back to vim.ui.select
|
|
||||||
mappings = {
|
|
||||||
-- Mode can be a string or a table, e.g. {"i", "n"} for both insert and normal mode
|
|
||||||
delete_session = { "i", "<C-d>" },
|
|
||||||
alternate_session = { "i", "<C-s>" },
|
|
||||||
copy_session = { "i", "<C-y>" },
|
|
||||||
},
|
|
||||||
|
|
||||||
picker_opts = {
|
|
||||||
-- For Telescope, you can set theme options here, see:
|
|
||||||
-- https://github.com/nvim-telescope/telescope.nvim/blob/master/doc/telescope.txt#L112
|
|
||||||
-- https://github.com/nvim-telescope/telescope.nvim/blob/master/lua/telescope/themes.lua
|
|
||||||
--
|
|
||||||
-- border = true,
|
|
||||||
-- layout_config = {
|
|
||||||
-- width = 0.8, -- Can set width and height as percent of window
|
|
||||||
-- height = 0.5,
|
|
||||||
-- },
|
|
||||||
|
|
||||||
-- For Snacks, you can set layout options here, see:
|
|
||||||
-- https://github.com/folke/snacks.nvim/blob/main/docs/picker.md#%EF%B8%8F-layouts
|
|
||||||
--
|
|
||||||
-- preset = "dropdown",
|
|
||||||
-- preview = false,
|
|
||||||
-- layout = {
|
|
||||||
-- width = 0.4,
|
|
||||||
-- height = 0.4,
|
|
||||||
-- },
|
|
||||||
|
|
||||||
-- For Fzf-Lua, picker_opts just turns into winopts, see:
|
|
||||||
-- https://github.com/ibhagwan/fzf-lua#customization
|
|
||||||
--
|
|
||||||
-- height = 0.8,
|
|
||||||
-- width = 0.50,
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Telescope only: If load_on_setup is false, make sure you use `:AutoSession search` to open the picker as it will initialize everything first
|
|
||||||
load_on_setup = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@@ -17,45 +17,16 @@ return {
|
|||||||
quickfile = { enabled = true },
|
quickfile = { enabled = true },
|
||||||
scope = { enabled = true },
|
scope = { enabled = true },
|
||||||
scroll = { enabled = true },
|
scroll = { enabled = true },
|
||||||
scratch = { enabled = true },
|
|
||||||
statuscolumn = { enabled = true },
|
statuscolumn = { enabled = true },
|
||||||
words = { enabled = true },
|
words = { enabled = true },
|
||||||
},
|
},
|
||||||
keys = {
|
keys = {
|
||||||
{
|
|
||||||
"<leader>gl",
|
|
||||||
function()
|
|
||||||
Snacks.git.blame_line()
|
|
||||||
end,
|
|
||||||
desc = "Snacks blame line",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>gl",
|
|
||||||
function()
|
|
||||||
Snacks.git.blame_line()
|
|
||||||
end,
|
|
||||||
desc = "Snacks blame line",
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"<leader>gg",
|
"<leader>gg",
|
||||||
function()
|
function()
|
||||||
Snacks.lazygit()
|
Snacks.lazygit()
|
||||||
end,
|
end,
|
||||||
desc = "Snacks LazyGit",
|
desc = "Lazygit",
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>.",
|
|
||||||
function()
|
|
||||||
Snacks.scratch()
|
|
||||||
end,
|
|
||||||
desc = "Toggle Scratch Buffer",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>s.",
|
|
||||||
function()
|
|
||||||
Snacks.scratch.select()
|
|
||||||
end,
|
|
||||||
desc = "Select Scratch Buffer",
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
init = function()
|
init = function()
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
return {
|
|
||||||
"s1n7ax/nvim-window-picker",
|
|
||||||
name = "window-picker",
|
|
||||||
event = "VeryLazy",
|
|
||||||
version = "2.*",
|
|
||||||
config = function()
|
|
||||||
require("window-picker").setup()
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user