.config/nvim/lua/config/maps.lua

changeset 1099
28f3c3900576
parent 1092
5bdcd5080f8c
child 1101
40419d8e3cbb
equal deleted inserted replaced
1098:8d479a558198 1099:28f3c3900576
74 group = vim.api.nvim_create_augroup("lsp_attach", { clear = true }), 74 group = vim.api.nvim_create_augroup("lsp_attach", { clear = true }),
75 callback = function(args) 75 callback = function(args)
76 local bufopts = { buffer = args.buf } 76 local bufopts = { buffer = args.buf }
77 77
78 map("n", "<leader>d", vim.diagnostic.open_float, bufopts) 78 map("n", "<leader>d", vim.diagnostic.open_float, bufopts)
79 map("n", "[d", vim.diagnostic.goto_prev, bufopts)
80 map("n", "]d", vim.diagnostic.goto_next, bufopts)
81 map("n", "<leader>ld", vim.diagnostic.setqflist, bufopts) 79 map("n", "<leader>ld", vim.diagnostic.setqflist, bufopts)
80 map("n", "[d", function() vim.diagnostic.goto_prev({float = false}) end, bufopts)
81 map("n", "]d", function() vim.diagnostic.goto_next({float = false}) end, bufopts)
82 82
83 map("n", "gD", vim.lsp.buf.declaration, bufopts) 83 map("n", "gD", vim.lsp.buf.declaration, bufopts)
84 map("n", "gd", vim.lsp.buf.definition, bufopts) 84 map("n", "gd", vim.lsp.buf.definition, bufopts)
85 map("n", "K", vim.lsp.buf.hover, bufopts) 85 map("n", "K", vim.lsp.buf.hover, bufopts)
86 map("n", "gi", vim.lsp.buf.implementation, bufopts) 86 map("n", "gi", vim.lsp.buf.implementation, bufopts)

mercurial