@@ -378,6 +378,7 @@ require('lazy').setup({
378378 { ' nvim-telescope/telescope-ui-select.nvim' },
379379
380380 -- Useful for getting pretty icons, but requires a Nerd Font.
381+ { ' nvim-telescope/telescope-live-grep-args.nvim' },
381382 { ' nvim-tree/nvim-web-devicons' , enabled = vim .g .have_nerd_font },
382383 },
383384 config = function ()
@@ -412,10 +413,15 @@ require('lazy').setup({
412413 -- },
413414 -- },
414415 -- pickers = {}
416+ shorten_path = true ,
415417 extensions = {
416418 [' ui-select' ] = {
417419 require (' telescope.themes' ).get_dropdown (),
418420 },
421+ [' live_grep_args' ] = {
422+ auto_quoting = true ,
423+ theme = ' dropdown' ,
424+ },
419425 },
420426 }
421427
@@ -430,12 +436,13 @@ require('lazy').setup({
430436 vim .keymap .set (' n' , ' <leader>sf' , builtin .find_files , { desc = ' [S]earch [F]iles' })
431437 vim .keymap .set (' n' , ' <leader>ss' , builtin .builtin , { desc = ' [S]earch [S]elect Telescope' })
432438 vim .keymap .set (' n' , ' <leader>sw' , builtin .grep_string , { desc = ' [S]earch current [W]ord' })
433- vim .keymap .set (' n' , ' <leader>sg' , builtin . live_grep , { desc = ' [S]earch by [G]rep' })
439+ vim .keymap .set (' n' , ' <leader>sg' , " :lua require('telescope').extensions.live_grep_args.live_grep_args()<CR> " , { desc = ' [S]earch by [G]rep' })
434440 vim .keymap .set (' n' , ' <leader>sd' , builtin .diagnostics , { desc = ' [S]earch [D]iagnostics' })
435441 vim .keymap .set (' n' , ' <leader>sr' , builtin .resume , { desc = ' [S]earch [R]esume' })
436442 vim .keymap .set (' n' , ' <leader>s.' , builtin .oldfiles , { desc = ' [S]earch Recent Files ("." for repeat)' })
437443 vim .keymap .set (' n' , ' <leader><leader>' , builtin .buffers , { desc = ' [ ] Find existing buffers' })
438444
445+ pcall (require (' telescope' ).load_extension , ' live_grep_args' )
439446 -- Slightly advanced example of overriding default behavior and theme
440447 vim .keymap .set (' n' , ' <leader>/' , function ()
441448 -- You can pass additional configuration to Telescope to change the theme, layout, etc.
@@ -640,7 +647,7 @@ require('lazy').setup({
640647 local servers = {
641648 clangd = {},
642649 -- gopls = {},
643- -- pyright = {},
650+ pyright = {},
644651 -- rust_analyzer = {},
645652 -- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
646653 --
@@ -650,7 +657,7 @@ require('lazy').setup({
650657 -- But for many setups, the LSP (`ts_ls`) will work just fine
651658 -- ts_ls = {},
652659 --
653-
660+ pylsp = {},
654661 cmake = {},
655662 lua_ls = {
656663 -- cmd = {...},
@@ -734,9 +741,10 @@ require('lazy').setup({
734741 formatters_by_ft = {
735742 cmake = { ' cmakelang' },
736743 cpp = { ' clang_format' },
744+ json = { ' clang_format' },
737745 lua = { ' stylua' },
738746 -- Conform can also run multiple formatters sequentially
739- -- python = { " isort", "black" },
747+ python = { ' isort' },
740748 --
741749 -- You can use 'stop_after_first' to run the first available formatter from the list
742750 -- javascript = { "prettierd", "prettier", stop_after_first = true },
@@ -815,7 +823,7 @@ require('lazy').setup({
815823
816824 -- If you prefer more traditional completion keymaps,
817825 -- you can uncomment the following lines
818- -- ['<CR>'] = cmp.mapping.confirm { select = true },
826+ [' <CR>' ] = cmp .mapping .confirm { select = true },
819827 -- ['<Tab>'] = cmp.mapping.select_next_item(),
820828 -- ['<S-Tab>'] = cmp.mapping.select_prev_item(),
821829
@@ -967,14 +975,28 @@ require('lazy').setup({
967975 -- require 'kickstart.plugins.lint',
968976 -- require 'kickstart.plugins.autopairs',
969977 -- require 'kickstart.plugins.neo-tree',
970- -- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps
978+ require ' kickstart.plugins.gitsigns' , -- adds gitsigns recommend keymaps
971979
972980 -- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
973981 -- This is the easiest way to modularize your config.
974982 --
975983 -- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
976984 -- For additional information, see `:help lazy.nvim-lazy.nvim-structuring-your-plugins`
977- { ' kdheepak/lazygit.nvim' },
985+ {
986+ ' NeogitOrg/neogit' ,
987+ dependencies = {
988+ ' nvim-lua/plenary.nvim' , -- required
989+ ' sindrets/diffview.nvim' , -- optional - Diff integratio
990+
991+ -- Only one of these is needed, not both.
992+ ' nvim-telescope/telescope.nvim' , -- optional
993+ ' ibhagwan/fzf-lua' , -- optional
994+ },
995+ keys = {
996+ { ' <leader>l' , ' :Neogit cwd=%:p:h kind=split<CR>' , { desc = ' Open neogit in current direcotry' } },
997+ },
998+ config = true ,
999+ },
9781000 {
9791001 ' nvim-tree/nvim-tree.lua' ,
9801002 config = function ()
@@ -984,6 +1006,9 @@ require('lazy').setup({
9841006 width = 30 ,
9851007 preserve_window_proportions = true ,
9861008 },
1009+ update_focused_file = {
1010+ enable = true ,
1011+ },
9871012 }
9881013 end ,
9891014 },
0 commit comments