From b623b11199f4679556185ef9a0d7c165a86d0b9c Mon Sep 17 00:00:00 2001 From: "MAKCG\\Saurav.Prashar" Date: Fri, 7 Jun 2024 18:12:43 -0400 Subject: [PATCH] notify, trouble, keymaps Enable plugins - --- README.md | 3 +++ init.lua | 2 +- lua/custom/plugins/notify.lua | 8 +++---- lua/custom/plugins/trouble.lua | 38 ++++++++++++++++++++++++++++------ 4 files changed, 40 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index f445b65e..a13bcc37 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,8 @@ # kickstart.nvim +## TODOs: + - Apply telescope file path options from old config. + ## Introduction A starting point for Neovim that is: diff --git a/init.lua b/init.lua index 4233bb80..a92e456f 100644 --- a/init.lua +++ b/init.lua @@ -129,7 +129,7 @@ vim.keymap.set('v', 'K', ":m '<-2gv=gv") -- setup command for ctrl-backspace - delete whole word -- vim.api.nvim_set_keymap('i', '', '', { noremap = true, silent = true }) --- vim.keymap.set('i', '', '', { noremap = true, silent = false }) +vim.keymap.set('i', 'C-H', '', { noremap = true, silent = true }) -- replace the current word vim.keymap.set('n', 'rw', [[:%s/\<\>//gI]]) diff --git a/lua/custom/plugins/notify.lua b/lua/custom/plugins/notify.lua index d4917239..cb25b4d0 100644 --- a/lua/custom/plugins/notify.lua +++ b/lua/custom/plugins/notify.lua @@ -1,6 +1,6 @@ return { - -- "rcarriga/nvim-notify", - -- config = function () - -- vim.notify = require("notify") - -- end + 'rcarriga/nvim-notify', + config = function() + vim.notify = require 'notify' + end, } diff --git a/lua/custom/plugins/trouble.lua b/lua/custom/plugins/trouble.lua index 837902f7..ac5ac841 100644 --- a/lua/custom/plugins/trouble.lua +++ b/lua/custom/plugins/trouble.lua @@ -1,17 +1,43 @@ return { 'folke/trouble.nvim', - cmd = { 'TroubleToggle', 'Trouble' }, + cmd = 'Trouble', opts = { use_diagnostic_signs = true }, keys = { - { 'xx', 'TroubleToggle document_diagnostics', desc = 'Document Diagnostics (Trouble)' }, - { 'X', 'TroubleToggle workspace_diagnostics', desc = 'Workspace Diagnostics (Trouble)' }, - { 'xL', 'TroubleToggle loclist', desc = 'Location List (Trouble)' }, - { 'xq', 'TroubleToggle quickfix', desc = 'Quickfix List (Trouble)' }, + { + 'xx', + 'Trouble diagnostics toggle', + desc = 'Diagnostics (Trouble)', + }, + { + 'xX', + 'Trouble diagnostics toggle filter.buf=0', + desc = 'Buffer Diagnostics (Trouble)', + }, + { + 'cs', + 'Trouble symbols toggle focus=false', + desc = 'Symbols (Trouble)', + }, + { + 'cl', + 'Trouble lsp toggle focus=false win.position=right', + desc = 'LSP Definitions / references / ... (Trouble)', + }, + { + 'xL', + 'Trouble loclist toggle', + desc = 'Location List (Trouble)', + }, + { + 'xQ', + 'Trouble qflist toggle', + desc = 'Quickfix List (Trouble)', + }, { '[q', function() if require('trouble').is_open() then - require('trouble').previous { skip_groups = true, jump = true } + require('trouble').prev { skip_groups = true, jump = true } else local ok, err = pcall(vim.cmd.cprev) if not ok then