diff --git a/init.lua b/init.lua index c172411a..f6dbe4bb 100644 --- a/init.lua +++ b/init.lua @@ -460,9 +460,9 @@ require('lazy').setup({ pcall(require('telescope').load_extension, 'fzf') pcall(require('telescope').load_extension, 'zoxide') pcall(require('telescope').load_extension, 'ui-select') - -- See `:help telescope.builtin` local builtin = require 'telescope.builtin' + local extensions = require 'telescope._extensions' 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' }) @@ -772,8 +772,8 @@ require('lazy').setup({ end, formatters_by_ft = { cmake = { 'cmakelang' }, - cpp = { 'clang-format' }, - json = { 'clang-format' }, + cpp = { 'clang-format-15' }, + json = { 'clang-format-15' }, lua = { 'stylua' }, -- Conform can also run multiple formatters sequentially python = { 'isort' }, @@ -899,7 +899,6 @@ require('lazy').setup({ } end, }, - { -- You can easily change to a different colorscheme. -- Change the name of the colorscheme plugin below, and then -- change the command in the config to whatever the name of that colorscheme is. diff --git a/lua/custom/keymap.lua b/lua/custom/keymap.lua index c3936c81..92720a4c 100644 --- a/lua/custom/keymap.lua +++ b/lua/custom/keymap.lua @@ -2,15 +2,16 @@ -- See `:help vim.keymap.set()` -- Set highlight on search, but clear on pressing in normal mode -vim.keymap.set('n', 'fa', 'lua vim.lsp.buf.format()') + vim.keymap.set('n', 'mt', 'NvimTreeFocus') -vim.keymap.set('n', '', 'ClangdSwitchSourceHeader') +vim.keymap.set('n', '', 'ClangdSwitchSourceHeader', { desc = 'Swith to source/header file' }) vim.keymap.set('n', '', 'nohlsearch') vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, { desc = 'Go to previous [D]iagnostic message' }) vim.keymap.set('n', ']d', vim.diagnostic.goto_next, { desc = 'Go to next [D]iagnostic message' }) vim.keymap.set('n', 'e', vim.diagnostic.open_float, { desc = 'Show diagnostic [E]rror messages' }) vim.keymap.set('n', 'q', vim.diagnostic.setloclist, { desc = 'Open diagnostic [Q]uickfix list' }) -vim.keymap.set('n', 'z', require('telescope').extensions.zoxide.list) +vim.keymap.set('n', 'z', require('telescope').extensions.zoxide.list, { desc = '[Z]oxide to different dir' }) +vim.keymap.set('n', 'jl', require('telescope.builtin').jumplist, { desc = '[J]ump [L]ist' }) -- 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 , which -- is not what someone will guess without a bit more experience. @@ -33,3 +34,4 @@ vim.keymap.set('n', '', '', { desc = 'Move focus to the left wind vim.keymap.set('n', '', '', { desc = 'Move focus to the right window' }) vim.keymap.set('n', '', '', { desc = 'Move focus to the lower window' }) vim.keymap.set('n', '', '', { desc = 'Move focus to the upper window' }) +vim.keymap.set('n', '', '', { desc = 'Move focus to the upper window' })