From: Huck Boles Date: Mon, 17 Apr 2023 02:42:52 +0000 (-0500) Subject: diagnostic viewer X-Git-Url: https://git.huck.website/?a=commitdiff_plain;h=264bfe8433bf0a87dabd76ccf728ca71e8836bc4;p=nvim.git diagnostic viewer --- diff --git a/init.lua b/init.lua index 7aa51f3..6641e8d 100644 --- a/init.lua +++ b/init.lua @@ -15,7 +15,6 @@ vim.opt.runtimepath:prepend(lazypath) require("lazy").setup("plugins", { defaults = { lazy = true }, - install = { colorscheme = { "tokyonight" } }, checker = { enabled = true }, change_detection = { notify = false, }, performance = { diff --git a/lua/map.lua b/lua/map.lua index ef00fe7..b56c567 100644 --- a/lua/map.lua +++ b/lua/map.lua @@ -4,15 +4,6 @@ vim.keymap.set( 'n', 'v', ":split " ) vim.keymap.set( 'n', 't', ':tabnew ' ) vim.keymap.set( 'n', 'B', 'bnext' ) --- fzf bindings -vim.keymap.set( 'n', 'H', "call fzf#run({ 'sink': 'vertical botright split' })" ) -vim.keymap.set( 'n', 'V', "call fzf#run({ 'sink': 'botright split' })" ) -vim.keymap.set( 'n', 'T', "call fzf#run({ 'sink': 'tabnew' })" ) -vim.keymap.set( 'n', 'f', 'GFiles' ) -vim.keymap.set( 'n', 'F', 'Files' ) -vim.keymap.set( 'n', 'b', 'Buffers' ) -vim.keymap.set( 'n', 'r', 'History:' ) - -- move through virtual lines vim.keymap.set( 'n', 'j', 'gj' ) vim.keymap.set( 'n', 'k', 'gk' ) @@ -36,23 +27,10 @@ vim.keymap.set( 'n', 'K', 'Jx' ) -- toggle ui elements vim.keymap.set( 'n', '_', 'nohlsearch' ) -vim.keymap.set( 'n', 'u', 'UndotreeToggle' ) -vim.keymap.set( 'n', '', 'ToggleTerm' ) --- editing and reloading init.lua +-- quick plugin editing vim.keymap.set( 'n', '=', 'tabnew ~/.config/nvim/init.lua' ) -vim.keymap.set( 'n', 'q', -function() - vim.cmd('write') - vim.cmd('source ~/.config/nvim/init.lua') -end ) - -vim.keymap.set( 'n', 'Q', -function() - vim.cmd('write') - vim.cmd('source ~/.config/nvim/init.lua') - vim.cmd('PlugUpdate') -end ) +vim.keymap.set( 'n', 'q', 'Lazy' ) -- autosave vim.keymap.set( 'i', '', 'update' ) @@ -64,7 +42,5 @@ vim.keymap.set('t', '', [[]], opts) -- lsp diagnostic navigation vim.keymap.set('n', 'n', vim.diagnostic.goto_next, opts) vim.keymap.set('n', 'p', vim.diagnostic.goto_prev, opts) -vim.keymap.set('n', 'l', vim.diagnostic.open_float, opts) --- vim.keymap.set('n', "L", require("lsp_lines").toggle) vim.keymap.set('n', 'R', vim.lsp.buf.rename, opts) vim.keymap.set('n', 'k', vim.lsp.buf.hover) diff --git a/lua/plugins.lua b/lua/plugins.lua index d39b1f9..5915d5c 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -1,28 +1,67 @@ return { - 'mbbill/undotree', + { + 'mbbill/undotree', + keys = { { 'u', 'UndotreeToggle', 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 = { + { 'H', "call fzf#run({ 'sink': 'vertical botright split', 'window': { 'width': 0.9, 'height': 0.6, 'relative': v:true} })" }, + { 'V', "call fzf#run({ 'sink': 'botright split', 'window': { 'width': 0.9, 'height': 0.6, 'relative': v:true} })" }, + {'T', "call fzf#run({ 'sink': 'tabnew', 'window': { 'width': 0.9, 'height': 0.6, 'relative': v:true} })"}, + }, + }, { - 'junegunn/fzf.vim', - dependencies = {'junegunn/fzf'}, - lazy = false + 'junegunn/fzf.vim', + dependencies = {'fzf'}, + keys = { + { 'f', 'GFiles' }, + { 'F', 'Files' }, + { 'b', 'Buffers' }, + { '', 'History:' }, + }, }, { 'akinsho/toggleterm.nvim', - lazy = false, + keys = { { '', 'ToggleTerm' } }, opts = { shade_terminals = false, size = 10 } + }, + + { + 'folke/trouble.nvim', + keys = { + { 'l', 'TroubleToggle' }, + }, + opts = { + icons = false, + mode = 'workspace_diagnostics', + use_diagnostic_signs = true + } } + } diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index e38299a..99373a8 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -38,7 +38,7 @@ return { { "jose-elias-alvarez/null-ls.nvim", event = { "BufReadPre", "BufNewFile" }, - dependencies = { + dependencies = { "mason.nvim", "nvim-lua/plenary.nvim", { diff --git a/lua/theme.lua b/lua/theme.lua index 120babe..01415fe 100644 --- a/lua/theme.lua +++ b/lua/theme.lua @@ -218,7 +218,7 @@ highlight("lualine_c_insert", grey, black, c_grey, c_black, nil, nil) 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)