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 })
 | 
			
		||||
 | 
			
		||||
-- search and replace {{{
 | 
			
		||||
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('v', '<leader>r', ':s///gI<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('v', '<leader>r', ':s///gI<Left><Left><Left><Left>', { noremap = true })
 | 
			
		||||
-- }}}
 | 
			
		||||
 | 
			
		||||
function MapDHM()
 | 
			
		||||
 | 
			
		||||
@ -2,8 +2,8 @@ return {
 | 
			
		||||
	'j-morano/buffer_manager.nvim',
 | 
			
		||||
	keys = {
 | 
			
		||||
		{ '<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_prev()<cr>", desc = 'next buffer' },
 | 
			
		||||
		{ 'gp', "<cmd> lua require('buffer_manager.ui').nav_next()<cr>", desc = 'next buffer' },
 | 
			
		||||
		{ 'gn', "<cmd> lua require('buffer_manager.ui').nav_prev()<cr>", desc = 'next buffer' },
 | 
			
		||||
	},
 | 
			
		||||
	opts = {
 | 
			
		||||
		-- line_keys = '', -- deactivate line keybindings
 | 
			
		||||
 | 
			
		||||
@ -13,7 +13,6 @@ return {
 | 
			
		||||
	event = { 'InsertEnter', 'CmdlineEnter' },
 | 
			
		||||
	config = function()
 | 
			
		||||
		local cmp = require 'cmp'
 | 
			
		||||
		local lspkind = require 'lspkind'
 | 
			
		||||
 | 
			
		||||
		cmp.setup {
 | 
			
		||||
			snippet = {
 | 
			
		||||
 | 
			
		||||
@ -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 = '▒' },
 | 
			
		||||
 | 
			
		||||
@ -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',
 | 
			
		||||
 | 
			
		||||
@ -27,6 +27,7 @@ function M.on_attach(bufnr)
 | 
			
		||||
	map('<leader>lp', vim.diagnostic.goto_prev, 'previous diagnostic')
 | 
			
		||||
	map('<leader>ll', vim.diagnostic.goto_next, 'next diagnostic')
 | 
			
		||||
	map('<leader>lw', telescope 'diagnostics', 'diagnostics list')
 | 
			
		||||
	map('<leader>le', '<cmd>Telescope diagnostics bufnr=0<cr>', 'diagnostics list')
 | 
			
		||||
	map('<leader>ls', function()
 | 
			
		||||
		vim.diagnostic.open_float { scope = 'cursor' }
 | 
			
		||||
	end, 'cursor diagnostic')
 | 
			
		||||
 | 
			
		||||
@ -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" }, {
 | 
			
		||||
    -- 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,
 | 
			
		||||
        --     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
 | 
			
		||||
    --     -- 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
 | 
			
		||||
 | 
			
		||||
@ -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' }
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user