Compare commits

..

8 Commits

Author SHA1 Message Date
markus.dieckmann
7dd6bd1675 null-ls and session 2025-10-17 15:23:13 +02:00
markus.dieckmann
6bdb8cca5b Merge branch 'master' of https://gitea.brudi.xyz/kenobi/dotfiles 2025-10-13 11:45:54 +02:00
markus.dieckmann
94416193b1 lock 2025-10-13 11:44:29 +02:00
markus.dieckmann
35de5c6b06 vim options 2025-10-13 11:44:23 +02:00
markus.dieckmann
7e16018101 WIP dap 2025-10-13 11:44:07 +02:00
markus.dieckmann
87b17e8d2d git blame snacks 2025-10-13 11:43:58 +02:00
markus.dieckmann
c29ad60bee mini namespace 2025-10-13 11:43:52 +02:00
markus.dieckmann
076695fdfb async conform 2025-10-13 11:43:41 +02:00
12 changed files with 278 additions and 96 deletions

BIN
.DS_Store vendored Normal file

Binary file not shown.

View File

@@ -1,46 +1,49 @@
{
"auto-session": { "branch": "main", "commit": "517a75727d28a4d1ee9c79b56dde239a5408778f" },
"blink.cmp": { "branch": "main", "commit": "327fff91fe6af358e990be7be1ec8b78037d2138" },
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
"conform.nvim": { "branch": "master", "commit": "b4aab989db276993ea5dcb78872be494ce546521" },
"fidget.nvim": { "branch": "main", "commit": "b45d21d33d61ed9295308eb6571c0a5f0f7f3765" },
"flash.nvim": { "branch": "main", "commit": "b68bda044d68e4026c4e1ec6df3c5afd7eb8e341" },
"conform.nvim": { "branch": "master", "commit": "fbcb4fa7f34bfea9be702ffff481a8e336ebf6ed" },
"fidget.nvim": { "branch": "main", "commit": "3f5475949679953af6d78654db29b944fa826e6a" },
"flash.nvim": { "branch": "main", "commit": "2febce67ff9cf7638d2569d17c41af02c38401eb" },
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
"fzf-lua": { "branch": "main", "commit": "3776d03a4afa967bd6c4b7f78e9e90bc21425236" },
"git-blame.nvim": { "branch": "master", "commit": "9874ec1ec8bc53beb33b7cd82c092b85271a578b" },
"gitsigns.nvim": { "branch": "main", "commit": "f780609807eca1f783a36a8a31c30a48fbe150c5" },
"fzf-lua": { "branch": "main", "commit": "83e4080ae886a42ec48c5c26ce5892ceb557c425" },
"git-blame.nvim": { "branch": "master", "commit": "54da04264ec5313d602aebea7c5dc90141696ad7" },
"gitsigns.nvim": { "branch": "main", "commit": "1ee5c1fd068c81f9dd06483e639c2aa4587dc197" },
"json-to-types.nvim": { "branch": "main", "commit": "e8dcc6ac710c59fcac354255a835f72916171ba8" },
"kanagawa.nvim": { "branch": "master", "commit": "debe91547d7fb1eef34ce26a5106f277fbfdd109" },
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
"lazydev.nvim": { "branch": "main", "commit": "258d2a5ef4a3e3d6d9ba9da72c9725c53e9afcbd" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "a1067cf84b4ff81b66d2bf4d01f4cbdb5de40bd0" },
"kanagawa.nvim": { "branch": "master", "commit": "aef7f5cec0a40dbe7f3304214850c472e2264b10" },
"lazy.nvim": { "branch": "main", "commit": "1ea3c4085785f460fb0e46d2fe1ee895f5f9e7c1" },
"lazydev.nvim": { "branch": "main", "commit": "e28ce52fc7ff79fcb76f0e79ee6fb6182fca90b9" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "6bdb14f230de0904229ec367b410fb817e59b072" },
"mason-tool-installer.nvim": { "branch": "main", "commit": "517ef5994ef9d6b738322664d5fdd948f0fdeb46" },
"mason.nvim": { "branch": "main", "commit": "7dc4facca9702f95353d5a1f87daf23d78e31c2a" },
"mini.icons": { "branch": "main", "commit": "f9a177c11daa7829389b7b6eaaec8b8a5c47052d" },
"mason.nvim": { "branch": "main", "commit": "ad7146aa61dcaeb54fa900144d768f040090bff0" },
"mini.icons": { "branch": "main", "commit": "284798619aed9f4c1ac1b9417b9a5e3b4b85ef3a" },
"mini.nvim": { "branch": "main", "commit": "94cae4660a8b2d95dbbd56e1fbc6fcfa2716d152" },
"mini.statusline": { "branch": "main", "commit": "3c86b8a1cb67e347e91815b21662c28fd52ac144" },
"neo-tree.nvim": { "branch": "v3.x", "commit": "ed057048a281b418d5318dd5153f9486daa517a3" },
"mini.statusline": { "branch": "main", "commit": "faa39777ca729c6dafe86041207ba8db9321cb29" },
"neo-tree.nvim": { "branch": "v3.x", "commit": "c4c168e459395275c552179a1baf9c3d885d6a74" },
"none-ls-extras.nvim": { "branch": "main", "commit": "402c6b5c29f0ab57fac924b863709f37f55dc298" },
"none-ls.nvim": { "branch": "main", "commit": "a96172f673f720cd4f3572e1fcd08400ed3eb25d" },
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
"nvim-dap": { "branch": "master", "commit": "7367cec8e8f7a0b1e4566af9a7ef5959d11206a7" },
"nvim-dap": { "branch": "master", "commit": "6782b097af2417a4c3e33849b0a26ae2188bd7ea" },
"nvim-dap-ui": { "branch": "master", "commit": "cf91d5e2d07c72903d052f5207511bf7ecdb7122" },
"nvim-dap-virtual-text": { "branch": "master", "commit": "fbdb48c2ed45f4a8293d0d483f7730d24467ccb6" },
"nvim-lsp-file-operations": { "branch": "master", "commit": "9744b738183a5adca0f916527922078a965515ed" },
"nvim-lspconfig": { "branch": "master", "commit": "ef73a4f2a1ddf0439eb97b46de2aab265ddba1cd" },
"nvim-lspconfig": { "branch": "master", "commit": "ac98db2f9f06a56498ec890a96928774eae412c3" },
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
"nvim-treesitter-context": { "branch": "master", "commit": "41847d3dafb5004464708a3db06b14f12bde548a" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "71385f191ec06ffc60e80e6b0c9a9d5daed4824c" },
"nvim-vtsls": { "branch": "main", "commit": "0b5f73c9e50ce95842ea07bb3f05c7d66d87d14a" },
"nvim-web-devicons": { "branch": "master", "commit": "6e51ca170563330e063720449c21f43e27ca0bc1" },
"nvim-web-devicons": { "branch": "master", "commit": "b8221e42cf7287c4dcde81f232f58d7b947c210d" },
"nvim-window-picker": { "branch": "main", "commit": "6382540b2ae5de6c793d4aa2e3fe6dbb518505ec" },
"oil.nvim": { "branch": "master", "commit": "07f80ad645895af849a597d1cac897059d89b686" },
"oil.nvim": { "branch": "master", "commit": "71948729cda5fc1b761d6ae60ff774b5525f1d50" },
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
"project.nvim": { "branch": "main", "commit": "8c6bad7d22eef1b71144b401c9f74ed01526a4fb" },
"rainbow-delimiters.nvim": { "branch": "master", "commit": "687ef75fdbd497eabc9eea92b52e7b4d403b3319" },
"rainbow-delimiters.nvim": { "branch": "master", "commit": "3277ad5f96eb03c9d618c88e24f683e4364e578c" },
"rustaceanvim": { "branch": "master", "commit": "12504405821c05874d2d1f6b5ec919f9808e2c99" },
"snacks.nvim": { "branch": "main", "commit": "d67a47739dfc652cfcf66c59e929c704a854b37a" },
"snacks.nvim": { "branch": "main", "commit": "454ba02d69347c0735044f159b95d2495fc79a73" },
"toggleterm.nvim": { "branch": "main", "commit": "50ea089fc548917cc3cc16b46a8211833b9e3c7c" },
"trouble.nvim": { "branch": "main", "commit": "f176232e7759c4f8abd923c21e3e5a5c76cd6837" },
"vim-helm": { "branch": "master", "commit": "cc5ac22444332381f38084a6c7f023c25eef6201" },
"trouble.nvim": { "branch": "main", "commit": "c098362fe603d3922095e7db595961e020bdf2d0" },
"vim-helm": { "branch": "master", "commit": "2c8525fd98e57472769d137317bca83e477858ce" },
"vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" },
"which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" }
"which-key.nvim": { "branch": "main", "commit": "b4177e3eaf15fe5eb8357ebac2286d488be1ed00" }
}

View File

@@ -1,17 +1,17 @@
-- Bootstrap lazy.nvim
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
if vim.v.shell_error ~= 0 then
vim.api.nvim_echo({
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
{ out, "WarningMsg" },
{ "\nPress any key to exit..." },
}, true, {})
vim.fn.getchar()
os.exit(1)
end
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
if vim.v.shell_error ~= 0 then
vim.api.nvim_echo({
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
{ out, "WarningMsg" },
{ "\nPress any key to exit..." },
}, true, {})
vim.fn.getchar()
os.exit(1)
end
end
vim.opt.rtp:prepend(lazypath)
@@ -25,15 +25,16 @@ require("config.options")
-- Setup lazy.nvim
require("lazy").setup({
spec = {
-- import your plugins
{ import = "plugins" },
},
-- Configure any other settings here. See the documentation for more details.
-- colorscheme that will be used when installing plugins.
install = { colorscheme = { "kanagawa" } },
-- automatically check for plugin updates
checker = { enabled = true },
spec = {
-- import your plugins
{ import = "plugins" },
},
-- Configure any other settings here. See the documentation for more details.
-- colorscheme that will be used when installing plugins.
install = { colorscheme = { "kanagawa" } },
-- automatically check for plugin updates
checker = { enabled = true },
})
require("config.keymap")
require("fzf-lua").register_ui_select()

View File

@@ -1,10 +1,11 @@
vim.o.fillchars = 'eob: ,fold: ,foldopen:,foldsep: ,foldclose:'
vim.o.foldcolumn = '1'
vim.o.fillchars = "eob: ,fold: ,foldopen:,foldsep: ,foldclose:"
vim.o.foldcolumn = "1"
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.foldlevelstart = 99
vim.o.foldmethod = 'expr'
vim.o.foldmethod = "expr"
-- vim.o.winborder = "bold"
vim.opt.langmap = "+]ü["
vim.keymap.set("n", "ü", "[", { remap = true })
@@ -28,7 +29,7 @@ vim.opt.number = true
vim.opt.relativenumber = true
-- 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
vim.opt.showmode = false
@@ -38,7 +39,7 @@ vim.opt.showmode = false
-- Remove this option if you want your OS clipboard to remain independent.
-- See `:help 'clipboard'`
vim.schedule(function()
vim.opt.clipboard = 'unnamedplus'
vim.opt.clipboard = "unnamedplus"
end)
-- Enable break indent
@@ -52,7 +53,7 @@ vim.opt.ignorecase = true
vim.opt.smartcase = true
-- Keep signcolumn on by default
vim.opt.signcolumn = 'yes'
vim.opt.signcolumn = "yes"
-- Decrease update time
vim.opt.updatetime = 250
@@ -68,10 +69,10 @@ vim.opt.splitbelow = true
-- See `:help 'list'`
-- and `:help 'listchars'`
vim.opt.list = true
vim.opt.listchars = { tab = '» ', trail = '·', nbsp = '' }
vim.opt.listchars = { tab = "» ", trail = "·", nbsp = "" }
-- Preview substitutions live, as you type!
vim.opt.inccommand = 'split'
vim.opt.inccommand = "split"
-- Show which line your cursor is on
vim.opt.cursorline = true
@@ -96,10 +97,10 @@ vim.diagnostic.config({ virtual_text = true })
-- Clear highlights on search when pressing <Esc> in normal mode
-- See `:help hlsearch`
vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>')
vim.keymap.set("n", "<Esc>", "<cmd>nohlsearch<CR>")
-- 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
-- for people to discover. Otherwise, you normally need to press <C-\><C-n>, which
@@ -107,7 +108,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
-- 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
-- vim.keymap.set('n', '<left>', '<cmd>echo "Use h to move!!"<CR>')
@@ -119,17 +120,17 @@ vim.keymap.set('t', '<Esc><Esc>', '<C-\\><C-n>', { desc = 'Exit terminal mode' }
-- Use CTRL+<hjkl> to switch between windows
--
-- 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-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-k>', '<C-w><C-k>', { desc = 'Move focus to the upper 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-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" })
-- Highlight when yanking (copying) text
-- Try it with `yap` in normal mode
-- See `:help vim.highlight.on_yank()`
vim.api.nvim_create_autocmd('TextYankPost', {
desc = 'Highlight when yanking (copying) text',
group = vim.api.nvim_create_augroup('kickstart-highlight-yank', { clear = true }),
vim.api.nvim_create_autocmd("TextYankPost", {
desc = "Highlight when yanking (copying) text",
group = vim.api.nvim_create_augroup("kickstart-highlight-yank", { clear = true }),
callback = function()
vim.highlight.on_yank()
end,

View File

@@ -10,6 +10,10 @@ return {
},
},
opts = {
async = true,
format = {
timeout_ms = 5000,
},
formatters_by_ft = {
lua = { "stylua" },
-- Conform will run multiple formatters sequentially
@@ -19,10 +23,10 @@ return {
-- Conform will run the first available formatter
javascript = { "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 = {
-- These options will be passed to conform.format()
timeout_ms = 500,
lsp_format = "fallback",
timeout_ms = 5000,
},
},
},

View File

@@ -4,7 +4,7 @@ return {
dependencies = {
"rcarriga/nvim-dap-ui",
"nvim-neotest/nvim-nio",
"theHamsta/nvim-dap-virtual-text"
"theHamsta/nvim-dap-virtual-text",
},
keys = {
{
@@ -22,5 +22,24 @@ return {
},
config = function()
require("dapui").setup()
require("dap").adapters["pwa-node"] = {
type = "server",
host = "localhost",
port = "${port}",
}
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,
}

View File

@@ -1,23 +1,92 @@
return {
"ibhagwan/fzf-lua",
dependencies = { "echasnovski/mini.icons" },
opts = {
winopts={
height = 0.85,
width = 0.95,
}
},
config = function()
require("fzf-lua").setup({
winopts = {
height = 0.85,
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"},
}
{
"<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",
},
},
}

View File

@@ -6,6 +6,9 @@ return {
"WhoIsSethDaniel/mason-tool-installer.nvim",
"yioneko/nvim-vtsls",
opts = {
format = {
timeout_ms = 10000,
},
settings = {
typescript = {
inlayHints = {
@@ -20,7 +23,7 @@ return {
},
},
{ "j-hui/fidget.nvim", opts = {} },
{ "j-hui/fidget.nvim", opts = {} },
"saghen/blink.cmp",
},
@@ -87,7 +90,7 @@ return {
local client = vim.lsp.get_client_by_id(event.data.client_id)
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
local highlight_augroup = vim.api.nvim_create_augroup("kickstart-lsp-highlight", { clear = false })
vim.api.nvim_create_autocmd({ "CursorHold", "CursorHoldI" }, {

View File

@@ -1,20 +1,20 @@
return {
"echasnovski/mini.nvim",
"nvim-mini/mini.nvim",
version = "*",
config = function()
require("mini.pairs").setup({})
require("mini.surround").setup({
mappings = {
add = "gza", -- Add surrounding in Normal and Visual modes
delete = "gzd", -- Delete surrounding
find = "gzf", -- Find surrounding (to the right)
find_left = "gzF", -- Find surrounding (to the left)
highlight = "gzh", -- Highlight surrounding
replace = "gzr", -- Replace surrounding
add = "gza", -- Add surrounding in Normal and Visual modes
delete = "gzd", -- Delete surrounding
find = "gzf", -- Find surrounding (to the right)
find_left = "gzF", -- Find surrounding (to the left)
highlight = "gzh", -- Highlight surrounding
replace = "gzr", -- Replace surrounding
update_n_lines = "gzn", -- Update `n_lines`
suffix_last = "l", -- Suffix to search with "prev" method
suffix_next = "n", -- Suffix to search with "next" method
suffix_last = "l", -- Suffix to search with "prev" method
suffix_next = "n", -- Suffix to search with "next" method
},
})
end,

View File

@@ -0,0 +1,18 @@
return {
"nvimtools/none-ls.nvim",
dependencies = {
"nvim-lua/plenary.nvim",
"nvimtools/none-ls-extras.nvim",
},
config = function()
local null_ls = require("null-ls")
null_ls.setup({
sources = {
null_ls.builtins.code_actions.gitsigns,
null_ls.builtins.code_actions.refactoring,
null_ls.builtins.formatting.prisma_format,
require("none-ls.diagnostics.eslint"), -- requires none-ls-extras.nvim
},
})
end,
}

View File

@@ -0,0 +1,57 @@
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,
},
},
}

View File

@@ -21,6 +21,13 @@ return {
words = { enabled = true },
},
keys = {
{
"<leader>gl",
function()
Snacks.git.blame_line()
end,
desc = "Snacks blame line",
},
{
"<leader>gg",
function()
@@ -49,8 +56,8 @@ return {
Snacks.toggle.diagnostics():map("<leader>ud")
Snacks.toggle.line_number():map("<leader>ul")
Snacks.toggle
.option("conceallevel", { off = 0, on = vim.o.conceallevel > 0 and vim.o.conceallevel or 2 })
:map("<leader>uc")
.option("conceallevel", { off = 0, on = vim.o.conceallevel > 0 and vim.o.conceallevel or 2 })
:map("<leader>uc")
Snacks.toggle.treesitter():map("<leader>uT")
Snacks.toggle.option("background", { off = "light", on = "dark", name = "Dark Background" }):map("<leader>ub")
Snacks.toggle.inlay_hints():map("<leader>uh")