diff --git a/lua/config/mappings.lua b/lua/config/mappings.lua index 7c07973..1f1d6c3 100644 --- a/lua/config/mappings.lua +++ b/lua/config/mappings.lua @@ -26,9 +26,9 @@ imap [s1z=`]a keymap('n', '', ':', { noremap = true }) -- search and replace {{{ -keymap('n', 'rs', ':s///gI', { noremap = true }) -keymap('n', 'rr', ':%s///gI', { noremap = true }) -keymap('v', 'r', ':s///gI', { noremap = true }) +-- keymap('n', 'rs', ':s///gI', { noremap = true }) +-- keymap('n', 'rr', ':%s///gI', { noremap = true }) +-- keymap('v', 'r', ':s///gI', { noremap = true }) -- }}} function MapDHM() diff --git a/lua/plugins/buffer_manager.lua b/lua/plugins/buffer_manager.lua index ff5d80c..6b61753 100644 --- a/lua/plugins/buffer_manager.lua +++ b/lua/plugins/buffer_manager.lua @@ -2,8 +2,8 @@ return { 'j-morano/buffer_manager.nvim', keys = { { '', " lua require('buffer_manager.ui').toggle_quick_menu()", desc = 'buffers' }, - { 'gn', " lua require('buffer_manager.ui').nav_next()", desc = 'next buffer' }, - { 'gp', " lua require('buffer_manager.ui').nav_prev()", desc = 'next buffer' }, + { 'gp', " lua require('buffer_manager.ui').nav_next()", desc = 'next buffer' }, + { 'gn', " lua require('buffer_manager.ui').nav_prev()", desc = 'next buffer' }, }, opts = { -- line_keys = '', -- deactivate line keybindings diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua index f063ad0..326d4c3 100644 --- a/lua/plugins/cmp.lua +++ b/lua/plugins/cmp.lua @@ -13,7 +13,6 @@ return { event = { 'InsertEnter', 'CmdlineEnter' }, config = function() local cmp = require 'cmp' - local lspkind = require 'lspkind' cmp.setup { snippet = { diff --git a/lua/plugins/editor.lua b/lua/plugins/editor.lua index 7ab2f40..a528880 100644 --- a/lua/plugins/editor.lua +++ b/lua/plugins/editor.lua @@ -8,7 +8,7 @@ return { view = { -- Visualization style. Possible values are 'sign' and 'number'. -- Default: 'number' if line numbers are enabled, 'sign' otherwise. - style = 'sign', + style = vim.go.number and 'number' or 'sign', -- Signs used for hunks with 'sign' view signs = { add = '▒', change = '▒', delete = '▒' }, diff --git a/lua/plugins/lsp/init.lua b/lua/plugins/lsp/init.lua index 18160ef..f7a265d 100644 --- a/lua/plugins/lsp/init.lua +++ b/lua/plugins/lsp/init.lua @@ -19,15 +19,16 @@ return { vim.diagnostic.config { underline = true, update_in_insert = true, - signs = false, - virtual_text = { - source = 'if_many', - prefix = '●', - spacing = 5, - -- this will set set the prefix to a function that returns the diagnostics icon based on the severity - -- this only works on a recent 0.10.0 build. Will be set to "●" when not supported - -- prefix = "icons", - }, + signs = true, + virtual_text = false, + -- virtual_text = { + -- source = 'if_many', + -- prefix = '●', + -- spacing = 5, + -- -- this will set set the prefix to a function that returns the diagnostics icon based on the severity + -- -- this only works on a recent 0.10.0 build. Will be set to "●" when not supported + -- -- prefix = "icons", + -- }, float = { focusable = true, -- style = 'minimal', diff --git a/lua/plugins/lsp/keymaps.lua b/lua/plugins/lsp/keymaps.lua index e89076a..5c17a58 100644 --- a/lua/plugins/lsp/keymaps.lua +++ b/lua/plugins/lsp/keymaps.lua @@ -27,6 +27,7 @@ function M.on_attach(bufnr) map('lp', vim.diagnostic.goto_prev, 'previous diagnostic') map('ll', vim.diagnostic.goto_next, 'next diagnostic') map('lw', telescope 'diagnostics', 'diagnostics list') + map('le', 'Telescope diagnostics bufnr=0', 'diagnostics list') map('ls', function() vim.diagnostic.open_float { scope = 'cursor' } end, 'cursor diagnostic') diff --git a/lua/plugins/lsp/ui.lua b/lua/plugins/lsp/ui.lua index f853d1a..806243b 100644 --- a/lua/plugins/lsp/ui.lua +++ b/lua/plugins/lsp/ui.lua @@ -29,25 +29,25 @@ end function M.on_attach(client, bufnr) -- Highlight references - if client.server_capabilities.documentHighlightProvider then - vim.api.nvim_create_augroup("lsp_document_highlight", { - clear = false, - }) - vim.api.nvim_clear_autocmds({ - group = "lsp_document_highlight", - buffer = bufnr, - }) - -- vim.api.nvim_create_autocmd({ "CursorHold", "CursorHoldI" }, { - -- group = "lsp_document_highlight", - -- buffer = bufnr, - -- callback = vim.lsp.buf.document_highlight, - -- }) - -- vim.api.nvim_create_autocmd("CursorMoved", { - -- group = "lsp_document_highlight", - -- buffer = bufnr, - -- callback = vim.lsp.buf.clear_references, - -- }) - end + -- if client.server_capabilities.documentHighlightProvider then + -- vim.api.nvim_create_augroup("lsp_document_highlight", { + -- clear = false, + -- }) + -- vim.api.nvim_clear_autocmds({ + -- group = "lsp_document_highlight", + -- buffer = bufnr, + -- }) + -- -- vim.api.nvim_create_autocmd({ "CursorHold", "CursorHoldI" }, { + -- -- group = "lsp_document_highlight", + -- -- buffer = bufnr, + -- -- callback = vim.lsp.buf.document_highlight, + -- -- }) + -- -- vim.api.nvim_create_autocmd("CursorMoved", { + -- -- group = "lsp_document_highlight", + -- -- buffer = bufnr, + -- -- callback = vim.lsp.buf.clear_references, + -- -- }) + -- end end return M diff --git a/lua/plugins/ui.lua b/lua/plugins/ui.lua index c74f319..fdc50ef 100644 --- a/lua/plugins/ui.lua +++ b/lua/plugins/ui.lua @@ -148,5 +148,21 @@ return { hooks.register(hooks.type.SCOPE_HIGHLIGHT, hooks.builtin.scope_highlight_from_extmark) end + }, + { + 'akinsho/bufferline.nvim', + version = "*", + dependencies = 'nvim-tree/nvim-web-devicons', + event = "VeryLazy", + opts = { + options = { + hover = { + enabled = true, + delay = 10, + reveal = { 'close' } + } + } + + } } }