neovim conf part 9, the move to snacks, telescope u did well, farewell

This commit is contained in:
RafayAhmad7548 2025-05-13 08:14:17 +05:00
parent bbd1f9f7c1
commit 5d23e188ae
10 changed files with 162 additions and 105 deletions

View file

@ -1 +1 @@
require("config") require('config')

View file

@ -2,6 +2,7 @@
"LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" }, "LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" },
"auto-session": { "branch": "main", "commit": "00334ee24b9a05001ad50221c8daffbeedaa0842" }, "auto-session": { "branch": "main", "commit": "00334ee24b9a05001ad50221c8daffbeedaa0842" },
"blink.cmp": { "branch": "main", "commit": "cb5e346d9e0efa7a3eee7fd4da0b690c48d2a98e" }, "blink.cmp": { "branch": "main", "commit": "cb5e346d9e0efa7a3eee7fd4da0b690c48d2a98e" },
"catppuccin": { "branch": "main", "commit": "1bf070129c0b6f77cc23f6a2212dcdc868308c52" },
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" }, "diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
"fidget.nvim": { "branch": "main", "commit": "d9ba6b7bfe29b3119a610892af67602641da778e" }, "fidget.nvim": { "branch": "main", "commit": "d9ba6b7bfe29b3119a610892af67602641da778e" },
"flutter-tools.nvim": { "branch": "main", "commit": "8fa438f36fa6cb747a93557d67ec30ef63715c20" }, "flutter-tools.nvim": { "branch": "main", "commit": "8fa438f36fa6cb747a93557d67ec30ef63715c20" },
@ -18,12 +19,8 @@
"nvim-lspconfig": { "branch": "master", "commit": "8b0f47d851ee5343d38fe194a06ad16b9b9bd086" }, "nvim-lspconfig": { "branch": "master", "commit": "8b0f47d851ee5343d38fe194a06ad16b9b9bd086" },
"nvim-treesitter": { "branch": "master", "commit": "684eeac91ed8e297685a97ef70031d19ac1de25a" }, "nvim-treesitter": { "branch": "master", "commit": "684eeac91ed8e297685a97ef70031d19ac1de25a" },
"nvim-web-devicons": { "branch": "master", "commit": "68f70df44652d310d2adedf181b174c33a693665" }, "nvim-web-devicons": { "branch": "master", "commit": "68f70df44652d310d2adedf181b174c33a693665" },
"onedark.nvim": { "branch": "master", "commit": "67a74c275d1116d575ab25485d1bfa6b2a9c38a6" },
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" }, "plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
"snacks.nvim": { "branch": "main", "commit": "bc0630e43be5699bb94dadc302c0d21615421d93" }, "snacks.nvim": { "branch": "main", "commit": "bc0630e43be5699bb94dadc302c0d21615421d93" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" },
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
"telescope.nvim": { "branch": "master", "commit": "a4ed82509cecc56df1c7138920a1aeaf246c0ac5" },
"todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" }, "todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" },
"vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" } "vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" }
} }

View file

@ -6,8 +6,8 @@ vim.api.nvim_create_autocmd('TextYankPost', {
end, end,
}) })
vim.api.nvim_create_autocmd("User", { vim.api.nvim_create_autocmd('User', {
pattern = "MiniFilesActionRename", pattern = 'MiniFilesActionRename',
callback = function(event) callback = function(event)
require('snacks').rename.on_rename_file(event.data.from, event.data.to) require('snacks').rename.on_rename_file(event.data.from, event.data.to)
end, end,

View file

@ -1,4 +1,4 @@
-- NOTE: General -- -- INFO: General --
-- hjkl to ijkl remap -- hjkl to ijkl remap
vim.keymap.set({ 'n', 'v', 'o' }, 'j', 'h', { desc = 'hjkl to ijkl' }) vim.keymap.set({ 'n', 'v', 'o' }, 'j', 'h', { desc = 'hjkl to ijkl' })
@ -29,9 +29,9 @@ vim.keymap.set('i', '<C-BS>', '<C-w>', { desc = 'delete word in insert mode' })
-- NOTE: Right Dock: Terminal & MiniOilFiles -- INFO: Right Dock: Terminal & MiniOilFiles
-- NOTE: ctrl m -- INFO: ctrl m
vim.keymap.set('n', '<F27>', '<cmd>Floaterminal<CR>', { desc = 'open terminal', nowait = true }) vim.keymap.set('n', '<F27>', '<cmd>Floaterminal<CR>', { desc = 'open terminal', nowait = true })
vim.keymap.set('t', '<F27>', '<cmd>q<CR>', { desc = 'close terminal window' }) vim.keymap.set('t', '<F27>', '<cmd>q<CR>', { desc = 'close terminal window' })
@ -47,7 +47,7 @@ vim.keymap.set('t', '<Esc>', '<C-\\><C-n>', { desc = 'normal mode in terminal' }
vim.keymap.set('n', '<C-e>', require('mini.files').open, { desc = 'open mini files' }) vim.keymap.set('n', '<C-e>', require('mini.files').open, { desc = 'open mini files' })
-- NOTE: Windows -- INFO: Windows
-- this is weird because ctrl-i => Up & ctrl-k => Down in Kitty conf -- this is weird because ctrl-i => Up & ctrl-k => Down in Kitty conf
vim.keymap.set({ 'n', 'v', 'o' }, '<leader>ki', ':wincmd k<CR>', { desc = 'move focus between windows', silent = true }) vim.keymap.set({ 'n', 'v', 'o' }, '<leader>ki', ':wincmd k<CR>', { desc = 'move focus between windows', silent = true })
@ -55,8 +55,25 @@ vim.keymap.set({ 'n', 'v', 'o' }, '<leader>kk', ':wincmd j<CR>', { desc = 'move
vim.keymap.set({ 'n', 'v', 'o' }, '<leader>kl', ':wincmd l<CR>', { desc = 'move focus between windows', silent = true }) vim.keymap.set({ 'n', 'v', 'o' }, '<leader>kl', ':wincmd l<CR>', { desc = 'move focus between windows', silent = true })
vim.keymap.set({ 'n', 'v', 'o' }, '<leader>kj', ':wincmd h<CR>', { desc = 'move focus between windows', silent = true }) vim.keymap.set({ 'n', 'v', 'o' }, '<leader>kj', ':wincmd h<CR>', { desc = 'move focus between windows', silent = true })
-- INFO: Picker
-- NOTE: LSP local Snacks = require('snacks')
vim.keymap.set('n', '<leader>sf', Snacks.picker.files, { desc = 'pick files' })
vim.keymap.set('n', '<leader>sw', Snacks.picker.grep, { desc = 'grep' })
vim.keymap.set('n', '<leader>st', function()
Snacks.picker.todo_comments()
end, { desc = 'search todos' })
vim.keymap.set('n', '<leader>sh', Snacks.picker.help, { desc = 'help' })
vim.keymap.set('n', '<leader>/', function()
Snacks.picker.lines({ layout = 'select' })
end, { desc = 'fuzzily search in current buffer' })
vim.keymap.set('n', '<leader>sp', '<cmd>Autosession search<CR>', { desc = 'search sessions' })
-- INFO: LSP
-- This function gets run when an LSP attaches to a particular buffer. -- This function gets run when an LSP attaches to a particular buffer.
-- That is to say, every time a new file is opened that is associated with -- That is to say, every time a new file is opened that is associated with
@ -66,8 +83,6 @@ vim.api.nvim_create_autocmd('LspAttach', {
group = vim.api.nvim_create_augroup('kickstart-lsp-attach', { clear = true }), group = vim.api.nvim_create_augroup('kickstart-lsp-attach', { clear = true }),
callback = function(event) callback = function(event)
local builtin = require('telescope.builtin')
local map = function(keys, func, desc, mode) local map = function(keys, func, desc, mode)
mode = mode or 'n' mode = mode or 'n'
vim.keymap.set(mode, keys, func, { buffer = event.buf, desc = 'LSP: ' .. desc, nowait = true }) vim.keymap.set(mode, keys, func, { buffer = event.buf, desc = 'LSP: ' .. desc, nowait = true })
@ -76,12 +91,12 @@ vim.api.nvim_create_autocmd('LspAttach', {
-- Rename the variable under your cursor. -- Rename the variable under your cursor.
-- Most Language Servers support renaming across files, etc. -- Most Language Servers support renaming across files, etc.
map('<F2>', function() map('<F2>', function()
vim.api.nvim_exec_autocmds("User", { pattern = "SnacksInputRename" }) vim.api.nvim_exec_autocmds('User', { pattern = 'SnacksInputRename' })
vim.lsp.buf.rename() vim.lsp.buf.rename()
vim.api.nvim_create_autocmd("WinClosed", { vim.api.nvim_create_autocmd('WinClosed', {
callback = function (args) callback = function (args)
vim.api.nvim_exec_autocmds("User", { vim.api.nvim_exec_autocmds('User', {
pattern = "SnacksInputReset" pattern = 'SnacksInputReset'
}) })
vim.api.nvim_del_autocmd(args.id) vim.api.nvim_del_autocmd(args.id)
end end
@ -93,16 +108,16 @@ vim.api.nvim_create_autocmd('LspAttach', {
map('ga', vim.lsp.buf.code_action, '[G]oto Code [A]ction', { 'n', 'x' }) map('ga', vim.lsp.buf.code_action, '[G]oto Code [A]ction', { 'n', 'x' })
-- Find references for the word under your cursor. -- Find references for the word under your cursor.
map('gr', builtin.lsp_references, '[G]oto [R]eferences') map('gr', Snacks.picker.lsp_references, '[G]oto [R]eferences')
-- Jump to the implementation of the word under your cursor. -- Jump to the implementation of the word under your cursor.
-- Useful when your language has ways of declaring types without an actual implementation. -- Useful when your language has ways of declaring types without an actual implementation.
map('gi', builtin.lsp_implementations, '[G]oto [I]mplementation') map('gi', Snacks.picker.lsp_implementations, '[G]oto [I]mplementation')
-- Jump to the definition of the word under your cursor. -- Jump to the definition of the word under your cursor.
-- This is where a variable was first declared, or where a function is defined, etc. -- This is where a variable was first declared, or where a function is defined, etc.
-- To jump back, press <C-t>. -- To jump back, press <C-t>.
map('gd', builtin.lsp_definitions, '[G]oto [D]efinition') map('gd', Snacks.picker.lsp_definitions, '[G]oto [D]efinition')
-- WARN: This is not Goto Definition, this is Goto Declaration. -- WARN: This is not Goto Definition, this is Goto Declaration.
-- For example, in C this would take you to the header. -- For example, in C this would take you to the header.
@ -110,16 +125,16 @@ vim.api.nvim_create_autocmd('LspAttach', {
-- Fuzzy find all the symbols in your current document. -- Fuzzy find all the symbols in your current document.
-- Symbols are things like variables, functions, types, etc. -- Symbols are things like variables, functions, types, etc.
map('go', builtin.lsp_document_symbols, 'Open Document Symbols') map('go', Snacks.picker.lsp_symbols, 'Open Document Symbols')
-- Fuzzy find all the symbols in your current workspace. -- Fuzzy find all the symbols in your current workspace.
-- Similar to document symbols, except searches over your entire project. -- Similar to document symbols, except searches over your entire project.
map('gO', builtin.lsp_dynamic_workspace_symbols, 'Open Workspace Symbols') map('gO', Snacks.picker.lsp_workspace_symbols, 'Open Workspace Symbols')
-- Jump to the type of the word under your cursor. -- Jump to the type of the word under your cursor.
-- Useful when you're not sure what type a variable is and you want to see -- Useful when you're not sure what type a variable is and you want to see
-- the definition of its *type*, not where it was *defined*. -- the definition of its *type*, not where it was *defined*.
map('gt', builtin.lsp_type_definitions, '[G]oto [T]ype Definition') map('gt', Snacks.picker.lsp_type_definitions, '[G]oto [T]ype Definition')
-- This function resolves a difference between neovim nightly (version 0.11) and stable (version 0.10) -- This function resolves a difference between neovim nightly (version 0.11) and stable (version 0.10)
---@param client vim.lsp.Client ---@param client vim.lsp.Client
@ -175,18 +190,18 @@ vim.api.nvim_create_autocmd('LspAttach', {
end, end,
}) })
-- NOTE: Molten -- INFO: Molten
vim.keymap.set("n", "<leader>mi", ":MoltenInit<CR>", vim.keymap.set('n', '<leader>mi', ':MoltenInit<CR>',
{ silent = true, desc = "Initialize the plugin" }) { silent = true, desc = 'Initialize the plugin' })
vim.keymap.set("n", "<leader>mo", ":MoltenEvaluateOperator<CR>", vim.keymap.set('n', '<leader>mo', ':MoltenEvaluateOperator<CR>',
{ silent = true, desc = "run operator selection" }) { silent = true, desc = 'run operator selection' })
vim.keymap.set("n", "<leader>ml", ":MoltenEvaluateLine<CR>", vim.keymap.set('n', '<leader>ml', ':MoltenEvaluateLine<CR>',
{ silent = true, desc = "evaluate line" }) { silent = true, desc = 'evaluate line' })
vim.keymap.set("v", "<leader>mv", ":<C-u>MoltenEvaluateVisual<CR>gv", vim.keymap.set('v', '<leader>mv', ':<C-u>MoltenEvaluateVisual<CR>gv',
{ silent = false, desc = "evaluate visual selection" }) { silent = false, desc = 'evaluate visual selection' })
vim.keymap.set("n", "<leader>mc", ":MoltenReevaluateCell<CR>", vim.keymap.set('n', '<leader>mc', ':MoltenReevaluateCell<CR>',
{ silent = false, desc = "reevaluate cell" }) { silent = false, desc = 'reevaluate cell' })
vim.keymap.set("n", "<leader>me", ":noautocmd MoltenEnterOutput<CR>", vim.keymap.set('n', '<leader>me', ':noautocmd MoltenEnterOutput<CR>',
{ silent = true, desc = "show/enter output" }) { silent = true, desc = 'show/enter output' })
vim.keymap.set("n", "<leader>mh", ":MoltenHideOutput<CR>", vim.keymap.set('n', '<leader>mh', ':MoltenHideOutput<CR>',
{ silent = true, desc = "hide output" }) { silent = true, desc = 'hide output' })

View file

@ -3,7 +3,7 @@ return {
lazy = false, lazy = false,
---enables autocomplete for opts ---enables autocomplete for opts
---@module "auto-session" ---@module 'auto-session'
---@type AutoSession.Config ---@type AutoSession.Config
opts = { opts = {
suppressed_dirs = { '~/', '~/Downloads', '/' }, suppressed_dirs = { '~/', '~/Downloads', '/' },

View file

@ -38,7 +38,7 @@ return {
}, },
}, },
{ {
"sindrets/diffview.nvim", 'sindrets/diffview.nvim',
config = function () config = function ()
local actions = require('diffview.config').actions local actions = require('diffview.config').actions
require('diffview').setup({ require('diffview').setup({
@ -57,10 +57,10 @@ return {
end end
}, },
-- { -- {
-- "NeogitOrg/neogit", -- 'NeogitOrg/neogit',
-- dependencies = { -- dependencies = {
-- "nvim-lua/plenary.nvim", -- 'nvim-lua/plenary.nvim',
-- "nvim-telescope/telescope.nvim", -- 'nvim-telescope/telescope.nvim',
-- }, -- },
-- config = function() -- config = function()
-- require('neogit').setup({ -- require('neogit').setup({
@ -73,41 +73,41 @@ return {
-- kind = 'floating', -- kind = 'floating',
-- }, -- },
-- commit_select_view = { -- commit_select_view = {
-- kind = "floating", -- kind = 'floating',
-- }, -- },
-- commit_view = { -- commit_view = {
-- kind = "floating", -- kind = 'floating',
-- verify_commit = vim.fn.executable("gpg") == 1, -- Can be set to true or false, otherwise we try to find the binary -- verify_commit = vim.fn.executable('gpg') == 1, -- Can be set to true or false, otherwise we try to find the binary
-- }, -- },
-- log_view = { -- log_view = {
-- kind = "floating", -- kind = 'floating',
-- }, -- },
-- rebase_editor = { -- rebase_editor = {
-- kind = "floating", -- kind = 'floating',
-- }, -- },
-- reflog_view = { -- reflog_view = {
-- kind = "floating", -- kind = 'floating',
-- }, -- },
-- merge_editor = { -- merge_editor = {
-- kind = "floating", -- kind = 'floating',
-- }, -- },
-- description_editor = { -- description_editor = {
-- kind = "floating", -- kind = 'floating',
-- }, -- },
-- tag_editor = { -- tag_editor = {
-- kind = "floating", -- kind = 'floating',
-- }, -- },
-- preview_buffer = { -- preview_buffer = {
-- kind = "floating", -- kind = 'floating',
-- }, -- },
-- popup = { -- popup = {
-- kind = "floating", -- kind = 'floating',
-- }, -- },
-- stash = { -- stash = {
-- kind = "floating", -- kind = 'floating',
-- }, -- },
-- refs_view = { -- refs_view = {
-- kind = "floating", -- kind = 'floating',
-- }, -- },
-- mappings = { -- mappings = {
-- status = { -- status = {

View file

@ -13,23 +13,23 @@ vim.opt.rtp:prepend(lazypath)
-- local keymaps = require('config.pluginmaps') -- local keymaps = require('config.pluginmaps')
require('lazy').setup({ require('lazy').setup({
-- NOTE: General Editing -- -- INFO: General Editing --
'tpope/vim-sleuth', -- Detect tabstop and shiftwidth automatically 'tpope/vim-sleuth', -- Detect tabstop and shiftwidth automatically
{ 'folke/todo-comments.nvim', event = 'VimEnter', dependencies = { 'nvim-lua/plenary.nvim' }, opts = {} }, { 'folke/todo-comments.nvim', event = 'VimEnter', dependencies = { 'nvim-lua/plenary.nvim' }, opts = {} },
-- TODO: i dunno about this one -- TODO: i dunno about this one
-- { -- {
-- "folke/noice.nvim", -- 'folke/noice.nvim',
-- event = "VeryLazy", -- event = 'VeryLazy',
-- opts = { -- opts = {
-- }, -- },
-- dependencies = { -- dependencies = {
-- -- if you lazy-load any plugin below, make sure to add proper `module="..."` entries -- -- if you lazy-load any plugin below, make sure to add proper `module='...'` entries
-- "MunifTanjim/nui.nvim", -- 'MunifTanjim/nui.nvim',
-- -- OPTIONAL: -- -- OPTIONAL:
-- -- `nvim-notify` is only needed, if you want to use the notification view. -- -- `nvim-notify` is only needed, if you want to use the notification view.
-- -- If not available, we use `mini` as the fallback -- -- If not available, we use `mini` as the fallback
-- "rcarriga/nvim-notify", -- 'rcarriga/nvim-notify',
-- } -- }
-- }, -- },
@ -40,7 +40,7 @@ require('lazy').setup({
require('config.plugins.git'), require('config.plugins.git'),
require('config.plugins.ui'), require('config.plugins.ui'),
require('config.plugins.telescope'), -- require('config.plugins.telescope'),
require('config.plugins.blinkcmp'), require('config.plugins.blinkcmp'),
require('config.plugins.languages.lsp'), require('config.plugins.languages.lsp'),
require('config.plugins.languages.treesitter'), require('config.plugins.languages.treesitter'),

View file

@ -5,19 +5,19 @@ return {
init = function() init = function()
local Snacks = require('snacks') local Snacks = require('snacks')
vim.api.nvim_create_autocmd("User", { vim.api.nvim_create_autocmd('User', {
pattern = "SnacksInputRename", pattern = 'SnacksInputRename',
callback = function () callback = function ()
Snacks.config.input.win.relative = "cursor" Snacks.config.input.win.relative = 'cursor'
Snacks.config.input.win.col = -1 Snacks.config.input.win.col = -1
Snacks.config.input.win.row = -3 Snacks.config.input.win.row = -3
Snacks.config.input.win.title_pos = 'left' Snacks.config.input.win.title_pos = 'left'
end end
}) })
vim.api.nvim_create_autocmd("User", { vim.api.nvim_create_autocmd('User', {
pattern = "SnacksInputReset", pattern = 'SnacksInputReset',
callback = function () callback = function ()
Snacks.config.input.win.relative = "editor" Snacks.config.input.win.relative = 'editor'
Snacks.config.input.win.col = nil Snacks.config.input.win.col = nil
Snacks.config.input.win.row = 6 Snacks.config.input.win.row = 6
Snacks.config.input.win.title_pos = 'center' Snacks.config.input.win.title_pos = 'center'
@ -60,6 +60,52 @@ return {
quickfile = { enabled = true }, quickfile = { enabled = true },
rename = { enabled = true }, rename = { enabled = true },
picker = {
enabled = true,
matcher = { frecency = true, },
layout = {
cycle = true,
preset = 'telescope',
},
ui_select = true,
win = {
input = {
keys = {
['<Esc>'] = { 'close', mode = 'i' },
['<C-s>'] = { 'edit_split', mode = 'i' },
['<C-v>'] = { 'edit_vsplit', mode = 'i' },
['<c-d>'] = { 'preview_scroll_down', mode = 'i' },
['<c-u>'] = { 'preview_scroll_up', mode = 'i' },
}
}
},
layouts = {
telescope = {
reverse = true,
layout = {
box = 'horizontal',
backdrop = false,
width = 0.8,
height = 0.9,
border = 'none',
{
box = 'vertical',
{ win = 'list', title = ' Results ', title_pos = 'center', border = 'rounded' },
{ win = 'input', height = 1, border = 'rounded', title = '{title} {live} {flags}', title_pos = 'center' },
},
{
win = 'preview',
title = '{preview:Preview}',
width = 0.55,
border = 'rounded',
title_pos = 'center',
},
}
}
}
},
bufdelete = { enabled = false }, bufdelete = { enabled = false },
debug = { enabled = false }, debug = { enabled = false },
dim = { enabled = false }, dim = { enabled = false },
@ -71,7 +117,6 @@ return {
lazygit = { enabled = false }, lazygit = { enabled = false },
notifier = { enabled = false }, notifier = { enabled = false },
notify = { enabled = false }, notify = { enabled = false },
picker = { enabled = false },
profiler = { enabled = false }, profiler = { enabled = false },
scope = { enabled = false }, scope = { enabled = false },
scratch = { enabled = false }, scratch = { enabled = false },

View file

@ -36,33 +36,33 @@ return {
}) })
pcall(require('telescope').load_extension, 'fzf') pcall(require('telescope').load_extension, 'fzf')
pcall(require("telescope").load_extension('ui-select')) pcall(require('telescope').load_extension('ui-select'))
-- NOTE: Mappings -- -- INFO: Mappings --
local builtin = require('telescope.builtin') -- local builtin = require('telescope.builtin')
vim.keymap.set('n', '<leader>sf', builtin.find_files, { desc = 'find files' }) -- vim.keymap.set('n', '<leader>sf', builtin.find_files, { desc = 'find files' })
vim.keymap.set('n', '<leader>sw', builtin.grep_string, { desc = 'grep string' }) -- vim.keymap.set('n', '<leader>sw', builtin.grep_string, { desc = 'grep string' })
vim.keymap.set('n', '<leader>ss', builtin.lsp_document_symbols, { desc = 'document symbols' }) -- vim.keymap.set('n', '<leader>ss', builtin.lsp_document_symbols, { desc = 'document symbols' })
vim.keymap.set('n', '<leader>sS', builtin.lsp_workspace_symbols, { desc = 'workspace symbols' }) -- vim.keymap.set('n', '<leader>sS', builtin.lsp_workspace_symbols, { desc = 'workspace symbols' })
--
vim.keymap.set('n', '<leader>st', '<cmd>TodoTelescope<CR>', { desc = 'search todos' }) -- vim.keymap.set('n', '<leader>st', '<cmd>TodoTelescope<CR>', { desc = 'search todos' })
vim.keymap.set('n', '<leader>sp', '<cmd>SessionSearch<CR>', { desc = 'search sessions' }) -- vim.keymap.set('n', '<leader>sp', '<cmd>SessionSearch<CR>', { desc = 'search sessions' })
--
vim.keymap.set('n', '<leader>sh', function () -- vim.keymap.set('n', '<leader>sh', function ()
builtin.help_tags({ -- builtin.help_tags({
previewer = false -- previewer = false
}) -- })
end, { desc = 'help' }) -- end, { desc = 'help' })
--
vim.keymap.set('n', '<leader>/', function() -- vim.keymap.set('n', '<leader>/', function()
-- You can pass additional configuration to Telescope to change the theme, layout, etc. -- -- You can pass additional configuration to Telescope to change the theme, layout, etc.
builtin.current_buffer_fuzzy_find(require('telescope.themes').get_dropdown { -- builtin.current_buffer_fuzzy_find(require('telescope.themes').get_dropdown {
winblend = 10, -- winblend = 10,
previewer = false, -- previewer = false,
}) -- })
end, { desc = 'Fuzzily search in current buffer' }) -- end, { desc = 'Fuzzily search in current buffer' })
end end
} }

View file

@ -6,15 +6,15 @@ return {
}, },
{ {
'navarasu/onedark.nvim', 'catppuccin/nvim',
config = function () name = 'catppuccin',
require('onedark').setup({ priority = 1000,
style = 'darker', opts = {
code_style = { flavour = 'mocha',
comments = 'none' no_italic = true,
} },
}) config = function()
require('onedark').load() vim.cmd('colorscheme catppuccin')
end end
}, }
} }