update
This commit is contained in:
parent
d79e2d5ecb
commit
5b5520e603
@ -26,9 +26,9 @@ imap <c-s> <Esc>[s1z=`]a
|
|||||||
keymap('n', '<BS>', ':', { noremap = true })
|
keymap('n', '<BS>', ':', { noremap = true })
|
||||||
|
|
||||||
-- search and replace {{{
|
-- search and replace {{{
|
||||||
keymap('n', '<leader>rs', ':s///gI<Left><Left><Left><Left><Left><Left>', { noremap = true })
|
-- keymap('n', '<leader>rs', ':s///gI<Left><Left><Left><Left><Left><Left>', { noremap = true })
|
||||||
keymap('n', '<leader>rr', ':%s///gI<Left><Left><Left><Left>', { noremap = true })
|
-- keymap('n', '<leader>rr', ':%s///gI<Left><Left><Left><Left>', { noremap = true })
|
||||||
keymap('v', '<leader>r', ':s///gI<Left><Left><Left><Left>', { noremap = true })
|
-- keymap('v', '<leader>r', ':s///gI<Left><Left><Left><Left>', { noremap = true })
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
function MapDHM()
|
function MapDHM()
|
||||||
|
@ -2,8 +2,8 @@ return {
|
|||||||
'j-morano/buffer_manager.nvim',
|
'j-morano/buffer_manager.nvim',
|
||||||
keys = {
|
keys = {
|
||||||
{ '<leader><leader>', "<cmd> lua require('buffer_manager.ui').toggle_quick_menu()<cr>", desc = 'buffers' },
|
{ '<leader><leader>', "<cmd> lua require('buffer_manager.ui').toggle_quick_menu()<cr>", desc = 'buffers' },
|
||||||
{ 'gn', "<cmd> lua require('buffer_manager.ui').nav_next()<cr>", desc = 'next buffer' },
|
{ 'gp', "<cmd> lua require('buffer_manager.ui').nav_next()<cr>", desc = 'next buffer' },
|
||||||
{ 'gp', "<cmd> lua require('buffer_manager.ui').nav_prev()<cr>", desc = 'next buffer' },
|
{ 'gn', "<cmd> lua require('buffer_manager.ui').nav_prev()<cr>", desc = 'next buffer' },
|
||||||
},
|
},
|
||||||
opts = {
|
opts = {
|
||||||
-- line_keys = '', -- deactivate line keybindings
|
-- line_keys = '', -- deactivate line keybindings
|
||||||
|
@ -13,7 +13,6 @@ return {
|
|||||||
event = { 'InsertEnter', 'CmdlineEnter' },
|
event = { 'InsertEnter', 'CmdlineEnter' },
|
||||||
config = function()
|
config = function()
|
||||||
local cmp = require 'cmp'
|
local cmp = require 'cmp'
|
||||||
local lspkind = require 'lspkind'
|
|
||||||
|
|
||||||
cmp.setup {
|
cmp.setup {
|
||||||
snippet = {
|
snippet = {
|
||||||
|
@ -8,7 +8,7 @@ return {
|
|||||||
view = {
|
view = {
|
||||||
-- Visualization style. Possible values are 'sign' and 'number'.
|
-- Visualization style. Possible values are 'sign' and 'number'.
|
||||||
-- Default: 'number' if line numbers are enabled, 'sign' otherwise.
|
-- 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 used for hunks with 'sign' view
|
||||||
signs = { add = '▒', change = '▒', delete = '▒' },
|
signs = { add = '▒', change = '▒', delete = '▒' },
|
||||||
|
@ -19,15 +19,16 @@ return {
|
|||||||
vim.diagnostic.config {
|
vim.diagnostic.config {
|
||||||
underline = true,
|
underline = true,
|
||||||
update_in_insert = true,
|
update_in_insert = true,
|
||||||
signs = false,
|
signs = true,
|
||||||
virtual_text = {
|
virtual_text = false,
|
||||||
source = 'if_many',
|
-- virtual_text = {
|
||||||
prefix = '●',
|
-- source = 'if_many',
|
||||||
spacing = 5,
|
-- prefix = '●',
|
||||||
-- this will set set the prefix to a function that returns the diagnostics icon based on the severity
|
-- spacing = 5,
|
||||||
-- this only works on a recent 0.10.0 build. Will be set to "●" when not supported
|
-- -- this will set set the prefix to a function that returns the diagnostics icon based on the severity
|
||||||
-- prefix = "icons",
|
-- -- this only works on a recent 0.10.0 build. Will be set to "●" when not supported
|
||||||
},
|
-- -- prefix = "icons",
|
||||||
|
-- },
|
||||||
float = {
|
float = {
|
||||||
focusable = true,
|
focusable = true,
|
||||||
-- style = 'minimal',
|
-- style = 'minimal',
|
||||||
|
@ -27,6 +27,7 @@ function M.on_attach(bufnr)
|
|||||||
map('<leader>lp', vim.diagnostic.goto_prev, 'previous diagnostic')
|
map('<leader>lp', vim.diagnostic.goto_prev, 'previous diagnostic')
|
||||||
map('<leader>ll', vim.diagnostic.goto_next, 'next diagnostic')
|
map('<leader>ll', vim.diagnostic.goto_next, 'next diagnostic')
|
||||||
map('<leader>lw', telescope 'diagnostics', 'diagnostics list')
|
map('<leader>lw', telescope 'diagnostics', 'diagnostics list')
|
||||||
|
map('<leader>le', '<cmd>Telescope diagnostics bufnr=0<cr>', 'diagnostics list')
|
||||||
map('<leader>ls', function()
|
map('<leader>ls', function()
|
||||||
vim.diagnostic.open_float { scope = 'cursor' }
|
vim.diagnostic.open_float { scope = 'cursor' }
|
||||||
end, 'cursor diagnostic')
|
end, 'cursor diagnostic')
|
||||||
|
@ -29,25 +29,25 @@ end
|
|||||||
|
|
||||||
function M.on_attach(client, bufnr)
|
function M.on_attach(client, bufnr)
|
||||||
-- Highlight references
|
-- Highlight references
|
||||||
if client.server_capabilities.documentHighlightProvider then
|
-- if client.server_capabilities.documentHighlightProvider then
|
||||||
vim.api.nvim_create_augroup("lsp_document_highlight", {
|
-- vim.api.nvim_create_augroup("lsp_document_highlight", {
|
||||||
clear = false,
|
-- clear = false,
|
||||||
})
|
-- })
|
||||||
vim.api.nvim_clear_autocmds({
|
-- vim.api.nvim_clear_autocmds({
|
||||||
group = "lsp_document_highlight",
|
-- group = "lsp_document_highlight",
|
||||||
buffer = bufnr,
|
-- buffer = bufnr,
|
||||||
})
|
-- })
|
||||||
-- vim.api.nvim_create_autocmd({ "CursorHold", "CursorHoldI" }, {
|
-- -- vim.api.nvim_create_autocmd({ "CursorHold", "CursorHoldI" }, {
|
||||||
-- group = "lsp_document_highlight",
|
-- -- group = "lsp_document_highlight",
|
||||||
-- buffer = bufnr,
|
-- -- buffer = bufnr,
|
||||||
-- callback = vim.lsp.buf.document_highlight,
|
-- -- callback = vim.lsp.buf.document_highlight,
|
||||||
-- })
|
-- -- })
|
||||||
-- vim.api.nvim_create_autocmd("CursorMoved", {
|
-- -- vim.api.nvim_create_autocmd("CursorMoved", {
|
||||||
-- group = "lsp_document_highlight",
|
-- -- group = "lsp_document_highlight",
|
||||||
-- buffer = bufnr,
|
-- -- buffer = bufnr,
|
||||||
-- callback = vim.lsp.buf.clear_references,
|
-- -- callback = vim.lsp.buf.clear_references,
|
||||||
-- })
|
-- -- })
|
||||||
end
|
-- end
|
||||||
end
|
end
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
@ -148,5 +148,21 @@ return {
|
|||||||
|
|
||||||
hooks.register(hooks.type.SCOPE_HIGHLIGHT, hooks.builtin.scope_highlight_from_extmark)
|
hooks.register(hooks.type.SCOPE_HIGHLIGHT, hooks.builtin.scope_highlight_from_extmark)
|
||||||
end
|
end
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'akinsho/bufferline.nvim',
|
||||||
|
version = "*",
|
||||||
|
dependencies = 'nvim-tree/nvim-web-devicons',
|
||||||
|
event = "VeryLazy",
|
||||||
|
opts = {
|
||||||
|
options = {
|
||||||
|
hover = {
|
||||||
|
enabled = true,
|
||||||
|
delay = 10,
|
||||||
|
reveal = { 'close' }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user