require("lazy").setup("plugins", {
defaults = { lazy = true },
- install = { colorscheme = { "tokyonight" } },
checker = { enabled = true },
change_detection = { notify = false, },
performance = {
vim.keymap.set( 'n', '<leader>t', ':tabnew ' )
vim.keymap.set( 'n', '<leader>B', '<CMD>bnext<CR>' )
--- fzf bindings
-vim.keymap.set( 'n', '<leader>H', "<CMD>call fzf#run({ 'sink': 'vertical botright split' })<CR>" )
-vim.keymap.set( 'n', '<leader>V', "<CMD>call fzf#run({ 'sink': 'botright split' })<CR>" )
-vim.keymap.set( 'n', '<leader>T', "<CMD>call fzf#run({ 'sink': 'tabnew' })<CR>" )
-vim.keymap.set( 'n', '<leader>f', '<CMD>GFiles<CR>' )
-vim.keymap.set( 'n', '<leader>F', '<CMD>Files<CR>' )
-vim.keymap.set( 'n', '<leader>b', '<CMD>Buffers<CR>' )
-vim.keymap.set( 'n', '<leader>r', '<CMD>History:<CR>' )
-
-- move through virtual lines
vim.keymap.set( 'n', 'j', 'gj' )
vim.keymap.set( 'n', 'k', 'gk' )
-- toggle ui elements
vim.keymap.set( 'n', '_', '<CMD>nohlsearch<CR>' )
-vim.keymap.set( 'n', '<leader>u', '<CMD>UndotreeToggle<CR>' )
-vim.keymap.set( 'n', '<leader><Space>', '<CMD>ToggleTerm<CR>' )
--- editing and reloading init.lua
+-- quick plugin editing
vim.keymap.set( 'n', '<leader>=', '<CMD>tabnew ~/.config/nvim/init.lua<CR>' )
-vim.keymap.set( 'n', '<leader>q',
-function()
- vim.cmd('write')
- vim.cmd('source ~/.config/nvim/init.lua')
-end )
-
-vim.keymap.set( 'n', '<leader>Q',
-function()
- vim.cmd('write')
- vim.cmd('source ~/.config/nvim/init.lua')
- vim.cmd('PlugUpdate')
-end )
+vim.keymap.set( 'n', '<leader>q', '<CMD>Lazy<CR>' )
-- autosave
vim.keymap.set( 'i', '<ESC>', '<ESC><CMD>update<CR>' )
-- lsp diagnostic navigation
vim.keymap.set('n', '<leader>n', vim.diagnostic.goto_next, opts)
vim.keymap.set('n', '<leader>p', vim.diagnostic.goto_prev, opts)
-vim.keymap.set('n', '<leader>l', vim.diagnostic.open_float, opts)
--- vim.keymap.set('n', "<Leader>L", require("lsp_lines").toggle)
vim.keymap.set('n', '<leader>R', vim.lsp.buf.rename, opts)
vim.keymap.set('n', '<leader>k', vim.lsp.buf.hover)
return {
- 'mbbill/undotree',
+ {
+ 'mbbill/undotree',
+ keys = { { '<leader>u', '<CMD>UndotreeToggle<CR>', desc = 'Toggle undo tree sidebar' } }
+ },
{ 'christoomey/vim-tmux-navigator', lazy = false },
- { 'norcalli/nvim-colorizer.lua', lazy = false },
- { 'lukas-reineke/indent-blankline.nvim', lazy = false },
- { 'tpope/vim-repeat', lazy = false },
+
{ 'tpope/vim-obsession', lazy = false },
- { 'tpope/vim-surround', lazy = false },
- { 'tpope/vim-endwise', lazy = false },
- { 'tpope/vim-commentary', lazy = false },
+ { 'tpope/vim-repeat', event = "VeryLazy" },
+ { 'tpope/vim-surround', event = "VeryLazy" },
+ { 'tpope/vim-endwise', event = "VeryLazy" },
+ { 'tpope/vim-commentary',event = "VeryLazy" },
+
+ { 'lukas-reineke/indent-blankline.nvim', event = 'VeryLazy' },
+
+ -- {
+ -- 'norcalli/nvim-colorizer.lua',
+ -- lazy = false,
+ -- config = function()
+ -- require('colorizer').setup()
+ -- end
+ -- },
+
+ {
+ 'junegunn/fzf',
+ keys = {
+ { '<leader>H', "<CMD>call fzf#run({ 'sink': 'vertical botright split', 'window': { 'width': 0.9, 'height': 0.6, 'relative': v:true} })<CR>" },
+ { '<leader>V', "<CMD>call fzf#run({ 'sink': 'botright split', 'window': { 'width': 0.9, 'height': 0.6, 'relative': v:true} })<CR>" },
+ {'<leader>T', "<CMD>call fzf#run({ 'sink': 'tabnew', 'window': { 'width': 0.9, 'height': 0.6, 'relative': v:true} })<CR>"},
+ },
+ },
{
- 'junegunn/fzf.vim',
- dependencies = {'junegunn/fzf'},
- lazy = false
+ 'junegunn/fzf.vim',
+ dependencies = {'fzf'},
+ keys = {
+ { '<leader>f', '<CMD>GFiles<CR>' },
+ { '<leader>F', '<CMD>Files<CR>' },
+ { '<leader>b', '<CMD>Buffers<CR>' },
+ { '<leader><C-r>', '<CMD>History:<CR>' },
+ },
},
{
'akinsho/toggleterm.nvim',
- lazy = false,
+ keys = { { '<leader><space>', '<CMD>ToggleTerm' } },
opts = {
shade_terminals = false,
size = 10
}
+ },
+
+ {
+ 'folke/trouble.nvim',
+ keys = {
+ { '<leader>l', '<CMD>TroubleToggle<CR>' },
+ },
+ opts = {
+ icons = false,
+ mode = 'workspace_diagnostics',
+ use_diagnostic_signs = true
+ }
}
+
}
{
"jose-elias-alvarez/null-ls.nvim",
event = { "BufReadPre", "BufNewFile" },
- dependencies = {
+ dependencies = {
"mason.nvim",
"nvim-lua/plenary.nvim",
{
highlight("lualine_a_terminal", black, pink, c_black, c_pink, nil, nil)
highlight("lualine_b_terminal", pink, black, c_pink, c_black, nil, nil)
highlight("lualine_c_terminal", grey, black, c_grey, c_black, nil, nil)
-highlight("lualine_a_inactive", black, grey, c_black, c_grey, nil, nil)
+highlight("lualine_a_inactive", grey, black, c_grey, c_black, nil, nil)
highlight("lualine_b_inactive", grey, black, c_grey, c_black, nil, nil)
highlight("lualine_c_inactive", grey, black, c_grey, c_black, nil, nil)