Add further customizations

This commit is contained in:
Julian Raufelder 2023-09-02 20:14:14 +02:00
parent c705d03a4b
commit 4230158ff5
No known key found for this signature in database
1 changed files with 38 additions and 1 deletions

View File

@ -239,7 +239,27 @@ require('lazy').setup({
build = "cd app && npm install", build = "cd app && npm install",
init = function() vim.g.mkdp_filetypes = { "markdown" } end, init = function() vim.g.mkdp_filetypes = { "markdown" } end,
}, },
-- show notifications etc in a nice area
{'folke/noice.nvim',
event = 'VeryLazy',
opts = {
-- add any options here
},
dependencies = {
-- if you lazy-load any plugin below, make sure to add proper `module="..."` entries
'MunifTanjim/nui.nvim',
-- OPTIONAL:
-- `nvim-notify` is only needed, if you want to use the notification view.
-- If not available, we use `mini` as the fallback
'rcarriga/nvim-notify',
}
},
-- tmux vim keybindings
'christoomey/vim-tmux-navigator', 'christoomey/vim-tmux-navigator',
-- databse connections from within vim using DBGUI and DB
'tpope/vim-dadbod',
'kristijanhusak/vim-dadbod-ui',
'kristijanhusak/vim-dadbod-completion',
-- NOTE: Next Step on Your Neovim Journey: Add/Configure additional "plugins" for kickstart -- NOTE: Next Step on Your Neovim Journey: Add/Configure additional "plugins" for kickstart
-- These are some example plugins that I've included in the kickstart repository. -- These are some example plugins that I've included in the kickstart repository.
@ -353,6 +373,13 @@ require('telescope').setup {
}, },
}, },
}, },
pickers = {
live_grep = {
additional_args = function(opts)
return {"--hidden"}
end
},
},
} }
-- Enable telescope fzf native, if installed -- Enable telescope fzf native, if installed
@ -370,12 +397,13 @@ vim.keymap.set('n', '<leader>/', function()
end, { desc = '[/] Fuzzily search in current buffer' }) end, { desc = '[/] Fuzzily search in current buffer' })
vim.keymap.set('n', '<leader>gf', require('telescope.builtin').git_files, { desc = 'Search [G]it [F]iles' }) vim.keymap.set('n', '<leader>gf', require('telescope.builtin').git_files, { desc = 'Search [G]it [F]iles' })
vim.keymap.set('n', '<leader>sf', require('telescope.builtin').find_files, { desc = '[S]earch [F]iles' })
vim.keymap.set('n', '<leader>sh', require('telescope.builtin').help_tags, { desc = '[S]earch [H]elp' }) vim.keymap.set('n', '<leader>sh', require('telescope.builtin').help_tags, { desc = '[S]earch [H]elp' })
vim.keymap.set('n', '<leader>sw', require('telescope.builtin').grep_string, { desc = '[S]earch current [W]ord' }) vim.keymap.set('n', '<leader>sw', require('telescope.builtin').grep_string, { desc = '[S]earch current [W]ord' })
vim.keymap.set('n', '<leader>sg', require('telescope.builtin').live_grep, { desc = '[S]earch by [G]rep' }) vim.keymap.set('n', '<leader>sg', require('telescope.builtin').live_grep, { desc = '[S]earch by [G]rep' })
vim.keymap.set('n', '<leader>sd', require('telescope.builtin').diagnostics, { desc = '[S]earch [D]iagnostics' }) vim.keymap.set('n', '<leader>sd', require('telescope.builtin').diagnostics, { desc = '[S]earch [D]iagnostics' })
vim.keymap.set('n', '<leader>sr', require('telescope.builtin').resume, { desc = '[S]earch [R]esume' }) vim.keymap.set('n', '<leader>sr', require('telescope.builtin').resume, { desc = '[S]earch [R]esume' })
vim.keymap.set('n', '<leader>sfn', require('telescope.builtin').find_files, { desc = '[S]earch [F]iles [N]o Hidden' })
vim.keymap.set('n', '<leader>sfh', '<Cmd>Telescope find_files hidden=true no_ignore=true<Cr>', { desc = '[S]earch [F]iles [H]idden' })
-- [[ Configure Treesitter ]] -- [[ Configure Treesitter ]]
-- See `:help nvim-treesitter` -- See `:help nvim-treesitter`
@ -607,6 +635,7 @@ cmp.setup {
sources = { sources = {
{ name = 'nvim_lsp' }, { name = 'nvim_lsp' },
{ name = 'luasnip' }, { name = 'luasnip' },
{ name = 'vim-dadbod-completion' },
}, },
} }
@ -629,3 +658,11 @@ wilder.setup({modes = {':', '/', '?'}})
-- Unless you are still migrating, remove the deprecated commands from v1.x -- Unless you are still migrating, remove the deprecated commands from v1.x
vim.cmd([[ let g:neo_tree_remove_legacy_commands = 1 ]]) vim.cmd([[ let g:neo_tree_remove_legacy_commands = 1 ]])
-- neo_tree
vim.keymap.set('n', '<leader>f', '<Cmd>Neotree toggle<Cr>', { desc = 'Toggle NeoTree' })
-- database
vim.keymap.set('n', '<leader>nu', '<Cmd>DBUIToggle<Cr>', { desc = 'Toggle UI' })
vim.keymap.set('n', '<leader>nf', '<Cmd>DBUIFindBuffer<Cr>', { desc = 'Find buffer' })
vim.keymap.set('n', '<leader>nr', '<Cmd>DBUIRenameBuffer<Cr>', { desc = 'Rename buffer' })
vim.keymap.set('n', '<leader>nq', '<Cmd>DBUILastQueryInfo<Cr>', { desc = 'Last query info' })