From 6c3434aceb50814a65b6124f322a420755d931d0 Mon Sep 17 00:00:00 2001 From: Jeff LANCE Date: Fri, 15 Aug 2025 19:33:16 +0200 Subject: [PATCH] up --- lua/custom/autocommands/init.lua | 1 + lua/custom/autocommands/markdown.lua | 15 ++++++ lua/custom/autocommands/quarto.lua | 10 ++-- lua/custom/keymaps/buffers.lua | 18 ++++++- lua/custom/keymaps/display.lua | 12 ----- lua/custom/keymaps/files.lua | 13 +++-- lua/custom/keymaps/general.lua | 2 +- lua/custom/keymaps/groups.lua | 25 +++++++++ lua/custom/keymaps/init.lua | 4 +- lua/custom/keymaps/search.lua | 53 +++++++++++++++++++ lua/custom/keymaps/toggles.lua | 15 ++++++ lua/custom/plugins/neotree-helper.lua | 2 +- lua/kickstart/core/lazy-plugins.lua | 1 + lua/kickstart/core/options.lua | 1 - lua/kickstart/plugins/autoformat.lua | 19 ++++--- lua/kickstart/plugins/gitsigns.lua | 29 ++++++----- lua/kickstart/plugins/lsp.lua | 3 +- lua/kickstart/plugins/obsidian.lua | 68 ++++++++++++++++++++++++ lua/kickstart/plugins/quarto.lua | 3 +- lua/kickstart/plugins/telescope.lua | 74 ++++++++++++++------------- lua/kickstart/plugins/which-key.lua | 9 +--- 21 files changed, 280 insertions(+), 97 deletions(-) create mode 100644 lua/custom/autocommands/markdown.lua delete mode 100644 lua/custom/keymaps/display.lua create mode 100644 lua/custom/keymaps/groups.lua create mode 100644 lua/custom/keymaps/search.lua create mode 100644 lua/custom/keymaps/toggles.lua create mode 100644 lua/kickstart/plugins/obsidian.lua diff --git a/lua/custom/autocommands/init.lua b/lua/custom/autocommands/init.lua index 3ae13da..35c32af 100644 --- a/lua/custom/autocommands/init.lua +++ b/lua/custom/autocommands/init.lua @@ -2,6 +2,7 @@ -- require 'custom.autocommands.quarto' +require 'custom.autocommands.markdown' -- The line beneath this is called `modeline`. See `:help modeline` -- vim: ts=2 sts=2 sw=2 et diff --git a/lua/custom/autocommands/markdown.lua b/lua/custom/autocommands/markdown.lua new file mode 100644 index 0000000..28529fd --- /dev/null +++ b/lua/custom/autocommands/markdown.lua @@ -0,0 +1,15 @@ +-- Quarto autocommands file +-- + +local status_wk, wk = pcall(require, 'which-key') +if not status_wk then + return +end + +vim.api.nvim_create_autocmd('FileType', { + desc = '', + pattern = 'markdown', + callback = function() + vim.opt_local.conceallevel = 1 + end, +}) diff --git a/lua/custom/autocommands/quarto.lua b/lua/custom/autocommands/quarto.lua index 9a16d52..ae0826a 100644 --- a/lua/custom/autocommands/quarto.lua +++ b/lua/custom/autocommands/quarto.lua @@ -18,29 +18,29 @@ vim.api.nvim_create_autocmd('FileType', { local deinit = function() local quarto_cfg = require('quarto.config').config quarto_cfg.codeRunner.default_method = 'slime' + vim.cmd [[MoltenStop]] vim.cmd [[MoltenDeinit]] end wk.add { { mode = { 'n', 'v', 'i' }, buffer = true }, { -- Quarto - { 'Q', group = '[Q]uarto' }, -- group - { 'Qp', 'QuartoPreview', desc = '[p]review Quarto' }, - { 'Qs', 'QuartoSend', desc = '[s]end to Quarto' }, + { 'q', group = '[q]uarto' }, -- group + { 'qp', 'QuartoPreview', desc = '[p]review Quarto' }, + { 'qs', 'QuartoSend', desc = '[s]end to Quarto' }, }, { -- Molten { 'M', group = '[M]olten' }, -- group { 'Mi', init, desc = '[i]nitialize Molten' }, { 'Ms', deinit, desc = '[s]top Molten' }, - { 'Md', 'MoltenStop', desc = '[S]top Molten' }, { 'Mp', 'MoltenPause', desc = '[p]ause Molten' }, { 'Mr', 'MoltenReset', desc = '[r]eset Molten' }, }, { -- Vim-slime { 'S', group = '[S]lime' }, -- group - { 'Ss', 'SlimeSend', desc = '[s]end Slime' }, + { 'Ss', 'SlimeSend', desc = '[s]end to Slime' }, { 'Sr', 'SlimeRestart', desc = '[r]estart Slime' }, }, } diff --git a/lua/custom/keymaps/buffers.lua b/lua/custom/keymaps/buffers.lua index b41c2ae..ea9d72f 100644 --- a/lua/custom/keymaps/buffers.lua +++ b/lua/custom/keymaps/buffers.lua @@ -1,4 +1,4 @@ --- Neo-tree mappings +-- Buffer group mappings -- local status_wk, wk = pcall(require, 'which-key') @@ -11,11 +11,25 @@ if not status_mbr then return end +local status_tele, tele = pcall(require, 'telescope.builtin') +if not status_tele then + return +end + wk.add { - { 'b', group = '[b]uffers' }, -- group { mode = { 'n', 'v', 'i' }, { 'bd', mbr.delete, desc = '[d]elete buffer', noremap = true, silent = true }, + { + 'bF', + function() + require('conform').format { async = true, lsp_format = 'fallback' } + end, + desc = '[F]ormat buffer', + noremap = true, + silent = true, + }, + { 'bf', tele.buffers, desc = '[f]ind existing buffers' }, { 'bl', 'Neotree buffers', desc = '[l]ist buffers ', noremap = true, silent = true }, { 'bs', 'source %', desc = '[s]ource buffer', noremap = true, silent = true }, { 'bw', 'w', desc = '[w]rite buffer', noremap = true, silent = true }, diff --git a/lua/custom/keymaps/display.lua b/lua/custom/keymaps/display.lua deleted file mode 100644 index 0c276de..0000000 --- a/lua/custom/keymaps/display.lua +++ /dev/null @@ -1,12 +0,0 @@ --- Display mappings --- - -local wk = require 'which-key' - -wk.add { - mode = { 'n', 'v', 'i' }, - { 'd', group = '[d]isplay' }, -- group -} - --- The line beneath this is called `modeline`. See `:help modeline` --- vim: ts=2 sts=2 sw=2 et diff --git a/lua/custom/keymaps/files.lua b/lua/custom/keymaps/files.lua index 762a54e..3b8c40b 100644 --- a/lua/custom/keymaps/files.lua +++ b/lua/custom/keymaps/files.lua @@ -13,11 +13,18 @@ end wk.add { { - mode = { 'n', 'v', 'i' }, - { 'e', nth.smart_open, desc = 'File [e]xplorer', silent = true, noremap = true }, + mode = { 'n', 'v' }, + { 'ef', nth.smart_open, desc = 'explore [f]iles', silent = true, noremap = true }, + { + 'ec', + 'Neotree position=left toggle dir=' .. os.getenv 'XDG_CONFIG_HOME' .. '/nvim', + desc = 'explore [c]onfiguration files', + silent = true, + noremap = true, + }, }, { - mode = { 'n', 'v' }, + mode = { 'n', 'v', 'i' }, { '', nth.smart_open, desc = 'File explorer', silent = true, noremap = true, hidden = true }, }, } diff --git a/lua/custom/keymaps/general.lua b/lua/custom/keymaps/general.lua index 5654b84..5146067 100644 --- a/lua/custom/keymaps/general.lua +++ b/lua/custom/keymaps/general.lua @@ -6,7 +6,7 @@ if not status_kh then return end -kh.map({ 'n', 'v', 'i' }, 'q', 'qall', { silent = true, noremap = true, desc = '[Q]uit all' }) +kh.map({ 'n', 'v', 'i' }, 'Q', 'qall', { silent = true, noremap = true, desc = '[Q]uit all' }) -- The line beneath this is called `modeline`. See `:help modeline` -- vim: ts=2 sts=2 sw=2 et diff --git a/lua/custom/keymaps/groups.lua b/lua/custom/keymaps/groups.lua new file mode 100644 index 0000000..c57257a --- /dev/null +++ b/lua/custom/keymaps/groups.lua @@ -0,0 +1,25 @@ +-- Key mappings groups +-- + +local wk = require 'which-key' + +wk.add { + { + { + mode = { 'n' }, + { 's', group = '[s]earch' }, + { 't', group = '[t]oggles' }, + }, + + { + mode = { 'n', 'v' }, + { 'e', group = '[e]xplore' }, + { 'b', group = '[b]uffers' }, + { 'g', group = '[g]it hunk' }, + }, + }, + {}, +} + +-- The line beneath this is called `modeline`. See `:help modeline` +-- vim: ts=2 sts=2 sw=2 et diff --git a/lua/custom/keymaps/init.lua b/lua/custom/keymaps/init.lua index faccbba..270283f 100644 --- a/lua/custom/keymaps/init.lua +++ b/lua/custom/keymaps/init.lua @@ -2,11 +2,13 @@ -- require 'custom.keymaps.nop' +require 'custom.keymaps.groups' require 'custom.keymaps.general' require 'custom.keymaps.buffers' require 'custom.keymaps.files' require 'custom.keymaps.edit' -require 'custom.keymaps.display' +require 'custom.keymaps.search' +require 'custom.keymaps.toggles' -- The line beneath this is called `modeline`. See `:help modeline` -- vim: ts=2 sts=2 sw=2 et diff --git a/lua/custom/keymaps/search.lua b/lua/custom/keymaps/search.lua new file mode 100644 index 0000000..dd18013 --- /dev/null +++ b/lua/custom/keymaps/search.lua @@ -0,0 +1,53 @@ +-- Search group mappings +-- + +local wk = require 'which-key' +local tele = require 'telescope.builtin' + +wk.add { + mode = { 'n' }, + { 'sh', tele.help_tags, desc = 'search [h]elp' }, + { 'sk', tele.keymaps, desc = 'search [k]eymaps' }, + { 'sf', tele.find_files, desc = 'search [f]iles' }, + { 'ss', tele.builtin, desc = 'search [s]elect Telescope' }, + { 'sw', tele.grep_string, desc = 'search current [w]ord' }, + { 'sg', tele.live_grep, desc = 'search by [g]rep' }, + { 'sd', tele.diagnostics, desc = 'search [d]iagnostics' }, + { 'sr', tele.resume, desc = 'search [r]esume' }, + { 's.', tele.oldfiles, desc = '[.] search recent Files ("." for repeat)' }, + -- Slightly advanced example of overriding default behavior and theme + { + '/', + function() + -- You can pass additional configuration to Telescope to change the theme, layout, etc. + tele.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 + { + 's/', + function() + tele.live_grep { + grep_open_files = true, + prompt_title = 'Live Grep in Open Files', + } + end, + desc = '[/] search in Open Files', + }, + -- Shortcut for searching your Neovim configuration files + { + 'sn', + function() + tele.find_files { cwd = vim.fn.stdpath 'config' } + end, + desc = 'search [n]eovim files', + }, +} + +-- The line beneath this is called `modeline`. See `:help modeline` +-- vim: ts=2 sts=2 sw=2 et diff --git a/lua/custom/keymaps/toggles.lua b/lua/custom/keymaps/toggles.lua new file mode 100644 index 0000000..991172c --- /dev/null +++ b/lua/custom/keymaps/toggles.lua @@ -0,0 +1,15 @@ +-- Toggles group mappings +-- + +local wk = require 'which-key' +local gitsigns = require 'gitsigns' + +wk.add { + mode = { 'n' }, + -- gitsigns + { 'tb', gitsigns.toggle_current_line_blame, desc = 'toggle git show [b]lame line' }, + { 'tD', gitsigns.preview_hunk_inline, desc = 'toggle git show [D]eleted' }, +} + +-- The line beneath this is called `modeline`. See `:help modeline` +-- vim: ts=2 sts=2 sw=2 et diff --git a/lua/custom/plugins/neotree-helper.lua b/lua/custom/plugins/neotree-helper.lua index 98a41cc..bd0606c 100644 --- a/lua/custom/plugins/neotree-helper.lua +++ b/lua/custom/plugins/neotree-helper.lua @@ -28,7 +28,7 @@ function M.smart_open() -- Si c'est le dashboard ministarter, ouvrir dans le home if filetype == 'ministarter' then vim.cmd('Neotree toggle reveal=false position=float dir=' .. vim.fn.expand '~') - -- Si c'est un fichier réel, révéler le fichier dans l'arborescence + -- Si c'est un fichier réel, révéler le fichier dans l'arborescence elseif is_real_file and bufname ~= '' then vim.cmd('Neotree toggle position=left reveal=true dir=' .. vim.fn.expand '%:p:h') -- vim.cmd 'Neotree position=left reveal=true' diff --git a/lua/kickstart/core/lazy-plugins.lua b/lua/kickstart/core/lazy-plugins.lua index a06bd93..cb8328b 100644 --- a/lua/kickstart/core/lazy-plugins.lua +++ b/lua/kickstart/core/lazy-plugins.lua @@ -31,6 +31,7 @@ require('lazy').setup({ require 'kickstart.plugins.header', require 'kickstart.plugins.which-key', require 'kickstart.plugins.quarto', + require 'kickstart.plugins.obsidian', -- Themes require 'kickstart.themes.yorumi', diff --git a/lua/kickstart/core/options.lua b/lua/kickstart/core/options.lua index 7234c85..1b75db1 100644 --- a/lua/kickstart/core/options.lua +++ b/lua/kickstart/core/options.lua @@ -92,4 +92,3 @@ vim.opt.smartindent = true -- The line beneath this is called `modeline`. See `:help modeline` -- vim: ts=2 sts=2 sw=2 et - diff --git a/lua/kickstart/plugins/autoformat.lua b/lua/kickstart/plugins/autoformat.lua index ab62227..b8bd5db 100644 --- a/lua/kickstart/plugins/autoformat.lua +++ b/lua/kickstart/plugins/autoformat.lua @@ -7,14 +7,14 @@ return { event = { 'BufWritePre' }, cmd = { 'ConformInfo' }, keys = { - { - 'bf', - function() - require('conform').format { async = true, lsp_format = 'fallback' } - end, - mode = '', - desc = '[F]ormat [B]uffer', - }, + -- { + -- 'bf', + -- function() + -- require('conform').format { async = true, lsp_format = 'fallback' } + -- end, + -- mode = '', + -- desc = '[F]ormat [B]uffer', + -- }, }, opts = { notify_on_error = false, @@ -35,7 +35,7 @@ return { formatters_by_ft = { lua = { 'stylua' }, -- Conform can also run multiple formatters sequentially - -- python = { "isort", "black" }, + python = { 'isort', 'black' }, -- -- You can use 'stop_after_first' to run the first available formatter from the list -- javascript = { "prettierd", "prettier", stop_after_first = true }, @@ -43,4 +43,3 @@ return { }, }, } - diff --git a/lua/kickstart/plugins/gitsigns.lua b/lua/kickstart/plugins/gitsigns.lua index 09701c4..ac87485 100644 --- a/lua/kickstart/plugins/gitsigns.lua +++ b/lua/kickstart/plugins/gitsigns.lua @@ -36,27 +36,28 @@ return { -- Actions -- visual mode - map('v', 'hs', function() + map('v', 'gs', function() gitsigns.stage_hunk { vim.fn.line '.', vim.fn.line 'v' } end, { desc = 'git [s]tage hunk' }) - map('v', 'hr', function() + map('v', 'gr', function() gitsigns.reset_hunk { vim.fn.line '.', vim.fn.line 'v' } end, { desc = 'git [r]eset hunk' }) -- normal mode - map('n', 'hs', gitsigns.stage_hunk, { desc = 'git [s]tage hunk' }) - map('n', 'hr', gitsigns.reset_hunk, { desc = 'git [r]eset hunk' }) - map('n', 'hS', gitsigns.stage_buffer, { desc = 'git [S]tage buffer' }) - map('n', 'hu', gitsigns.stage_hunk, { desc = 'git [u]ndo stage hunk' }) - map('n', 'hR', gitsigns.reset_buffer, { desc = 'git [R]eset buffer' }) - map('n', 'hp', gitsigns.preview_hunk, { desc = 'git [p]review hunk' }) - map('n', 'hb', gitsigns.blame_line, { desc = 'git [b]lame line' }) - map('n', 'hd', gitsigns.diffthis, { desc = 'git [d]iff against index' }) - map('n', 'hD', function() + map('n', 'gs', gitsigns.stage_hunk, { desc = 'git [s]tage hunk' }) + map('n', 'gr', gitsigns.reset_hunk, { desc = 'git [r]eset hunk' }) + map('n', 'gS', gitsigns.stage_buffer, { desc = 'git [S]tage buffer' }) + map('n', 'gu', gitsigns.stage_hunk, { desc = 'git [u]ndo stage hunk' }) + map('n', 'gR', gitsigns.reset_buffer, { desc = 'git [R]eset buffer' }) + map('n', 'gp', gitsigns.preview_hunk, { desc = 'git [p]review hunk' }) + map('n', 'gb', gitsigns.blame_line, { desc = 'git [b]lame line' }) + map('n', 'gd', gitsigns.diffthis, { desc = 'git [d]iff against index' }) + map('n', 'gD', function() gitsigns.diffthis '@' end, { desc = 'git [D]iff against last commit' }) - -- Toggles - map('n', 'tb', gitsigns.toggle_current_line_blame, { desc = '[T]oggle git show [b]lame line' }) - map('n', 'tD', gitsigns.preview_hunk_inline, { desc = '[T]oggle git show [D]eleted' }) + -- Following moved to custom mappings + -- -- Toggles + -- map('n', 'tb', gitsigns.toggle_current_line_blame, { desc = 'toggle git show [b]lame line' }) + -- map('n', 'tD', gitsigns.preview_hunk_inline, { desc = 'toggle git show [D]eleted' }) end, signs = { add = { text = '+' }, diff --git a/lua/kickstart/plugins/lsp.lua b/lua/kickstart/plugins/lsp.lua index a868ad4..03435d2 100644 --- a/lua/kickstart/plugins/lsp.lua +++ b/lua/kickstart/plugins/lsp.lua @@ -159,7 +159,7 @@ return { if client and client_supports_method(client, vim.lsp.protocol.Methods.textDocument_inlayHint, event.buf) then map('th', function() vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled { bufnr = event.buf }) - end, '[T]oggle Inlay [H]ints') + end, 'toggle Inlay [h]ints') end end, }) @@ -274,4 +274,3 @@ return { end, }, } - diff --git a/lua/kickstart/plugins/obsidian.lua b/lua/kickstart/plugins/obsidian.lua new file mode 100644 index 0000000..5e50d09 --- /dev/null +++ b/lua/kickstart/plugins/obsidian.lua @@ -0,0 +1,68 @@ +-- obsidian +-- https://github.com/obsidian-nvim/obsidian.nvim +-- + +return { + 'obsidian-nvim/obsidian.nvim', + version = '*', -- recommended, use latest release instead of latest commit + lazy = true, + ft = 'markdown', + -- Replace the above line with this if you only want to load obsidian.nvim for markdown files in your vault: + -- event = { + -- -- If you want to use the home shortcut '~' here you need to call 'vim.fn.expand'. + -- -- E.g. "BufReadPre " .. vim.fn.expand "~" .. "/my-vault/*.md" + -- -- refer to `:h file-pattern` for more examples + -- "BufReadPre path/to/my-vault/*.md", + -- "BufNewFile path/to/my-vault/*.md", + -- }, + ---@module 'obsidian' + ---@type obsidian.config + opts = { + legacy_commands = false, + workspaces = { + { + name = 'dane', + path = '~/Notes/dane', + strict = true, + }, + { + name = 'travail', + path = '~/Notes/travail', + strict = true, + }, + + { + name = 'no-vault', + path = function() + -- alternatively use the CWD: + -- return assert(vim.fn.getcwd()) + return assert(vim.fs.dirname(vim.api.nvim_buf_get_name(0))) + end, + overrides = { + notes_subdir = vim.NIL, -- have to use 'vim.NIL' instead of 'nil' + new_notes_location = 'current_dir', + templates = { + folder = vim.NIL, + }, + disable_frontmatter = true, + }, + }, + }, + + daily_notes = { + -- Optional, if you keep daily notes in a separate directory. + folder = 'journal/daily', + -- Optional, if you want to change the date format for the ID of daily notes. + date_format = '%Y-%m-%d', + -- Optional, if you want to change the date format of the default alias of daily notes. + alias_format = '%B %-d, %Y', + -- Optional, default tags to add to each new daily note created. + default_tags = { 'daily-notes' }, + -- Optional, if you want to automatically insert a template from your template directory like 'daily.md' + template = nil, + -- Optional, if you want `Obsidian yesterday` to return the last work day or `Obsidian tomorrow` to return the next work day. + workdays_only = true, + }, + -- see below for full list of options 👇 + }, +} diff --git a/lua/kickstart/plugins/quarto.lua b/lua/kickstart/plugins/quarto.lua index e614971..96584fe 100644 --- a/lua/kickstart/plugins/quarto.lua +++ b/lua/kickstart/plugins/quarto.lua @@ -85,7 +85,7 @@ return { vim.g.molten_image_provider = 'image.nvim' -- vim.g.molten_output_win_max_height = 20 vim.g.molten_auto_open_output = true - vim.g.molten_auto_open_html_in_browser = true + -- vim.g.molten_auto_open_html_in_browser = true vim.g.molten_tick_rate = 200 end, config = function() @@ -108,6 +108,7 @@ return { end, opts = { auto_scroll = true, + jupyter_command = '/home/jeff/.asdf/shims/jupyter', }, }, { diff --git a/lua/kickstart/plugins/telescope.lua b/lua/kickstart/plugins/telescope.lua index 3730ec1..1dbe538 100644 --- a/lua/kickstart/plugins/telescope.lua +++ b/lua/kickstart/plugins/telescope.lua @@ -68,41 +68,43 @@ return { 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', 'sh', builtin.help_tags, { desc = '[S]earch [H]elp' }) - vim.keymap.set('n', 'sk', builtin.keymaps, { desc = '[S]earch [K]eymaps' }) - vim.keymap.set('n', 'sf', builtin.find_files, { desc = '[S]earch [F]iles' }) - vim.keymap.set('n', 'ss', builtin.builtin, { desc = '[S]earch [S]elect Telescope' }) - vim.keymap.set('n', 'sw', builtin.grep_string, { desc = '[S]earch current [W]ord' }) - vim.keymap.set('n', 'sg', builtin.live_grep, { desc = '[S]earch by [G]rep' }) - vim.keymap.set('n', 'sd', builtin.diagnostics, { desc = '[S]earch [D]iagnostics' }) - vim.keymap.set('n', 'sr', builtin.resume, { desc = '[S]earch [R]esume' }) - vim.keymap.set('n', 's.', builtin.oldfiles, { desc = '[S]earch Recent Files ("." for repeat)' }) - vim.keymap.set('n', '', builtin.buffers, { desc = '[ ] Find existing buffers' }) - - -- Slightly advanced example of overriding default behavior and theme - vim.keymap.set('n', '/', 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', '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', 'sn', function() - builtin.find_files { cwd = vim.fn.stdpath 'config' } - end, { desc = '[S]earch [N]eovim files' }) + -- Following mappings has been moved into my custom keymapping directory tree + -- -- See `:help telescope.builtin` + -- local builtin = require 'telescope.builtin' + -- vim.keymap.set('n', 'sh', builtin.help_tags, { desc = '[S]earch [H]elp' }) + -- vim.keymap.set('n', 'sk', builtin.keymaps, { desc = '[S]earch [K]eymaps' }) + -- vim.keymap.set('n', 'sf', builtin.find_files, { desc = '[S]earch [F]iles' }) + -- vim.keymap.set('n', 'ss', builtin.builtin, { desc = '[S]earch [S]elect Telescope' }) + -- vim.keymap.set('n', 'sw', builtin.grep_string, { desc = '[S]earch current [W]ord' }) + -- vim.keymap.set('n', 'sg', builtin.live_grep, { desc = '[S]earch by [G]rep' }) + -- vim.keymap.set('n', 'sd', builtin.diagnostics, { desc = '[S]earch [D]iagnostics' }) + -- vim.keymap.set('n', 'sr', builtin.resume, { desc = '[S]earch [R]esume' }) + -- vim.keymap.set('n', 's.', builtin.oldfiles, { desc = '[S]earch Recent Files ("." for repeat)' }) + -- vim.keymap.set('n', '', builtin.buffers, { desc = '[ ] Find existing buffers' }) + -- + -- -- Slightly advanced example of overriding default behavior and theme + -- vim.keymap.set('n', '/', 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', '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', 'sn', function() + -- builtin.find_files { cwd = vim.fn.stdpath 'config' } + -- end, { desc = '[S]earch [N]eovim files' }) end, }, -} \ No newline at end of file +} + diff --git a/lua/kickstart/plugins/which-key.lua b/lua/kickstart/plugins/which-key.lua index 9236616..99abb3c 100644 --- a/lua/kickstart/plugins/which-key.lua +++ b/lua/kickstart/plugins/which-key.lua @@ -45,13 +45,6 @@ return { F12 = '', }, }, - - -- Document existing key chains - spec = { - { 's', group = '[S]earch' }, - { 't', group = '[T]oggle' }, - { 'h', group = 'Git [H]unk', mode = { 'n', 'v' } }, - }, }, }, -} \ No newline at end of file +}