Something went wrong. Try again.
Something went wrong. Try again.
nvim-config init.lua
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729-- See `:help mapleader`-- Must happen before plugins are loaded (otherwise wrong leader will be used)vim.g.mapleader = ' 'vim.g.maplocalleader = ' '
-- vim.keymap.set('i', 'kj', '<ESC>')vim.keymap.set('n', ';', ':')vim.keymap.set('n', '<leader>nt', ':Neotree<CR>')vim.keymap.set('v', '<leader>p', '"_dP')vim.keymap.set('v', '<leader>y', '"+y')vim.keymap.set('n', '<leader>Y', 'gg"+yG')vim.keymap.set('n', '<leader>lb', ':set linebreak wrap<CR>', { desc = 'set [l]ine[b]reak and wrap' })-- vim.keymap.set('n', '<leader>sh', builtin.help_tags, { desc = '[S]earch [H]elp' })-- vim.keymap.set('n', 'ex', ':Vex<CR>')-- vim.keymap.set('n', '', '')
-- -- See `:help 'clipboard'`vim.opt.clipboard = 'unnamed'vim.schedule(function() vim.opt.clipboard = 'unnamedplus'end)
-- Move selected text downvim.api.nvim_set_keymap('v', 'J', ":m '>+1<CR>gv=gv", { noremap = true, silent = true })
-- Move selected text upvim.api.nvim_set_keymap('v', 'K', ":m '<-2<CR>gv=gv", { noremap = true, silent = true })
vim.opt.relativenumber = truevim.opt.number = truevim.opt.scrolloff = 12vim.opt.tabstop = 4vim.opt.shiftwidth = 4vim.opt.softtabstop = 4vim.opt.expandtab = truevim.opt.smartindent = truevim.opt.wrap = falsevim.opt.mouse = 'a'vim.opt.termguicolors = truevim.o.confirm = truevim.g.have_nerd_font = truevim.opt.spell = false
-- This clears the background color of nvimvim.cmd [[highlight Normal guibg=nonehighlight NonText guibg=nonehighlight Normal ctermbg=nonehighlight NonText ctermbg=none]]
vim.api.nvim_create_autocmd({"BufRead", "BufNewFile"}, { pattern = "*.tmpl", callback = function() vim.opt_local.commentstring = "<!-- %s -->" -- Use the HTML comment string end,})
-- Set to true if you have a Nerd Font installed and selected in the terminal
-- [[ Setting options ]]-- See `:help vim.opt`-- NOTE: You can change these options as you wish!-- For more options, you can see `:help option-list`
-- Make line numbers default-- You can also add relative line numbers, to help with jumping.-- Experiment for yourself to see if you like it!
-- Don't show the mode, since it's already in the status linevim.opt.showmode = false
-- Enable break indentvim.opt.breakindent = true
-- Save undo historyvim.opt.undofile = true
-- Case-insensitive searching UNLESS \C or one or more capital letters in the search termvim.opt.ignorecase = truevim.opt.smartcase = true
-- Keep signcolumn on by defaultvim.opt.signcolumn = 'yes'
-- Decrease update timevim.opt.updatetime = 250
-- Decrease mapped sequence wait time-- Displays which-key popup soonervim.opt.timeoutlen = 300
-- Configure how new splits should be openedvim.opt.splitright = truevim.opt.splitbelow = true
-- Sets how neovim will display certain whitespace characters in the editor.-- See `:help 'list'`-- and `:help 'listchars'`-- vim.opt.list = true-- vim.opt.listchars = { space ='·' ,tab = '» ', trail = '·', nbsp = '␣' }
-- Preview substitutions live, as you type!vim.opt.inccommand = 'split'
-- Show which line your cursor is onvim.opt.cursorline = true
-- nvim-ufo fold settingsvim.opt.foldcolumn = '1'vim.opt.foldlevel = 99vim.opt.foldlevelstart = 99vim.opt.foldenable = true
-- [[ Basic Autocommands ]]-- See `:help lua-guide-autocommands`
-- 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 }), callback = function() vim.highlight.on_yank() end,})
-- [[ Install `lazy.nvim` plugin manager ]]-- See `:help lazy.nvim.txt` or https://github.com/folke/lazy.nvim for more infolocal lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim'if not vim.uv.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 error('Error cloning lazy.nvim:\n' .. out) endend ---@diagnostic disable-next-line: undefined-fieldvim.opt.rtp:prepend(lazypath)
require('lazy').setup({ 'brenoprata10/nvim-highlight-colors', { 'ThePrimeagen/harpoon', branch = 'harpoon2', dependencies = { 'nvim-lua/plenary.nvim' }, }, -- { "rose-pine/neovim", name = "rose-pine" }, { 'sphamba/smear-cursor.nvim', opts = {}, }, { -- Useful plugin to show you pending keybinds. 'folke/which-key.nvim', event = 'VimEnter', -- Sets the loading event to 'VimEnter' config = function() -- This is the function that runs, AFTER loading require('which-key').setup()
-- Document existing key chains require('which-key').add { { '<leader>c', group = '[C]ode' }, { '<leader>d', group = '[D]ocument' }, { '<leader>g', group = '[G]it' }, { '<leader>r', group = '[R]ename' }, { '<leader>s', group = '[S]earch' }, { '<leader>w', group = '[W]orkspace' }, { '<leader>t', group = '[T]oggle' }, -- { '<leader>h', group = 'Git [H]unk', mode = { 'n', 'v' } }, } end, }, { 'nvim-neo-tree/neo-tree.nvim', branch = 'v3.x', dependencies = { 'nvim-lua/plenary.nvim', 'nvim-tree/nvim-web-devicons', -- not strictly required, but recommended 'MunifTanjim/nui.nvim', -- "3rd/image.nvim", -- Optional image support in preview window: See `# Preview Mode` for more information }, config = function() require('neo-tree').setup { commands = { -- open the node (toggling directories); if it's a file, also close neo-tree open_and_close = function(state) local node = state.tree and state.tree:get_node() require('neo-tree.sources.filesystem.commands').open(state) if node and node.type == 'file' then require('neo-tree.command').execute { action = 'close' } end end, }, window = { mappings = { -- enter: open file and close neo-tree ['<cr>'] = 'open_and_close', -- shift+enter: open file but keep neo-tree open -- NOTE: <S-cr> is only distinguishable from <cr> if the terminal sends a -- distinct escape sequence (kitty keyboard protocol terminals, or tmux with -- extended-keys on, plus nvim 0.10+). Otherwise it acts like plain <cr> -- and closes neo-tree too. If so, swap it for <C-cr> or e.g. <leader><cr>. ['<S-cr>'] = 'open', }, }, } end, }, { -- Fuzzy Finder (files, lsp, etc) 'nvim-telescope/telescope.nvim', event = 'VimEnter', version = '*', dependencies = { 'nvim-lua/plenary.nvim', { -- If encountering errors, see telescope-fzf-native README for installation instructions 'nvim-telescope/telescope-fzf-native.nvim',
-- `build` is used to run some command when the plugin is installed/updated. -- This is only run then, not every time neovim starts up. build = 'make',
-- `cond` is a condition used to determine whether this plugin should be -- installed and loaded. cond = function() return vim.fn.executable 'make' == 1 end, }, { 'nvim-telescope/telescope-ui-select.nvim' },
-- Useful for getting pretty icons, but requires a Nerd Font. { 'nvim-tree/nvim-web-devicons', enabled = vim.g.have_nerd_font }, }, config = function() -- :Telescope help_tags -- See `:help telescope` and `:help telescope.setup()` require('telescope').setup { extensions = { ['ui-select'] = { require('telescope.themes').get_dropdown(), }, }, }
-- Enable Telescope extensions if they are installed pcall(require('telescope').load_extension, 'fzf') pcall(require('telescope').load_extension, 'ui-select')
-- See `:help telescope.builtin` local builtin = require 'telescope.builtin' vim.keymap.set('n', '<leader>sh', builtin.help_tags, { desc = '[S]earch [H]elp' }) vim.keymap.set('n', '<leader>sk', builtin.keymaps, { desc = '[S]earch [K]eymaps' }) vim.keymap.set('n', '<leader>sf', builtin.find_files, { desc = '[S]earch [F]iles' }) vim.keymap.set('n', '<leader>ss', builtin.builtin, { desc = '[S]earch [S]elect Telescope' }) vim.keymap.set('n', '<leader>sw', builtin.grep_string, { desc = '[S]earch current [W]ord' }) vim.keymap.set('n', '<leader>sg', builtin.live_grep, { desc = '[S]earch by [G]rep' }) local function get_visual_selection() vim.cmd('noau normal! "vy"') local text = vim.fn.getreg('v') vim.fn.setreg('v', {}) text = text:gsub('\n', ' '):gsub('^%s+', ''):gsub('%s+$', '') if text == '' then return nil end return text end vim.keymap.set('v', '<leader>sg', function() local text = get_visual_selection() if not text then return end builtin.live_grep { default_text = text, additional_args = { '--fixed-strings' }, } end, { desc = '[S]earch visual selection by [G]rep' }) vim.keymap.set('n', '<leader>sd', builtin.diagnostics, { desc = '[S]earch [D]iagnostics' }) vim.keymap.set('n', '<leader>sr', builtin.resume, { desc = '[S]earch [R]esume' }) vim.keymap.set('n', '<leader>s.', builtin.oldfiles, { desc = '[S]earch Recent Files ("." for repeat)' }) vim.keymap.set('n', '<leader><leader>', builtin.buffers, { desc = '[ ] Find existing buffers' })
-- Slightly advanced example of overriding default behavior and theme vim.keymap.set('n', '<leader>/', function() -- You can pass additional configuration to Telescope to change the theme, layout, etc. builtin.current_buffer_fuzzy_find(require('telescope.themes').get_dropdown { winblend = 10, previewer = false, }) end, { desc = '[/] Fuzzily search in current buffer' })
-- It's also possible to pass additional configuration options. -- See `:help telescope.builtin.live_grep()` for information about particular keys vim.keymap.set('n', '<leader>s/', function() builtin.live_grep { grep_open_files = true, prompt_title = 'Live Grep in Open Files', } end, { desc = '[S]earch [/] in Open Files' })
-- Shortcut for searching your Neovim configuration files vim.keymap.set('n', '<leader>sn', function() builtin.find_files { cwd = vim.fn.stdpath 'config' } end, { desc = '[S]earch [N]eovim files' }) end, },
-- extra color theme plugins { "savq/melange-nvim" }, { "dgox16/oldworld.nvim", lazy = false, priority = 1000, init = function() vim.cmd.colorscheme 'oldworld' -- You can configure highlights by doing something like: vim.cmd.hi 'Comment gui=none' end, }, { -- Available fallback colorscheme (switch with `:colorscheme tokyonight-night` etc.) 'folke/tokyonight.nvim', priority = 1000, -- Make sure to load this before all the other start plugins. }, -- Highlight todo, notes, etc in comments { 'folke/todo-comments.nvim', event = 'VimEnter', dependencies = { 'nvim-lua/plenary.nvim' }, opts = { signs = false } }, { 'windwp/nvim-autopairs', event = "InsertEnter", config = true -- use opts = {} for passing setup options -- this is equivalent to setup({}) function }, -- [[ Embedded Language LSP (Otter) ]] { 'jmbuhr/otter.nvim', dependencies = { 'nvim-treesitter/nvim-treesitter' }, config = function() require('otter').setup() vim.api.nvim_create_autocmd('FileType', { pattern = { 'html', 'htmldjango', 'blade' }, callback = function(args) -- Otter requires an active treesitter parser for the host buffer. pcall(vim.treesitter.start, args.buf) require('otter').activate({ 'javascript', 'css' }) end, }) end, }, -- [[ Tree-sitter ]] { 'nvim-treesitter/nvim-treesitter', branch = 'main', lazy = false, build = ':TSUpdate', config = function() require('nvim-treesitter').setup()
local install_langs = { 'python', 'go', 'javascript', 'typescript', 'rust', 'lua', 'c', 'html', 'css', 'vim', 'vimdoc', 'query', 'markdown', 'markdown_inline', }
-- Ensure parsers are installed/updated (async is fine at startup). require('nvim-treesitter').install(install_langs)
-- Register the HTML parser for templating filetypes that lack one. vim.treesitter.language.register('html', { 'htmldjango', 'blade' })
-- Enable treesitter highlighting and indentation per filetype. local ts_filetypes = { 'python', 'go', 'javascript', 'typescript', 'rust', 'lua', 'c', 'html', 'htmldjango', 'blade', 'css', 'vim', 'vimdoc', 'query', 'markdown', } vim.api.nvim_create_autocmd('FileType', { pattern = ts_filetypes, callback = function(args) pcall(vim.treesitter.start, args.buf) vim.bo[args.buf].indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()" end, }) end, }, -- [[ LSP ]] { 'williamboman/mason.nvim', config = function() -- Mason manages no JS/TS servers; those come from TypeScript 7's -- native tsc (tsc --lsp) plus html/cssls, installed globally -- and pinned via dev_env.sh. require('mason').setup() end, }, { 'williamboman/mason-lspconfig.nvim', dependencies = { 'williamboman/mason.nvim', 'neovim/nvim-lspconfig' }, config = function() require('mason-lspconfig').setup { -- Mason handles only the Lua/C servers. JS/TS/HTML/CSS come from -- TypeScript 7's native tsc + html/cssls, installed globally -- (pinned) via dev_env.sh; Python comes from ty (uv), also via -- dev_env.sh; gopls is pinned via `go install` and rust-analyzer -- via `rustup component add` in dev_env.sh — neither managed here. ensure_installed = { 'lua_ls', 'clangd', }, automatic_enable = { -- ty replaces pyright; never auto-enable it even if a stale -- Mason copy is still installed. exclude = { 'pyright' }, }, } end, }, { 'neovim/nvim-lspconfig', dependencies = { 'williamboman/mason-lspconfig.nvim', 'hrsh7th/cmp-nvim-lsp', }, config = function() local capabilities = require('cmp_nvim_lsp').default_capabilities()
-- Apply capabilities to all servers via wildcard config vim.lsp.config('*', { capabilities = capabilities, })
-- Server-specific overrides vim.lsp.config('lua_ls', { settings = { Lua = { runtime = { version = 'LuaJIT' }, workspace = { checkThirdParty = false, library = { '${3rd}/luv/library', unpack(vim.api.nvim_get_runtime_file('', true)), }, }, completion = { callSnippet = 'Replace' }, diagnostics = { disable = { 'spell-check' }, }, }, }, })
-- Node-based servers, installed globally (pinned) via dev_env.sh: -- - tsc: JS/TS via TypeScript 7's native LSP (tsc --lsp --stdio). -- - html / cssls: vscode-langservers-extracted. -- ty (Python type checker + LSP, via uv) uses nvim-lspconfig defaults. vim.lsp.enable({ 'tsc', 'html', 'cssls', 'ty' })
vim.api.nvim_create_autocmd('LspAttach', { group = vim.api.nvim_create_augroup('kickstart-lsp-attach', { clear = true }), callback = function(ev) local bufnr = ev.buf local map = function(keys, func, desc) vim.keymap.set('n', keys, func, { buffer = bufnr, desc = 'LSP: ' .. desc }) end
map('gd', vim.lsp.buf.definition, '[G]oto [D]efinition') map('gr', vim.lsp.buf.references, '[G]oto [R]eferences') map('gI', vim.lsp.buf.implementation, '[G]oto [I]mplementation') map('<leader>D', vim.lsp.buf.type_definition, 'Type [D]efinition') map('K', vim.lsp.buf.hover, 'Hover Documentation') map('<leader>rn', vim.lsp.buf.rename, '[R]e[n]ame') map('<leader>ca', vim.lsp.buf.code_action, '[C]ode [A]ction') map('<leader>f', function() vim.lsp.buf.format { async = true } end, '[F]ormat buffer') map('<leader>ds', vim.lsp.buf.document_symbol, '[D]ocument [S]ymbols')
map('<leader>e', vim.diagnostic.open_float, '[E]xplain diagnostic') vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, { buffer = bufnr, desc = 'LSP: Previous diagnostic' }) vim.keymap.set('n', ']d', vim.diagnostic.goto_next, { buffer = bufnr, desc = 'LSP: Next diagnostic' }) end, }) end, }, { 'j-hui/fidget.nvim', opts = {}, }, { 'folke/lazydev.nvim', ft = 'lua', opts = {}, }, -- [[ Completion ]] { 'hrsh7th/nvim-cmp', event = 'InsertEnter', dependencies = { 'hrsh7th/cmp-nvim-lsp', 'hrsh7th/cmp-buffer', 'hrsh7th/cmp-path', 'hrsh7th/cmp-cmdline', { 'L3MON4D3/LuaSnip', dependencies = { 'rafamadriz/friendly-snippets' }, config = function() require('luasnip').setup { load_ft_func = require('luasnip.extras.filetype_functions').extend_load_ft { html = { 'javascript', 'jsdoc' }, }, } require('luasnip.loaders.from_vscode').lazy_load() end, }, 'saadparwaiz1/cmp_luasnip', }, config = function() local cmp = require('cmp') local luasnip = require('luasnip')
cmp.setup { snippet = { expand = function(args) luasnip.lsp_expand(args.body) end, }, mapping = cmp.mapping.preset.insert { ['<C-n>'] = cmp.mapping.select_next_item(), ['<C-p>'] = cmp.mapping.select_prev_item(), ['<C-b>'] = cmp.mapping.scroll_docs(-4), ['<C-f>'] = cmp.mapping.scroll_docs(4), ['<C-y>'] = cmp.mapping.confirm { select = true }, ['<C-Space>'] = cmp.mapping.complete {}, ['<Tab>'] = cmp.mapping(function(fallback) if luasnip.expand_or_jumpable() then luasnip.expand_or_jump() else fallback() end end, { 'i', 's' }), ['<S-Tab>'] = cmp.mapping(function(fallback) if luasnip.jumpable(-1) then luasnip.jump(-1) else fallback() end end, { 'i', 's' }), }, sources = cmp.config.sources { { name = 'nvim_lsp' }, { name = 'luasnip' }, { name = 'buffer' }, { name = 'path' }, }, }
-- Use buffer source for `/` and `?` cmp.setup.cmdline({ '/', '?' }, { mapping = cmp.mapping.preset.cmdline(), sources = { { name = 'buffer' }, }, })
-- Use cmdline & path source for `:` cmp.setup.cmdline(':', { mapping = cmp.mapping.preset.cmdline(), sources = cmp.config.sources { { name = 'path' }, { name = 'cmdline' }, }, }) end, }, { 'kevinhwang91/nvim-ufo', dependencies = 'kevinhwang91/promise-async', config = function() vim.keymap.set('n', 'zR', require('ufo').openAllFolds) vim.keymap.set('n', 'zM', require('ufo').closeAllFolds) vim.keymap.set('n', 'zr', require('ufo').openFoldsExceptKinds) vim.keymap.set('n', 'zm', require('ufo').closeFoldsWith)
require('ufo').setup({ provider_selector = function(bufnr, filetype, buftype) return { 'lsp', 'indent' } end, }) end, }, { 'tpope/vim-fugitive', }, { 'stevearc/quicker.nvim', ft = 'qf', ---@module "quicker" ---@type quicker.SetupOptions opts = { keys = { { '>', function() require('quicker').expand({ before = 2, after = 2, add_to_existing = true }) end, desc = 'Expand quickfix context', }, { '<', function() require('quicker').collapse() end, desc = 'Collapse quickfix context', }, }, }, },}, { ui = { -- If you are using a Nerd Font: set icons to an empty table which will use the -- default lazy.nvim defined Nerd Font icons, otherwise define a unicode icons table icons = vim.g.have_nerd_font and {} or { cmd = '⌘', config = '🛠', event = '📅', ft = '📂', init = '⚙', keys = '🗝', plugin = '🔌', runtime = '💻', require = '🌙', source = '📄', start = '🚀', task = '📌', lazy = '💤 ', }, },})
require('nvim-highlight-colors').setup { render = 'virtual',}local harpoon = require 'harpoon'
-- REQUIREDharpoon:setup()-- REQUIRED
vim.keymap.set('n', '<leader>h', function() harpoon:list():add()end, { desc = 'add to [H]arpoon' })-- vim.keymap.set('n', '<leader>a', function()-- harpoon:list():add()-- end, { desc = '[a]dd to Harpoon' })
vim.keymap.set('n', '<C-h>', function() harpoon.ui:toggle_quick_menu(harpoon:list())end)
vim.keymap.set('n', '<C-1>', function() harpoon:list():select(1)end)vim.keymap.set('n', '<C-2>', function() harpoon:list():select(2)end)vim.keymap.set('n', '<C-3>', function() harpoon:list():select(3)end)vim.keymap.set('n', '<C-4>', function() harpoon:list():select(4)end)vim.keymap.set('n', '<C-5>', function() harpoon:list():select(5)end)vim.keymap.set('n', '<C-6>', function() harpoon:list():select(6)end)vim.keymap.set('n', '<C-7>', function() harpoon:list():select(7)end)
-- Toggle previous & next buffers stored within Harpoon listvim.keymap.set('n', '<C-S-P>', function() harpoon:list():prev()end)vim.keymap.set('n', '<C-S-N>', function() harpoon:list():next()end)
-- basic telescope configurationlocal conf = require('telescope.config').valueslocal function toggle_telescope(harpoon_files) local file_paths = {} for _, item in ipairs(harpoon_files.items) do table.insert(file_paths, item.value) end
require('telescope.pickers') .new({}, { prompt_title = 'Harpoon', finder = require('telescope.finders').new_table { results = file_paths, }, previewer = conf.file_previewer {}, sorter = conf.generic_sorter {}, }) :find()end
vim.keymap.set('n', '<C-e>', function() toggle_telescope(harpoon:list())end, { desc = 'Open harpoon window' })
-- Fugitive (Git) keymapsvim.keymap.set('n', '<leader>gs', ':G<CR>', { desc = '[G]it [S]tatus' })vim.keymap.set('n', '<leader>gd', ':Gdiffsplit<CR>', { desc = '[G]it [D]iff' })vim.keymap.set('n', '<leader>gb', ':G blame<CR>', { desc = '[G]it [B]lame' })vim.keymap.set('n', '<leader>gl', ':G log<CR>', { desc = '[G]it [L]og' })vim.keymap.set('n', '<leader>gw', ':G write<CR>', { desc = '[G]it [W]rite (stage file)' })
-- Quicker (quickfix) keymapsvim.keymap.set('n', '<leader>q', function() require('quicker').toggle()end, { desc = 'Toggle quickfix' })vim.keymap.set('n', '<leader>l', function() require('quicker').toggle({ loclist = true })end, { desc = 'Toggle loclist' })