udpate keymaps
This commit is contained in:
parent
67e501963c
commit
dbb79dd46b
3 changed files with 105 additions and 94 deletions
|
@ -42,14 +42,14 @@ require("util").keymaps({
|
||||||
["H"] = { "<cmd>tabprevious<cr>", desc = "Move to previous tab" },
|
["H"] = { "<cmd>tabprevious<cr>", desc = "Move to previous tab" },
|
||||||
["L"] = { "<cmd>tabnext<cr>", desc = "Move to next tab" },
|
["L"] = { "<cmd>tabnext<cr>", desc = "Move to next tab" },
|
||||||
-- reformat LSP
|
-- reformat LSP
|
||||||
["<leader>lf"] = {
|
["<leader>l<leader>"] = {
|
||||||
function()
|
function()
|
||||||
-- vim.cmd "SqlxFormat"
|
-- vim.cmd "SqlxFormat"
|
||||||
vim.lsp.buf.format()
|
vim.lsp.buf.format()
|
||||||
end,
|
end,
|
||||||
desc = "Reformat file",
|
desc = "Reformat file",
|
||||||
},
|
},
|
||||||
["<leader>lsf"] = { "<cmd>SqlxFormat<cr>", desc = "Format sqlx queries in rust raw string literals." },
|
["<leader>ls<leader>"] = { "<cmd>SqlxFormat<cr>", desc = "Format sqlx queries in rust raw string literals." },
|
||||||
["<leader>ld"] = {
|
["<leader>ld"] = {
|
||||||
function()
|
function()
|
||||||
vim.diagnostic.open_float()
|
vim.diagnostic.open_float()
|
||||||
|
|
|
@ -35,7 +35,7 @@ return {
|
||||||
"<leader>ff",
|
"<leader>ff",
|
||||||
function()
|
function()
|
||||||
require("telescope.builtin").find_files({
|
require("telescope.builtin").find_files({
|
||||||
hidden = true
|
hidden = true,
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
desc = "Find Files",
|
desc = "Find Files",
|
||||||
|
@ -50,6 +50,9 @@ return {
|
||||||
{
|
{
|
||||||
"<leader>fw",
|
"<leader>fw",
|
||||||
function()
|
function()
|
||||||
|
if vim.fn.executable("rg") == 0 then
|
||||||
|
vim.notify("rg not installed, live grep will not function.", 3)
|
||||||
|
end
|
||||||
require("telescope.builtin").live_grep({
|
require("telescope.builtin").live_grep({
|
||||||
grep_open_files = true,
|
grep_open_files = true,
|
||||||
})
|
})
|
||||||
|
@ -77,6 +80,13 @@ return {
|
||||||
end,
|
end,
|
||||||
desc = "Find Commands",
|
desc = "Find Commands",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"<leader>lfr",
|
||||||
|
function()
|
||||||
|
require("telescope.builtin").lsp_references()
|
||||||
|
end,
|
||||||
|
desc = "Find References",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
opts = {
|
opts = {
|
||||||
pickers = {
|
pickers = {
|
||||||
|
@ -86,10 +96,10 @@ return {
|
||||||
find_files = {
|
find_files = {
|
||||||
hidden = true,
|
hidden = true,
|
||||||
sort_lastused = true,
|
sort_lastused = true,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
defaults = {
|
defaults = {
|
||||||
file_ignore_patterns = { 'node_modules', 'package-lock.json', 'target' },
|
file_ignore_patterns = { "node_modules", "package-lock.json", "target" },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
return {
|
return {
|
||||||
"rcarriga/nvim-notify",
|
"rcarriga/nvim-notify",
|
||||||
|
event = "VeryLazy",
|
||||||
opts = {
|
opts = {
|
||||||
top_down = false,
|
top_down = false,
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue