mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-25 14:01:06 +00:00
feat(keymaps): allow more dynamic keymaps structure for ease of modularization
This commit is for encouraging modularization and facilitate ease of use
**Simplify Keymap Configuration**
Previously, users had to specify the entire keymap structure to modify
key mappings. For example:
```lua
{
keymaps = {
window = {
window_left = "keys1",
window_lower = "keys2"
},
resize_window = {
size_increase_height = "keys3"
}
},
}
```
Now, users can still specify the structure for better organization, but
they can directly specify the key mappings without needing to follow the
nested structure. The new approach allows for more flexibility and
simplicity:
```lua
{
window_left = "keys1",
size_increase_height = "keys3"
}
```
Additionally, users can group keys into tables for better organization
if desired:
```lua
{
{
window_left = "keys1",
window_lower = "keys2"
}
}
```
This change ensures that only the `keys = "keys"` mappings matter,
making the configuration process more straightforward and user-friendly.
This commit is contained in:
parent
fc4484f2dc
commit
600f7e03b0
56 changed files with 1327 additions and 1278 deletions
|
|
@ -3,7 +3,7 @@
|
||||||
-- DO NOT USE `LazyVim.safe_keymap_set` IN YOUR OWN CONFIG!!
|
-- DO NOT USE `LazyVim.safe_keymap_set` IN YOUR OWN CONFIG!!
|
||||||
-- use `vim.keymap.set` instead
|
-- use `vim.keymap.set` instead
|
||||||
local map = LazyVim.safe_keymap_set
|
local map = LazyVim.safe_keymap_set
|
||||||
local k = require("lazyvim.keymaps").get_keymaps().keymaps
|
local k = require("lazyvim.keymaps").get_keymaps()
|
||||||
|
|
||||||
-- better up/down
|
-- better up/down
|
||||||
map({ "n", "x" }, "j", "v:count == 0 ? 'gj' : 'j'", { desc = "Down", expr = true, silent = true })
|
map({ "n", "x" }, "j", "v:count == 0 ? 'gj' : 'j'", { desc = "Down", expr = true, silent = true })
|
||||||
|
|
@ -12,34 +12,34 @@ map({ "n", "x" }, "k", "v:count == 0 ? 'gk' : 'k'", { desc = "Up", expr = true,
|
||||||
map({ "n", "x" }, "<Up>", "v:count == 0 ? 'gk' : 'k'", { desc = "Up", expr = true, silent = true })
|
map({ "n", "x" }, "<Up>", "v:count == 0 ? 'gk' : 'k'", { desc = "Up", expr = true, silent = true })
|
||||||
|
|
||||||
-- Move to window using the <ctrl> hjkl keys
|
-- Move to window using the <ctrl> hjkl keys
|
||||||
map("n", k.window.left, "<C-w>h", { desc = "Go to Left Window", remap = true })
|
map("n", k.window_left, "<C-w>h", { desc = "Go to Left Window", remap = true })
|
||||||
map("n", k.window.lower, "<C-w>j", { desc = "Go to Lower Window", remap = true })
|
map("n", k.window_lower, "<C-w>j", { desc = "Go to Lower Window", remap = true })
|
||||||
map("n", k.window.upper, "<C-w>k", { desc = "Go to Upper Window", remap = true })
|
map("n", k.window_upper, "<C-w>k", { desc = "Go to Upper Window", remap = true })
|
||||||
map("n", k.window.right, "<C-w>l", { desc = "Go to Right Window", remap = true })
|
map("n", k.window_right, "<C-w>l", { desc = "Go to Right Window", remap = true })
|
||||||
|
|
||||||
-- Resize window using <ctrl> arrow keys
|
-- Resize window using <ctrl> arrow keys
|
||||||
map("n", k.resize_window.increase_height, "<cmd>resize +2<cr>", { desc = "Increase Window Height" })
|
map("n", k.size_increase_height, "<cmd>resize +2<cr>", { desc = "Increase Window Height" })
|
||||||
map("n", k.resize_window.decrease_height, "<cmd>resize -2<cr>", { desc = "Decrease Window Height" })
|
map("n", k.size_decrease_height, "<cmd>resize -2<cr>", { desc = "Decrease Window Height" })
|
||||||
map("n", k.resize_window.decrease_width, "<cmd>vertical resize -2<cr>", { desc = "Decrease Window Width" })
|
map("n", k.size_decrease_width, "<cmd>vertical resize -2<cr>", { desc = "Decrease Window Width" })
|
||||||
map("n", k.resize_window.increase_width, "<cmd>vertical resize +2<cr>", { desc = "Increase Window Width" })
|
map("n", k.size_increase_width, "<cmd>vertical resize +2<cr>", { desc = "Increase Window Width" })
|
||||||
|
|
||||||
-- Move Lines
|
-- Move Lines
|
||||||
map("n", k.move_lines.down, "<cmd>execute 'move .+' . v:count1<cr>==", { desc = "Move Down" })
|
map("n", k.move_down, "<cmd>execute 'move .+' . v:count1<cr>==", { desc = "Move Down" })
|
||||||
map("n", k.move_lines.up, "<cmd>execute 'move .-' . (v:count1 + 1)<cr>==", { desc = "Move Up" })
|
map("n", k.move_up, "<cmd>execute 'move .-' . (v:count1 + 1)<cr>==", { desc = "Move Up" })
|
||||||
map("i", k.move_lines.down, "<esc><cmd>m .+1<cr>==gi", { desc = "Move Down" })
|
map("i", k.move_down, "<esc><cmd>m .+1<cr>==gi", { desc = "Move Down" })
|
||||||
map("i", k.move_lines.up, "<esc><cmd>m .-2<cr>==gi", { desc = "Move Up" })
|
map("i", k.move_up, "<esc><cmd>m .-2<cr>==gi", { desc = "Move Up" })
|
||||||
map("v", k.move_lines.down, ":<C-u>execute \"'<,'>move '>+\" . v:count1<cr>gv=gv", { desc = "Move Down" })
|
map("v", k.move_down, ":<C-u>execute \"'<,'>move '>+\" . v:count1<cr>gv=gv", { desc = "Move Down" })
|
||||||
map("v", k.move_lines.up, ":<C-u>execute \"'<,'>move '<-\" . (v:count1 + 1)<cr>gv=gv", { desc = "Move Up" })
|
map("v", k.move_up, ":<C-u>execute \"'<,'>move '<-\" . (v:count1 + 1)<cr>gv=gv", { desc = "Move Up" })
|
||||||
|
|
||||||
-- buffers
|
-- buffers
|
||||||
map("n", k.buffers.prev, "<cmd>bprevious<cr>", { desc = "Prev Buffer" })
|
map("n", k.buf_prev, "<cmd>bprevious<cr>", { desc = "Prev Buffer" })
|
||||||
map("n", k.buffers.next, "<cmd>bnext<cr>", { desc = "Next Buffer" })
|
map("n", k.buf_next, "<cmd>bnext<cr>", { desc = "Next Buffer" })
|
||||||
map("n", k.buffers.prev_alt, "<cmd>bprevious<cr>", { desc = "Prev Buffer" })
|
map("n", k.buf_prev_alt, "<cmd>bprevious<cr>", { desc = "Prev Buffer" })
|
||||||
map("n", k.buffers.next_alt, "<cmd>bnext<cr>", { desc = "Next Buffer" })
|
map("n", k.buf_next_alt, "<cmd>bnext<cr>", { desc = "Next Buffer" })
|
||||||
map("n", k.buffers.switch_to_other, "<cmd>e #<cr>", { desc = "Switch to Other Buffer" })
|
map("n", k.buf_switch_to_other, "<cmd>e #<cr>", { desc = "Switch to Other Buffer" })
|
||||||
map("n", k.buffers.switch_to_other_alt, "<cmd>e #<cr>", { desc = "Switch to Other Buffer" })
|
map("n", k.buf_switch_to_other_alt, "<cmd>e #<cr>", { desc = "Switch to Other Buffer" })
|
||||||
map("n", k.buffers.delete, LazyVim.ui.bufremove, { desc = "Delete Buffer" })
|
map("n", k.buf_delete, LazyVim.ui.bufremove, { desc = "Delete Buffer" })
|
||||||
map("n", k.buffers.delete_and_close, "<cmd>:bd<cr>", { desc = "Delete Buffer and Window" })
|
map("n", k.buf_delete_and_close, "<cmd>:bd<cr>", { desc = "Delete Buffer and Window" })
|
||||||
|
|
||||||
-- Clear search with <esc>
|
-- Clear search with <esc>
|
||||||
map({ "i", "n" }, "<esc>", "<cmd>noh<cr><esc>", { desc = "Escape and Clear hlsearch" })
|
map({ "i", "n" }, "<esc>", "<cmd>noh<cr><esc>", { desc = "Escape and Clear hlsearch" })
|
||||||
|
|
@ -77,8 +77,8 @@ map("v", "<", "<gv")
|
||||||
map("v", ">", ">gv")
|
map("v", ">", ">gv")
|
||||||
|
|
||||||
-- commenting
|
-- commenting
|
||||||
map("n", k.commenting.add_comment_below, "o<esc>Vcx<esc><cmd>normal gcc<cr>fxa<bs>", { desc = "Add Comment Below" })
|
map("n", k.comment_add_below, "o<esc>Vcx<esc><cmd>normal gcc<cr>fxa<bs>", { desc = "Add Comment Below" })
|
||||||
map("n", k.commenting.add_comment_above, "O<esc>Vcx<esc><cmd>normal gcc<cr>fxa<bs>", { desc = "Add Comment Above" })
|
map("n", k.comment_add_above, "O<esc>Vcx<esc><cmd>normal gcc<cr>fxa<bs>", { desc = "Add Comment Above" })
|
||||||
|
|
||||||
-- lazy
|
-- lazy
|
||||||
map("n", k.lazy, "<cmd>Lazy<cr>", { desc = "Lazy" })
|
map("n", k.lazy, "<cmd>Lazy<cr>", { desc = "Lazy" })
|
||||||
|
|
@ -105,46 +105,46 @@ local diagnostic_goto = function(next, severity)
|
||||||
go({ severity = severity })
|
go({ severity = severity })
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
map("n", k.diagnostics.line_diagnostics, vim.diagnostic.open_float, { desc = "Line Diagnostics" })
|
map("n", k.diagnostic_line_diagnostics, vim.diagnostic.open_float, { desc = "Line Diagnostics" })
|
||||||
map("n", k.diagnostics.next_diagnostic, diagnostic_goto(true), { desc = "Next Diagnostic" })
|
map("n", k.diagnostic_next_diagnostic, diagnostic_goto(true), { desc = "Next Diagnostic" })
|
||||||
map("n", k.diagnostics.prev_diagnostic, diagnostic_goto(false), { desc = "Prev Diagnostic" })
|
map("n", k.diagnostic_prev_diagnostic, diagnostic_goto(false), { desc = "Prev Diagnostic" })
|
||||||
map("n", k.diagnostics.next_error, diagnostic_goto(true, "ERROR"), { desc = "Next Error" })
|
map("n", k.diagnostic_next_error, diagnostic_goto(true, "ERROR"), { desc = "Next Error" })
|
||||||
map("n", k.diagnostics.prev_error, diagnostic_goto(false, "ERROR"), { desc = "Prev Error" })
|
map("n", k.diagnostic_prev_error, diagnostic_goto(false, "ERROR"), { desc = "Prev Error" })
|
||||||
map("n", k.diagnostics.next_warning, diagnostic_goto(true, "WARN"), { desc = "Next Warning" })
|
map("n", k.diagnostic_next_warning, diagnostic_goto(true, "WARN"), { desc = "Next Warning" })
|
||||||
map("n", k.diagnostics.prev_warning, diagnostic_goto(false, "WARN"), { desc = "Prev Warning" })
|
map("n", k.diagnostic_prev_warning, diagnostic_goto(false, "WARN"), { desc = "Prev Warning" })
|
||||||
|
|
||||||
-- stylua: ignore start
|
-- stylua: ignore start
|
||||||
|
|
||||||
-- toggle options
|
-- toggle options
|
||||||
LazyVim.toggle.map(k.toggle_options.auto_format_buffer, LazyVim.toggle.format())
|
LazyVim.toggle.map(k.toggle_auto_format_buffer, LazyVim.toggle.format())
|
||||||
LazyVim.toggle.map(k.toggle_options.auto_format_global, LazyVim.toggle.format(true))
|
LazyVim.toggle.map(k.toggle_auto_format_global, LazyVim.toggle.format(true))
|
||||||
LazyVim.toggle.map(k.toggle_options.spelling, LazyVim.toggle("spell", { name = "Spelling" }))
|
LazyVim.toggle.map(k.toggle_spelling, LazyVim.toggle("spell", { name = "Spelling" }))
|
||||||
LazyVim.toggle.map(k.toggle_options.wrap, LazyVim.toggle("wrap", { name = "Wrap" }))
|
LazyVim.toggle.map(k.toggle_wrap, LazyVim.toggle("wrap", { name = "Wrap" }))
|
||||||
LazyVim.toggle.map(k.toggle_options.relativenumber, LazyVim.toggle("relativenumber", { name = "Relative Number" }))
|
LazyVim.toggle.map(k.toggle_relativenumber, LazyVim.toggle("relativenumber", { name = "Relative Number" }))
|
||||||
LazyVim.toggle.map(k.toggle_options.diagnostics, LazyVim.toggle.diagnostics)
|
LazyVim.toggle.map(k.toggle_diagnostics, LazyVim.toggle.diagnostics)
|
||||||
LazyVim.toggle.map(k.toggle_options.number, LazyVim.toggle.number)
|
LazyVim.toggle.map(k.toggle_number, LazyVim.toggle.number)
|
||||||
LazyVim.toggle.map(k.toggle_options.conceallevel, LazyVim.toggle("conceallevel", { values = { 0, vim.o.conceallevel > 0 and vim.o.conceallevel or 2 } }))
|
LazyVim.toggle.map(k.toggle_conceallevel, LazyVim.toggle("conceallevel", { values = { 0, vim.o.conceallevel > 0 and vim.o.conceallevel or 2 } }))
|
||||||
LazyVim.toggle.map(k.toggle_options.treesitter, LazyVim.toggle.treesitter)
|
LazyVim.toggle.map(k.toggle_treesitter, LazyVim.toggle.treesitter)
|
||||||
LazyVim.toggle.map(k.toggle_options.background, LazyVim.toggle("background", { values = { "light", "dark" }, name = "Background" }))
|
LazyVim.toggle.map(k.toggle_background, LazyVim.toggle("background", { values = { "light", "dark" }, name = "Background" }))
|
||||||
if vim.lsp.inlay_hint then
|
if vim.lsp.inlay_hint then
|
||||||
LazyVim.toggle.map(k.toggle_options.inlay_hints, LazyVim.toggle.inlay_hints)
|
LazyVim.toggle.map(k.toggle_inlay_hints, LazyVim.toggle.inlay_hints)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- lazygit
|
-- lazygit
|
||||||
map("n", k.lazygit.toggle_root, function() LazyVim.lazygit( { cwd = LazyVim.root.git() }) end, { desc = "Lazygit (Root Dir)" })
|
map("n", k.lazygit_toggle_root, function() LazyVim.lazygit( { cwd = LazyVim.root.git() }) end, { desc = "Lazygit (Root Dir)" })
|
||||||
map("n", k.lazygit.toggle_cwd, function() LazyVim.lazygit() end, { desc = "Lazygit (cwd)" })
|
map("n", k.lazygit_toggle_cwd, function() LazyVim.lazygit() end, { desc = "Lazygit (cwd)" })
|
||||||
map("n", k.lazygit.blame_line, LazyVim.lazygit.blame_line, { desc = "Git Blame Line" })
|
map("n", k.lazygit_blame_line, LazyVim.lazygit.blame_line, { desc = "Git Blame Line" })
|
||||||
map("n", k.lazygit.browse, LazyVim.lazygit.browse, { desc = "Git Browse" })
|
map("n", k.lazygit_browse, LazyVim.lazygit.browse, { desc = "Git Browse" })
|
||||||
|
|
||||||
map("n", k.lazygit.current_file_history, function()
|
map("n", k.lazygit_current_file_history, function()
|
||||||
local git_path = vim.api.nvim_buf_get_name(0)
|
local git_path = vim.api.nvim_buf_get_name(0)
|
||||||
LazyVim.lazygit({args = { "-f", vim.trim(git_path) }})
|
LazyVim.lazygit({args = { "-f", vim.trim(git_path) }})
|
||||||
end, { desc = "Lazygit Current File History" })
|
end, { desc = "Lazygit Current File History" })
|
||||||
|
|
||||||
map("n", k.lazygit.git_log_root, function()
|
map("n", k.lazygit_git_log_root, function()
|
||||||
LazyVim.lazygit({ args = { "log" }, cwd = LazyVim.root.git() })
|
LazyVim.lazygit({ args = { "log" }, cwd = LazyVim.root.git() })
|
||||||
end, { desc = "Lazygit Log" })
|
end, { desc = "Lazygit Log" })
|
||||||
map("n", k.lazygit.git_log_cwd, function()
|
map("n", k.lazygit_git_log_cwd, function()
|
||||||
LazyVim.lazygit({ args = { "log" } })
|
LazyVim.lazygit({ args = { "log" } })
|
||||||
end, { desc = "Lazygit Log (cwd)" })
|
end, { desc = "Lazygit Log (cwd)" })
|
||||||
|
|
||||||
|
|
@ -160,32 +160,32 @@ map("n", k.lazyvim_changelog, function() LazyVim.news.changelog() end, { desc =
|
||||||
|
|
||||||
-- floating terminal
|
-- floating terminal
|
||||||
local lazyterm = function() LazyVim.terminal(nil, { cwd = LazyVim.root() }) end
|
local lazyterm = function() LazyVim.terminal(nil, { cwd = LazyVim.root() }) end
|
||||||
map("n", k.terminal.floating_terminal.toggle_root, lazyterm, { desc = "Terminal (Root Dir)" })
|
map("n", k.terminal_toggle_root, lazyterm, { desc = "Terminal (Root Dir)" })
|
||||||
map("n", k.terminal.floating_terminal.toggle_cwd, function() LazyVim.terminal() end, { desc = "Terminal (cwd)" })
|
map("n", k.terminal_toggle_cwd, function() LazyVim.terminal() end, { desc = "Terminal (cwd)" })
|
||||||
map("n", k.terminal.floating_terminal.toggle_root_alt_1, lazyterm, { desc = "Terminal (Root Dir)" })
|
map("n", k.terminal_toggle_root_alt_1, lazyterm, { desc = "Terminal (Root Dir)" })
|
||||||
map("n", k.terminal.floating_terminal.toggle_root_alt_2, lazyterm, { desc = "which_key_ignore" })
|
map("n", k.terminal_toggle_root_alt_2, lazyterm, { desc = "which_key_ignore" })
|
||||||
|
|
||||||
-- Terminal Mappings
|
-- Terminal Mappings
|
||||||
map("t", k.terminal.enter_normal_mode, "<c-\\><c-n>", { desc = "Enter Normal Mode" })
|
map("t", k.terminal_enter_normal_mode, "<c-\\><c-n>", { desc = "Enter Normal Mode" })
|
||||||
map("t", k.window.left, "<cmd>wincmd h<cr>", { desc = "Go to Left Window" })
|
map("t", k.window_left, "<cmd>wincmd h<cr>", { desc = "Go to Left Window" })
|
||||||
map("t", k.window.lower, "<cmd>wincmd j<cr>", { desc = "Go to Lower Window" })
|
map("t", k.window_lower, "<cmd>wincmd j<cr>", { desc = "Go to Lower Window" })
|
||||||
map("t", k.window.upper, "<cmd>wincmd k<cr>", { desc = "Go to Upper Window" })
|
map("t", k.window_upper, "<cmd>wincmd k<cr>", { desc = "Go to Upper Window" })
|
||||||
map("t", k.window.right, "<cmd>wincmd l<cr>", { desc = "Go to Right Window" })
|
map("t", k.window_right, "<cmd>wincmd l<cr>", { desc = "Go to Right Window" })
|
||||||
map("t", k.terminal.hide_terminal, "<cmd>close<cr>", { desc = "Hide Terminal" })
|
map("t", k.terminal_hide_terminal, "<cmd>close<cr>", { desc = "Hide Terminal" })
|
||||||
map("t", k.terminal.hide_terminal_alt, "<cmd>close<cr>", { desc = "which_key_ignore" })
|
map("t", k.terminal_hide_terminal_alt, "<cmd>close<cr>", { desc = "which_key_ignore" })
|
||||||
|
|
||||||
-- windows
|
-- windows
|
||||||
map("n", k.windows.windows, "<c-w>", { desc = "Windows", remap = true })
|
map("n", k.window_prefix, "<c-w>", { desc = "Windows", remap = true })
|
||||||
map("n", k.windows.split_window_below, "<C-W>s", { desc = "Split Window Below", remap = true })
|
map("n", k.window_split_window_below, "<C-W>s", { desc = "Split Window Below", remap = true })
|
||||||
map("n", k.windows.split_window_right, "<C-W>v", { desc = "Split Window Right", remap = true })
|
map("n", k.window_split_window_right, "<C-W>v", { desc = "Split Window Right", remap = true })
|
||||||
map("n", k.windows.delete_window, "<C-W>c", { desc = "Delete Window", remap = true })
|
map("n", k.window_delete_window, "<C-W>c", { desc = "Delete Window", remap = true })
|
||||||
LazyVim.toggle.map(k.windows.toggle_maximize_window, LazyVim.toggle.maximize)
|
LazyVim.toggle.map(k.window_toggle_maximize_window, LazyVim.toggle.maximize)
|
||||||
|
|
||||||
-- tabs
|
-- tabs
|
||||||
map("n", k.tabs.last_tab, "<cmd>tablast<cr>", { desc = "Last Tab" })
|
map("n", k.tab_last_tab, "<cmd>tablast<cr>", { desc = "Last Tab" })
|
||||||
map("n", k.tabs.close_other_tabs, "<cmd>tabonly<cr>", { desc = "Close Other Tabs" })
|
map("n", k.tab_close_other_tabs, "<cmd>tabonly<cr>", { desc = "Close Other Tabs" })
|
||||||
map("n", k.tabs.first_tab, "<cmd>tabfirst<cr>", { desc = "First Tab" })
|
map("n", k.tab_first_tab, "<cmd>tabfirst<cr>", { desc = "First Tab" })
|
||||||
map("n", k.tabs.new_tab, "<cmd>tabnew<cr>", { desc = "New Tab" })
|
map("n", k.tab_new_tab, "<cmd>tabnew<cr>", { desc = "New Tab" })
|
||||||
map("n", k.tabs.new_tab, "<cmd>tabnext<cr>", { desc = "Next Tab" })
|
map("n", k.tab_new_tab, "<cmd>tabnext<cr>", { desc = "Next Tab" })
|
||||||
map("n", k.tabs.close_other_tabs, "<cmd>tabclose<cr>", { desc = "Close Tab" })
|
map("n", k.tab_close_other_tabs, "<cmd>tabclose<cr>", { desc = "Close Tab" })
|
||||||
map("n", k.tabs.previous_tab, "<cmd>tabprevious<cr>", { desc = "Previous Tab" })
|
map("n", k.tab_previous_tab, "<cmd>tabprevious<cr>", { desc = "Previous Tab" })
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,4 +1,4 @@
|
||||||
local k = require("lazyvim.keymaps").get_keymaps().coding
|
local k = require("lazyvim.keymaps").get_keymaps()
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
||||||
|
|
@ -28,16 +28,16 @@ return {
|
||||||
local auto_select = true
|
local auto_select = true
|
||||||
local mappings = {}
|
local mappings = {}
|
||||||
local actions = {
|
local actions = {
|
||||||
{ k.cmp.scroll_docs_backward, cmp.mapping.scroll_docs(-4) },
|
{ k.cmp_scroll_docs_backward, cmp.mapping.scroll_docs(-4) },
|
||||||
{ k.cmp.complete, cmp.mapping.complete() },
|
{ k.cmp_complete, cmp.mapping.complete() },
|
||||||
{ k.cmp.confirm_auto_select, LazyVim.cmp.confirm({ select = auto_select }) },
|
{ k.cmp_confirm_auto_select, LazyVim.cmp.confirm({ select = auto_select }) },
|
||||||
{ k.cmp.confirm_select, LazyVim.cmp.confirm({ select = true }) },
|
{ k.cmp_confirm_select, LazyVim.cmp.confirm({ select = true }) },
|
||||||
{ k.cmp.select_prev_item, cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }) },
|
{ k.cmp_select_prev_item, cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }) },
|
||||||
{ k.cmp.scroll_docs_forward, cmp.mapping.scroll_docs(4) },
|
{ k.cmp_scroll_docs_forward, cmp.mapping.scroll_docs(4) },
|
||||||
{ k.cmp.select_next_item, cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }) },
|
{ k.cmp_select_next_item, cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }) },
|
||||||
{ k.cmp.confirm_replace, LazyVim.cmp.confirm({ behavior = cmp.ConfirmBehavior.Replace }) }, -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
|
{ k.cmp_confirm_replace, LazyVim.cmp.confirm({ behavior = cmp.ConfirmBehavior.Replace }) }, -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
|
||||||
{
|
{
|
||||||
k.cmp.abort,
|
k.cmp_abort,
|
||||||
function(fallback)
|
function(fallback)
|
||||||
cmp.abort()
|
cmp.abort()
|
||||||
fallback()
|
fallback()
|
||||||
|
|
@ -56,7 +56,7 @@ return {
|
||||||
completeopt = "menu,menuone,noinsert" .. (auto_select and "" or ",noselect"),
|
completeopt = "menu,menuone,noinsert" .. (auto_select and "" or ",noselect"),
|
||||||
},
|
},
|
||||||
preselect = auto_select and cmp.PreselectMode.Item or cmp.PreselectMode.None,
|
preselect = auto_select and cmp.PreselectMode.Item or cmp.PreselectMode.None,
|
||||||
mapping = cmp.mapping.preset.insert({ mappings }),
|
mapping = cmp.mapping.preset.insert(mappings),
|
||||||
sources = cmp.config.sources({
|
sources = cmp.config.sources({
|
||||||
{ name = "nvim_lsp" },
|
{ name = "nvim_lsp" },
|
||||||
{ name = "path" },
|
{ name = "path" },
|
||||||
|
|
@ -120,7 +120,7 @@ return {
|
||||||
end,
|
end,
|
||||||
keys = {
|
keys = {
|
||||||
{
|
{
|
||||||
k.cmp.snippet.jump_prev,
|
k.snippet_jump_prev,
|
||||||
function()
|
function()
|
||||||
return vim.snippet.active({ direction = 1 }) and "<cmd>lua vim.snippet.jump(1)<cr>" or "<Tab>"
|
return vim.snippet.active({ direction = 1 }) and "<cmd>lua vim.snippet.jump(1)<cr>" or "<Tab>"
|
||||||
end,
|
end,
|
||||||
|
|
@ -129,7 +129,7 @@ return {
|
||||||
mode = { "i", "s" },
|
mode = { "i", "s" },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
k.cmp.snippet.jump_next,
|
k.snippet_jump_next,
|
||||||
function()
|
function()
|
||||||
return vim.snippet.active({ direction = -1 }) and "<cmd>lua vim.snippet.jump(-1)<cr>" or "<S-Tab>"
|
return vim.snippet.active({ direction = -1 }) and "<cmd>lua vim.snippet.jump(-1)<cr>" or "<S-Tab>"
|
||||||
end,
|
end,
|
||||||
|
|
@ -178,8 +178,8 @@ return {
|
||||||
n_lines = 500,
|
n_lines = 500,
|
||||||
custom_textobjects = {
|
custom_textobjects = {
|
||||||
o = ai.gen_spec.treesitter({ -- code block
|
o = ai.gen_spec.treesitter({ -- code block
|
||||||
a = { "@block.outer", "@conditional.outer", "@loop.outer" },
|
a = { "@block", "@conditional.outer", "@loop.outer" },
|
||||||
i = { "@block.inner", "@conditional.inner", "@loop.inner" },
|
i = { "@block", "@conditional.inner", "@loop.inner" },
|
||||||
}),
|
}),
|
||||||
f = ai.gen_spec.treesitter({ a = "@function.outer", i = "@function.inner" }), -- function
|
f = ai.gen_spec.treesitter({ a = "@function.outer", i = "@function.inner" }), -- function
|
||||||
c = ai.gen_spec.treesitter({ a = "@class.outer", i = "@class.inner" }), -- class
|
c = ai.gen_spec.treesitter({ a = "@class.outer", i = "@class.inner" }), -- class
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
local k = require("lazyvim.keymaps").get_keymaps().editor
|
local k = require("lazyvim.keymaps").get_keymaps()
|
||||||
local s = require("lazyvim.keymaps").get_keymaps().extras.coding.mini_surround
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
||||||
|
|
@ -10,40 +9,40 @@ return {
|
||||||
keys = function()
|
keys = function()
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
k.neo_tree.toggle_root,
|
k.neotree_toggle_root,
|
||||||
function()
|
function()
|
||||||
require("neo-tree.command").execute({ toggle = true, dir = LazyVim.root() })
|
require("neo-tree.command").execute({ toggle = true, dir = LazyVim.root() })
|
||||||
end,
|
end,
|
||||||
desc = "Explorer NeoTree (Root Dir)",
|
desc = "Explorer NeoTree (Root Dir)",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
k.neo_tree.toggle_cwd,
|
k.neotree_toggle_cwd,
|
||||||
function()
|
function()
|
||||||
require("neo-tree.command").execute({ toggle = true, dir = vim.uv.cwd() })
|
require("neo-tree.command").execute({ toggle = true, dir = vim.uv.cwd() })
|
||||||
end,
|
end,
|
||||||
desc = "Explorer NeoTree (cwd)",
|
desc = "Explorer NeoTree (cwd)",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
k.neo_tree.toggle_root_alt,
|
k.neotree_toggle_root_alt,
|
||||||
k.neo_tree.toggle_root,
|
k.neotree_toggle_root,
|
||||||
desc = "Explorer NeoTree (Root Dir)",
|
desc = "Explorer NeoTree (Root Dir)",
|
||||||
remap = true,
|
remap = true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
k.neo_tree.toggle_cwd_alt,
|
k.neotree_toggle_cwd_alt,
|
||||||
k.neo_tree.toggle_cwd,
|
k.neotree_toggle_cwd,
|
||||||
desc = "Explorer NeoTree (cwd)",
|
desc = "Explorer NeoTree (cwd)",
|
||||||
remap = true,
|
remap = true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
k.neo_tree.toggle_git_status,
|
k.neotree_toggle_git_status,
|
||||||
function()
|
function()
|
||||||
require("neo-tree.command").execute({ source = "git_status", toggle = true })
|
require("neo-tree.command").execute({ source = "git_status", toggle = true })
|
||||||
end,
|
end,
|
||||||
desc = "Git Explorer",
|
desc = "Git Explorer",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
k.neo_tree.toggle_buffers,
|
k.neotree_toggle_buffers,
|
||||||
function()
|
function()
|
||||||
require("neo-tree.command").execute({ source = "buffers", toggle = true })
|
require("neo-tree.command").execute({ source = "buffers", toggle = true })
|
||||||
end,
|
end,
|
||||||
|
|
@ -76,10 +75,10 @@ return {
|
||||||
opts = function()
|
opts = function()
|
||||||
local neo_tree_mappings = {}
|
local neo_tree_mappings = {}
|
||||||
local neo_tree_actions = {
|
local neo_tree_actions = {
|
||||||
[k.neo_tree.window.open] = "open",
|
[k.neotree_win_open] = "open",
|
||||||
[k.neo_tree.window.close_node] = "close_node",
|
[k.neotree_win_close_node] = "close_node",
|
||||||
["<space>"] = "none",
|
["<space>"] = "none",
|
||||||
[k.neo_tree.window.copy_path_to_clipboard] = {
|
[k.neotree_win_copy_path_to_clipboard] = {
|
||||||
function(state)
|
function(state)
|
||||||
local node = state.tree:get_node()
|
local node = state.tree:get_node()
|
||||||
local path = node:get_id()
|
local path = node:get_id()
|
||||||
|
|
@ -87,13 +86,13 @@ return {
|
||||||
end,
|
end,
|
||||||
desc = "Copy Path to Clipboard",
|
desc = "Copy Path to Clipboard",
|
||||||
},
|
},
|
||||||
[k.neo_tree.window.open_with_system_application] = {
|
[k.neotree_win_open_with_system_application] = {
|
||||||
function(state)
|
function(state)
|
||||||
require("lazy.util").open(state.tree:get_node().path, { system = true })
|
require("lazy.util").open(state.tree:get_node().path, { system = true })
|
||||||
end,
|
end,
|
||||||
desc = "Open with System Application",
|
desc = "Open with System Application",
|
||||||
},
|
},
|
||||||
[k.neo_tree.window.toggle_preview] = { "toggle_preview", config = { use_float = false } },
|
[k.neotree_win_toggle_preview] = { "toggle_preview", config = { use_float = false } },
|
||||||
}
|
}
|
||||||
for key, value in pairs(neo_tree_actions) do
|
for key, value in pairs(neo_tree_actions) do
|
||||||
if key and key ~= "" then
|
if key and key ~= "" then
|
||||||
|
|
@ -158,7 +157,7 @@ return {
|
||||||
cmd = "GrugFar",
|
cmd = "GrugFar",
|
||||||
keys = {
|
keys = {
|
||||||
{
|
{
|
||||||
k.grug_far.open,
|
k.grugfar_open,
|
||||||
function()
|
function()
|
||||||
local grug = require("grug-far")
|
local grug = require("grug-far")
|
||||||
local ext = vim.bo.buftype == "" and vim.fn.expand("%:e")
|
local ext = vim.bo.buftype == "" and vim.fn.expand("%:e")
|
||||||
|
|
@ -186,11 +185,11 @@ return {
|
||||||
opts = {},
|
opts = {},
|
||||||
-- stylua: ignore
|
-- stylua: ignore
|
||||||
keys = {
|
keys = {
|
||||||
{k.flash.jump, mode = { "n", "x", "o" }, function() require("flash").jump() end, desc = "Flash" },
|
{k.flash_jump, mode = { "n", "x", "o" }, function() require("flash").jump() end, desc = "Flash" },
|
||||||
{k.flash.treesitter, mode = { "n", "o", "x" }, function() require("flash").treesitter() end, desc = "Flash Treesitter" },
|
{k.flash_treesitter, mode = { "n", "o", "x" }, function() require("flash").treesitter() end, desc = "Flash Treesitter" },
|
||||||
{k.flash.remote, mode = "o", function() require("flash").remote() end, desc = "Remote Flash" },
|
{k.flash_remote, mode = "o", function() require("flash").remote() end, desc = "Remote Flash" },
|
||||||
{k.flash.treesitter_search, mode = { "o", "x" }, function() require("flash").treesitter_search() end, desc = "Treesitter Search" },
|
{k.flash_treesitter_search, mode = { "o", "x" }, function() require("flash").treesitter_search() end, desc = "Treesitter Search" },
|
||||||
{k.flash.toggle, mode = { "c" }, function() require("flash").toggle() end, desc = "Toggle Flash Search" },
|
{k.flash_toggle, mode = { "c" }, function() require("flash").toggle() end, desc = "Toggle Flash Search" },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -205,33 +204,33 @@ return {
|
||||||
spec = {
|
spec = {
|
||||||
{
|
{
|
||||||
mode = { "n", "v" },
|
mode = { "n", "v" },
|
||||||
{ k.which_key.group.tabs, group = "tabs" },
|
{ k.tabs_prefix, group = "tabs" },
|
||||||
{ k.which_key.group.code, group = "code" },
|
{ k.code_prefix, group = "code" },
|
||||||
{ k.which_key.group.file_find, group = "file/find" },
|
{ k.file_find_prefix, group = "file/find" },
|
||||||
{ k.which_key.group.git, group = "git" },
|
{ k.git_prefix, group = "git" },
|
||||||
{ k.which_key.group.hunks, group = "hunks" },
|
{ k.hunks_prefix, group = "hunks" },
|
||||||
{ k.which_key.group.quit_session, group = "quit/session" },
|
{ k.quit_session_prefix, group = "quit/session" },
|
||||||
{ k.which_key.group.search, group = "search" },
|
{ k.search_prefix, group = "search" },
|
||||||
{ k.which_key.group.ui, group = "ui", icon = { icon = " ", color = "cyan" } },
|
{ k.ui_prefix, group = "ui", icon = { icon = " ", color = "cyan" } },
|
||||||
{
|
{
|
||||||
k.which_key.group.diagnostics_quickfix,
|
k.diagnostics_quickfix_prefix,
|
||||||
group = "diagnostics/quickfix",
|
group = "diagnostics/quickfix",
|
||||||
icon = { icon = " ", color = "green" },
|
icon = { icon = " ", color = "green" },
|
||||||
},
|
},
|
||||||
{ "[", group = "prev" },
|
{ "[", group = "prev" },
|
||||||
{ "]", group = "next" },
|
{ "]", group = "next" },
|
||||||
{ "g", group = "goto" },
|
{ "g", group = "goto" },
|
||||||
{ s.prefix, group = "surround" },
|
{ k.minisurround_prefix, group = "surround" },
|
||||||
{ "z", group = "fold" },
|
{ "z", group = "fold" },
|
||||||
k.which_key.group.buffer == "" and {} or {
|
k.buffer_prefix == "" and {} or {
|
||||||
k.which_key.group.buffer,
|
k.buffer_prefix,
|
||||||
group = "buffer",
|
group = "buffer",
|
||||||
expand = function()
|
expand = function()
|
||||||
return require("which-key.extras").expand.buf()
|
return require("which-key.extras").expand.buf()
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
k.which_key.group.windows == "" and {} or {
|
k.windows_prefix == "" and {} or {
|
||||||
k.which_key.group.windows,
|
k.windows_prefix,
|
||||||
group = "windows",
|
group = "windows",
|
||||||
proxy = "<c-w>",
|
proxy = "<c-w>",
|
||||||
expand = function()
|
expand = function()
|
||||||
|
|
@ -245,14 +244,14 @@ return {
|
||||||
},
|
},
|
||||||
keys = {
|
keys = {
|
||||||
{
|
{
|
||||||
k.which_key.buffer_keymaps,
|
k.buffer_keymaps,
|
||||||
function()
|
function()
|
||||||
require("which-key").show({ global = false })
|
require("which-key").show({ global = false })
|
||||||
end,
|
end,
|
||||||
desc = "Buffer Keymaps (which-key)",
|
desc = "Buffer Keymaps (which-key)",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
k.which_key.window_hydra_mode,
|
k.window_hydra_mode,
|
||||||
function()
|
function()
|
||||||
require("which-key").show({ keys = "<c-w>", loop = true })
|
require("which-key").show({ keys = "<c-w>", loop = true })
|
||||||
end,
|
end,
|
||||||
|
|
@ -299,33 +298,33 @@ return {
|
||||||
end
|
end
|
||||||
|
|
||||||
-- stylua: ignore start
|
-- stylua: ignore start
|
||||||
map("n", k.gitsigns.next_hunk, function()
|
map("n", k.gitsigns_next_hunk, function()
|
||||||
if vim.wo.diff then
|
if vim.wo.diff then
|
||||||
vim.cmd.normal({ "]c", bang = true })
|
vim.cmd.normal({ "]c", bang = true })
|
||||||
else
|
else
|
||||||
gs.nav_hunk("next")
|
gs.nav_hunk("next")
|
||||||
end
|
end
|
||||||
end, "Next Hunk")
|
end, "Next Hunk")
|
||||||
map("n", k.gitsigns.prev_hunk, function()
|
map("n", k.gitsigns_prev_hunk, function()
|
||||||
if vim.wo.diff then
|
if vim.wo.diff then
|
||||||
vim.cmd.normal({ "[c", bang = true })
|
vim.cmd.normal({ "[c", bang = true })
|
||||||
else
|
else
|
||||||
gs.nav_hunk("prev")
|
gs.nav_hunk("prev")
|
||||||
end
|
end
|
||||||
end, "Prev Hunk")
|
end, "Prev Hunk")
|
||||||
map("n", k.gitsigns.last_hunk, function() gs.nav_hunk("last") end, "Last Hunk")
|
map("n", k.gitsigns_last_hunk, function() gs.nav_hunk("last") end, "Last Hunk")
|
||||||
map("n", k.gitsigns.first_hunk, function() gs.nav_hunk("first") end, "First Hunk")
|
map("n", k.gitsigns_first_hunk, function() gs.nav_hunk("first") end, "First Hunk")
|
||||||
map({ "n", "v" }, k.gitsigns.stage_hunk, ":Gitsigns stage_hunk<CR>", "Stage Hunk")
|
map({ "n", "v" }, k.gitsigns_stage_hunk, ":Gitsigns stage_hunk<CR>", "Stage Hunk")
|
||||||
map({ "n", "v" }, k.gitsigns.reset_hunk, ":Gitsigns reset_hunk<CR>", "Reset Hunk")
|
map({ "n", "v" }, k.gitsigns_reset_hunk, ":Gitsigns reset_hunk<CR>", "Reset Hunk")
|
||||||
map("n", k.gitsigns.stage_buffer, gs.stage_buffer, "Stage Buffer")
|
map("n", k.gitsigns_stage_buffer, gs.stage_buffer, "Stage Buffer")
|
||||||
map("n", k.gitsigns.undo_stage_hunk, gs.undo_stage_hunk, "Undo Stage Hunk")
|
map("n", k.gitsigns_undo_stage_hunk, gs.undo_stage_hunk, "Undo Stage Hunk")
|
||||||
map("n", k.gitsigns.reset_buffer, gs.reset_buffer, "Reset Buffer")
|
map("n", k.gitsigns_reset_buffer, gs.reset_buffer, "Reset Buffer")
|
||||||
map("n", k.gitsigns.preview_hunk_inline, gs.preview_hunk_inline, "Preview Hunk Inline")
|
map("n", k.gitsigns_preview_hunk_inline, gs.preview_hunk_inline, "Preview Hunk Inline")
|
||||||
map("n", k.gitsigns.blame_line, function() gs.blame_line({ full = true }) end, "Blame Line")
|
map("n", k.gitsigns_blame_line, function() gs.blame_line({ full = true }) end, "Blame Line")
|
||||||
map("n", k.gitsigns.blame_buffer, function() gs.blame() end, "Blame Buffer")
|
map("n", k.gitsigns_blame_buffer, function() gs.blame() end, "Blame Buffer")
|
||||||
map("n", k.gitsigns.diff_index, gs.diffthis, "Diff This")
|
map("n", k.gitsigns_diff_index, gs.diffthis, "Diff This")
|
||||||
map("n", k.gitsigns.diff_commit, function() gs.diffthis("~") end, "Diff This ~")
|
map("n", k.gitsigns_diff_commit, function() gs.diffthis("~") end, "Diff This ~")
|
||||||
map({ "o", "x" }, k.gitsigns.select_hunk, ":<C-U>Gitsigns select_hunk<CR>", "GitSigns Select Hunk")
|
map({ "o", "x" }, k.gitsigns_select_hunk, ":<C-U>Gitsigns select_hunk<CR>", "GitSigns Select Hunk")
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
@ -342,18 +341,22 @@ return {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
keys = {
|
keys = {
|
||||||
{ k.trouble.diagnostics_toggle, "<cmd>Trouble diagnostics toggle<cr>", desc = "Diagnostics (Trouble)" },
|
{ k.trouble_diagnostics_toggle, "<cmd>Trouble diagnostics toggle<cr>", desc = "Diagnostics (Trouble)" },
|
||||||
{
|
{
|
||||||
k.trouble.diagnostics_buffer_toggle,
|
k.trouble_diagnostics_buffer_toggle,
|
||||||
"<cmd>Trouble diagnostics toggle filter.buf=0<cr>",
|
"<cmd>Trouble diagnostics toggle filter.buf=0<cr>",
|
||||||
desc = "Buffer Diagnostics (Trouble)",
|
desc = "Buffer Diagnostics (Trouble)",
|
||||||
},
|
},
|
||||||
{ k.trouble.symbols_toggle, "<cmd>Trouble symbols toggle<cr>", desc = "Symbols (Trouble)" },
|
{ k.trouble_symbols_toggle, "<cmd>Trouble symbols toggle<cr>", desc = "Symbols (Trouble)" },
|
||||||
{ k.trouble.lsp_toggle, "<cmd>Trouble lsp toggle<cr>", desc = "LSP references/definitions/... (Trouble)" },
|
|
||||||
{ k.trouble.loclist_toggle, "<cmd>Trouble loclist toggle<cr>", desc = "Location List (Trouble)" },
|
|
||||||
{ k.trouble.qflist_toggle, "<cmd>Trouble qflist toggle<cr>", desc = "Quickfix List (Trouble)" },
|
|
||||||
{
|
{
|
||||||
k.trouble.previous_trouble,
|
k.trouble_lsp_toggle,
|
||||||
|
"<cmd>Trouble lsp toggle<cr>",
|
||||||
|
desc = "LSP references/definitions/... (Trouble)",
|
||||||
|
},
|
||||||
|
{ k.trouble_loclist_toggle, "<cmd>Trouble loclist toggle<cr>", desc = "Location List (Trouble)" },
|
||||||
|
{ k.trouble_qflist_toggle, "<cmd>Trouble qflist toggle<cr>", desc = "Quickfix List (Trouble)" },
|
||||||
|
{
|
||||||
|
k.trouble_previous_trouble,
|
||||||
function()
|
function()
|
||||||
if require("trouble").is_open() then
|
if require("trouble").is_open() then
|
||||||
require("trouble").prev({ skip_groups = true, jump = true })
|
require("trouble").prev({ skip_groups = true, jump = true })
|
||||||
|
|
@ -367,7 +370,7 @@ return {
|
||||||
desc = "Previous Trouble/Quickfix Item",
|
desc = "Previous Trouble/Quickfix Item",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
k.trouble.next_trouble,
|
k.trouble_next_trouble,
|
||||||
function()
|
function()
|
||||||
if require("trouble").is_open() then
|
if require("trouble").is_open() then
|
||||||
require("trouble").next({ skip_groups = true, jump = true })
|
require("trouble").next({ skip_groups = true, jump = true })
|
||||||
|
|
@ -392,25 +395,25 @@ return {
|
||||||
opts = {},
|
opts = {},
|
||||||
-- stylua: ignore
|
-- stylua: ignore
|
||||||
keys = {
|
keys = {
|
||||||
{ k.todo_comments.next_todo, function() require("todo-comments").jump_next() end, desc = "Next Todo Comment" },
|
{ k.todo_next_todo, function() require("todo-comments").jump_next() end, desc = "Next Todo Comment" },
|
||||||
{ k.todo_comments.prev_todo, function() require("todo-comments").jump_prev() end, desc = "Previous Todo Comment" },
|
{ k.todo_prev_todo, function() require("todo-comments").jump_prev() end, desc = "Previous Todo Comment" },
|
||||||
{ k.todo_comments.todo_trouble, "<cmd>Trouble todo toggle<cr>", desc = "Todo (Trouble)" },
|
{ k.todo_trouble, "<cmd>Trouble todo toggle<cr>", desc = "Todo (Trouble)" },
|
||||||
{ k.todo_comments.todo_fix_fixme_trouble, "<cmd>Trouble todo toggle filter = {tag = {TODO,FIX,FIXME}}<cr>", desc = "Todo/Fix/Fixme (Trouble)" },
|
{ k.todo_fix_fixme_trouble, "<cmd>Trouble todo toggle filter = {tag = {TODO,FIX,FIXME}}<cr>", desc = "Todo/Fix/Fixme (Trouble)" },
|
||||||
{ k.todo_comments.todo_telescope, "<cmd>TodoTelescope<cr>", desc = "Todo" },
|
{ k.todo_telescope, "<cmd>TodoTelescope<cr>", desc = "Todo" },
|
||||||
{ k.todo_comments.todo_fix_fixme_telescope, "<cmd>TodoTelescope keywords=TODO,FIX,FIXME<cr>", desc = "Todo/Fix/Fixme" },
|
{ k.todo_fix_fixme_telescope, "<cmd>TodoTelescope keywords=TODO,FIX,FIXME<cr>", desc = "Todo/Fix/Fixme" },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
import = "lazyvim.plugins.extras.editor.fzf",
|
import = "lazyvim.plugins.extras.editor.fzf",
|
||||||
enabled = function()
|
enabled = function()
|
||||||
return LazyVim.pick.want() == "fzf"
|
return LazyVim.pick() == "fzf"
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
import = "lazyvim.plugins.extras.editor.telescope",
|
import = "lazyvim.plugins.extras.editor.telescope",
|
||||||
enabled = function()
|
enabled = function()
|
||||||
return LazyVim.pick.want() == "telescope"
|
return LazyVim.pick() == "telescope"
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
local M = {}
|
local M = {}
|
||||||
local k = require("lazyvim.keymaps").get_keymaps().extras.coding.copilot_chat
|
local k = require("lazyvim.keymaps").get_keymaps()
|
||||||
|
|
||||||
---@param kind string
|
---@param kind string
|
||||||
function M.pick(kind)
|
function M.pick(kind)
|
||||||
|
|
@ -38,10 +38,10 @@ return {
|
||||||
}
|
}
|
||||||
end,
|
end,
|
||||||
keys = {
|
keys = {
|
||||||
{ k.submit_prompt, "<CR>", ft = "copilot-chat", desc = "Submit Prompt", remap = true },
|
{ k.copilotchat_submit_prompt, "<CR>", ft = "copilot-chat", desc = "Submit Prompt", remap = true },
|
||||||
{ k.prefix, "", desc = "+ai", mode = { "n", "v" } },
|
{ k.copilotchat_prefix, "", desc = "+ai", mode = { "n", "v" } },
|
||||||
{
|
{
|
||||||
k.toggle,
|
k.copilotchat_toggle,
|
||||||
function()
|
function()
|
||||||
return require("CopilotChat").toggle()
|
return require("CopilotChat").toggle()
|
||||||
end,
|
end,
|
||||||
|
|
@ -49,7 +49,7 @@ return {
|
||||||
mode = { "n", "v" },
|
mode = { "n", "v" },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
k.clear,
|
k.copilotchat_clear,
|
||||||
function()
|
function()
|
||||||
return require("CopilotChat").reset()
|
return require("CopilotChat").reset()
|
||||||
end,
|
end,
|
||||||
|
|
@ -57,7 +57,7 @@ return {
|
||||||
mode = { "n", "v" },
|
mode = { "n", "v" },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
k.quick_chat,
|
k.copilotchat_quick_chat,
|
||||||
function()
|
function()
|
||||||
local input = vim.fn.input("Quick Chat: ")
|
local input = vim.fn.input("Quick Chat: ")
|
||||||
if input ~= "" then
|
if input ~= "" then
|
||||||
|
|
@ -68,9 +68,9 @@ return {
|
||||||
mode = { "n", "v" },
|
mode = { "n", "v" },
|
||||||
},
|
},
|
||||||
-- Show help actions with telescope
|
-- Show help actions with telescope
|
||||||
{ k.diagnostic_help, M.pick("help"), desc = "Diagnostic Help (CopilotChat)", mode = { "n", "v" } },
|
{ k.copilotchat_diagnostic_help, M.pick("help"), desc = "Diagnostic Help (CopilotChat)", mode = { "n", "v" } },
|
||||||
-- Show prompts actions with telescope
|
-- Show prompts actions with telescope
|
||||||
{ k.prompt_actions, M.pick("prompt"), desc = "Prompt Actions (CopilotChat)", mode = { "n", "v" } },
|
{ k.copilotchat_prompt_actionsr, M.pick("prompt"), desc = "Prompt Actions (CopilotChat)", mode = { "n", "v" } },
|
||||||
},
|
},
|
||||||
config = function(_, opts)
|
config = function(_, opts)
|
||||||
local chat = require("CopilotChat")
|
local chat = require("CopilotChat")
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
local k = require("lazyvim.keymaps").get_keymaps().extras.coding.luasnip
|
local k = require("lazyvim.keymaps").get_keymaps()
|
||||||
|
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
|
|
@ -39,14 +39,14 @@ return {
|
||||||
-- stylua: ignore
|
-- stylua: ignore
|
||||||
keys = {
|
keys = {
|
||||||
{
|
{
|
||||||
k.jump_next,
|
k.snippet_jump_next,
|
||||||
function()
|
function()
|
||||||
return require("luasnip").jumpable(1) and "<Plug>luasnip-jump-next" or "<tab>"
|
return require("luasnip").jumpable(1) and "<Plug>luasnip-jump-next" or "<tab>"
|
||||||
end,
|
end,
|
||||||
expr = true, silent = true, mode = "i",
|
expr = true, silent = true, mode = "i",
|
||||||
},
|
},
|
||||||
{ k.jump_next, function() require("luasnip").jump(1) end, mode = "s" },
|
{ k.snippet_jump_next, function() require("luasnip").jump(1) end, mode = "s" },
|
||||||
{ k.jump_prev, function() require("luasnip").jump(-1) end, mode = { "i", "s" } },
|
{ k.snippet_jump_prev, function() require("luasnip").jump(-1) end, mode = { "i", "s" } },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
-- surrounding characters like brackets or quotes, this allows you
|
-- surrounding characters like brackets or quotes, this allows you
|
||||||
-- to select the text inside, change or modify the surrounding characters,
|
-- to select the text inside, change or modify the surrounding characters,
|
||||||
-- and more.
|
-- and more.
|
||||||
local k = require("lazyvim.keymaps").get_keymaps().extras.coding.mini_surround
|
local k = require("lazyvim.keymaps").get_keymaps()
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"echasnovski/mini.surround",
|
"echasnovski/mini.surround",
|
||||||
|
|
@ -26,13 +26,13 @@ return {
|
||||||
end,
|
end,
|
||||||
opts = {
|
opts = {
|
||||||
mappings = {
|
mappings = {
|
||||||
add = k.add, -- Add surrounding in Normal and Visual modes
|
add = k.minisurround_add, -- Add surrounding in Normal and Visual modes
|
||||||
delete = k.delete, -- Delete surrounding
|
delete = k.minisurround_delete, -- Delete surrounding
|
||||||
find = k.find, -- Find surrounding (to the right)
|
find = k.minisurround_find, -- Find surrounding (to the right)
|
||||||
find_left = k.find_left, -- Find surrounding (to the left)
|
find_left = k.minisurround_find_left, -- Find surrounding (to the left)
|
||||||
highlight = k.highlight, -- Highlight surrounding
|
highlight = k.minisurround_highlight, -- Highlight surrounding
|
||||||
replace = k.replace, -- Replace surrounding
|
replace = k.minisurround_replace, -- Replace surrounding
|
||||||
update_n_lines = k.update_n_lines, -- Update `n_lines`
|
update_n_lines = k.minisurround_update_n_lines, -- Update `n_lines`
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
-- better yank/paste
|
-- better yank/paste
|
||||||
local k = require("lazyvim.keymaps").get_keymaps().extras.coding.yanky
|
local k = require("lazyvim.keymaps").get_keymaps()
|
||||||
return {
|
return {
|
||||||
"gbprod/yanky.nvim",
|
"gbprod/yanky.nvim",
|
||||||
recommended = true,
|
recommended = true,
|
||||||
|
|
@ -10,7 +10,7 @@ return {
|
||||||
},
|
},
|
||||||
keys = {
|
keys = {
|
||||||
{
|
{
|
||||||
k.yank_history,
|
k.yanky_yank_history,
|
||||||
function()
|
function()
|
||||||
if LazyVim.pick.picker.name == "telescope" then
|
if LazyVim.pick.picker.name == "telescope" then
|
||||||
require("telescope").extensions.yank_history.yank_history({})
|
require("telescope").extensions.yank_history.yank_history({})
|
||||||
|
|
@ -22,38 +22,48 @@ return {
|
||||||
desc = "Open Yank History",
|
desc = "Open Yank History",
|
||||||
},
|
},
|
||||||
-- stylua: ignore
|
-- stylua: ignore
|
||||||
{ k.yank, "<Plug>(YankyYank)", mode = { "n", "x" }, desc = "Yank Text" },
|
{ k.yanky_yank, "<Plug>(YankyYank)", mode = { "n", "x" }, desc = "Yank Text" },
|
||||||
{ k.put_text_after_cursor, "<Plug>(YankyPutAfter)", mode = { "n", "x" }, desc = "Put Text After Cursor" },
|
{ k.yanky_put_text_after_cursor, "<Plug>(YankyPutAfter)", mode = { "n", "x" }, desc = "Put Text After Cursor" },
|
||||||
{ k.put_text_before_cursor, "<Plug>(YankyPutBefore)", mode = { "n", "x" }, desc = "Put Text Before Cursor" },
|
{ k.yanky_put_text_before_cursor, "<Plug>(YankyPutBefore)", mode = { "n", "x" }, desc = "Put Text Before Cursor" },
|
||||||
{ k.put_text_after_selection, "<Plug>(YankyGPutAfter)", mode = { "n", "x" }, desc = "Put Text After Selection" },
|
|
||||||
{ k.put_text_before_selection, "<Plug>(YankyGPutBefore)", mode = { "n", "x" }, desc = "Put Text Before Selection" },
|
|
||||||
{ k.cycle_forward_yank_history, "<Plug>(YankyCycleForward)", desc = "Cycle Forward Through Yank History" },
|
|
||||||
{ k.cycle_backward_yank_history, "<Plug>(YankyCycleBackward)", desc = "Cycle Backward Through Yank History" },
|
|
||||||
{
|
{
|
||||||
k.put_indent_after_cursor_linewise,
|
k.yanky_put_text_after_selection,
|
||||||
|
"<Plug>(YankyGPutAfter)",
|
||||||
|
mode = { "n", "x" },
|
||||||
|
desc = "Put Text After Selection",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
k.yanky_put_text_before_selection,
|
||||||
|
"<Plug>(YankyGPutBefore)",
|
||||||
|
mode = { "n", "x" },
|
||||||
|
desc = "Put Text Before Selection",
|
||||||
|
},
|
||||||
|
{ k.yanky_cycle_forward_yank_history, "<Plug>(YankyCycleForward)", desc = "Cycle Forward Through Yank History" },
|
||||||
|
{ k.yanky_cycle_backward_yank_history, "<Plug>(YankyCycleBackward)", desc = "Cycle Backward Through Yank History" },
|
||||||
|
{
|
||||||
|
k.yanky_put_indent_after_cursor_linewise,
|
||||||
"<Plug>(YankyPutIndentAfterLinewise)",
|
"<Plug>(YankyPutIndentAfterLinewise)",
|
||||||
desc = "Put Indented After Cursor (Linewise)",
|
desc = "Put Indented After Cursor (Linewise)",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
k.put_indent_before_cursor_linewise,
|
k.yanky_put_indent_before_cursor_linewise,
|
||||||
"<Plug>(YankyPutIndentBeforeLinewise)",
|
"<Plug>(YankyPutIndentBeforeLinewise)",
|
||||||
desc = "Put Indented Before Cursor (Linewise)",
|
desc = "Put Indented Before Cursor (Linewise)",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
k.put_indent_after_cursor_linewise_alt,
|
k.yanky_put_indent_after_cursor_linewise_alt,
|
||||||
"<Plug>(YankyPutIndentAfterLinewise)",
|
"<Plug>(YankyPutIndentAfterLinewise)",
|
||||||
desc = "Put Indented After Cursor (Linewise)",
|
desc = "Put Indented After Cursor (Linewise)",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
k.put_indent_before_cursor_linewise_alt,
|
k.yanky_put_indent_before_cursor_linewise_alt,
|
||||||
"<Plug>(YankyPutIndentBeforeLinewise)",
|
"<Plug>(YankyPutIndentBeforeLinewise)",
|
||||||
desc = "Put Indented Before Cursor (Linewise)",
|
desc = "Put Indented Before Cursor (Linewise)",
|
||||||
},
|
},
|
||||||
{ k.put_and_indent_right, "<Plug>(YankyPutIndentAfterShiftRight)", desc = "Put and Indent Right" },
|
{ k.yanky_put_and_indent_right, "<Plug>(YankyPutIndentAfterShiftRight)", desc = "Put and Indent Right" },
|
||||||
{ k.put_and_indent_left, "<Plug>(YankyPutIndentAfterShiftLeft)", desc = "Put and Indent Left" },
|
{ k.yanky_put_and_indent_left, "<Plug>(YankyPutIndentAfterShiftLeft)", desc = "Put and Indent Left" },
|
||||||
{ k.put_before_indent_right, "<Plug>(YankyPutIndentBeforeShiftRight)", desc = "Put Before and Indent Right" },
|
{ k.yanky_put_before_indent_right, "<Plug>(YankyPutIndentBeforeShiftRight)", desc = "Put Before and Indent Right" },
|
||||||
{ k.put_before_indent_left, "<Plug>(YankyPutIndentBeforeShiftLeft)", desc = "Put Before and Indent Left" },
|
{ k.yanky_put_before_indent_left, "<Plug>(YankyPutIndentBeforeShiftLeft)", desc = "Put Before and Indent Left" },
|
||||||
{ k.put_after_filter, "<Plug>(YankyPutAfterFilter)", desc = "Put After Applying a Filter" },
|
{ k.yanky_put_after_filter, "<Plug>(YankyPutAfterFilter)", desc = "Put After Applying a Filter" },
|
||||||
{ k.put_before_filter, "<Plug>(YankyPutBeforeFilter)", desc = "Put Before Applying a Filter" },
|
{ k.yanky_put_before_filter, "<Plug>(YankyPutBeforeFilter)", desc = "Put Before Applying a Filter" },
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
local k = require("lazyvim.keymaps").get_keymaps().extras.dap.core
|
local k = require("lazyvim.keymaps").get_keymaps()
|
||||||
|
|
||||||
---@param config {args?:string[]|fun():string[]?}
|
---@param config {args?:string[]|fun():string[]?}
|
||||||
local function get_args(config)
|
local function get_args(config)
|
||||||
|
|
@ -29,24 +29,24 @@ return {
|
||||||
|
|
||||||
-- stylua: ignore
|
-- stylua: ignore
|
||||||
keys = {
|
keys = {
|
||||||
{ k.nvim_dap.prefix, "", desc = "+debug", mode = {"n", "v"} },
|
{ k.dap_prefix, "", desc = "+debug", mode = {"n", "v"} },
|
||||||
{ k.nvim_dap.breakpoint_condition, function() require("dap").set_breakpoint(vim.fn.input('Breakpoint condition: ')) end, desc = "Breakpoint Condition" },
|
{ k.dap_breakpoint_condition, function() require("dap").set_breakpoint(vim.fn.input('Breakpoint condition: ')) end, desc = "Breakpoint Condition" },
|
||||||
{ k.nvim_dap.toggle_breakpoint, function() require("dap").toggle_breakpoint() end, desc = "Toggle Breakpoint" },
|
{ k.dap_toggle_breakpoint, function() require("dap").toggle_breakpoint() end, desc = "Toggle Breakpoint" },
|
||||||
{ k.nvim_dap.continue, function() require("dap").continue() end, desc = "Continue" },
|
{ k.dap_continue, function() require("dap").continue() end, desc = "Continue" },
|
||||||
{ k.nvim_dap.run_with_args, function() require("dap").continue({ before = get_args }) end, desc = "Run with Args" },
|
{ k.dap_run_with_args, function() require("dap").continue({ before = get_args }) end, desc = "Run with Args" },
|
||||||
{ k.nvim_dap.run_to_cursor, function() require("dap").run_to_cursor() end, desc = "Run to Cursor" },
|
{ k.dap_run_to_cursor, function() require("dap").run_to_cursor() end, desc = "Run to Cursor" },
|
||||||
{ k.nvim_dap.go_to_line_no_execute, function() require("dap").goto_() end, desc = "Go to Line (No Execute)" },
|
{ k.dap_go_to_line_no_execute, function() require("dap").goto_() end, desc = "Go to Line (No Execute)" },
|
||||||
{ k.nvim_dap.step_into, function() require("dap").step_into() end, desc = "Step Into" },
|
{ k.dap_step_into, function() require("dap").step_into() end, desc = "Step Into" },
|
||||||
{ k.nvim_dap.down, function() require("dap").down() end, desc = "Down" },
|
{ k.dap_down, function() require("dap").down() end, desc = "Down" },
|
||||||
{ k.nvim_dap.up, function() require("dap").up() end, desc = "Up" },
|
{ k.dap_up, function() require("dap").up() end, desc = "Up" },
|
||||||
{ k.nvim_dap.run_last, function() require("dap").run_last() end, desc = "Run Last" },
|
{ k.dap_run_last, function() require("dap").run_last() end, desc = "Run Last" },
|
||||||
{ k.nvim_dap.step_out, function() require("dap").step_out() end, desc = "Step Out" },
|
{ k.dap_step_out, function() require("dap").step_out() end, desc = "Step Out" },
|
||||||
{ k.nvim_dap.step_over, function() require("dap").step_over() end, desc = "Step Over" },
|
{ k.dap_step_over, function() require("dap").step_over() end, desc = "Step Over" },
|
||||||
{ k.nvim_dap.pause, function() require("dap").pause() end, desc = "Pause" },
|
{ k.dap_pause, function() require("dap").pause() end, desc = "Pause" },
|
||||||
{ k.nvim_dap.toggle_repl, function() require("dap").repl.toggle() end, desc = "Toggle REPL" },
|
{ k.dap_toggle_repl, function() require("dap").repl.toggle() end, desc = "Toggle REPL" },
|
||||||
{ k.nvim_dap.session, function() require("dap").session() end, desc = "Session" },
|
{ k.dap_session, function() require("dap").session() end, desc = "Session" },
|
||||||
{ k.nvim_dap.terminate, function() require("dap").terminate() end, desc = "Terminate" },
|
{ k.dap_terminate, function() require("dap").terminate() end, desc = "Terminate" },
|
||||||
{ k.nvim_dap.widgets, function() require("dap.ui.widgets").hover() end, desc = "Widgets" },
|
{ k.dap_widgets, function() require("dap.ui.widgets").hover() end, desc = "Widgets" },
|
||||||
},
|
},
|
||||||
|
|
||||||
config = function()
|
config = function()
|
||||||
|
|
@ -80,8 +80,8 @@ return {
|
||||||
dependencies = { "nvim-neotest/nvim-nio" },
|
dependencies = { "nvim-neotest/nvim-nio" },
|
||||||
-- stylua: ignore
|
-- stylua: ignore
|
||||||
keys = {
|
keys = {
|
||||||
{ k.nvim_dap_ui.toggle_dap_ui, function() require("dapui").toggle({ }) end, desc = "Dap UI" },
|
{ k.toggle_dap_ui, function() require("dapui").toggle({ }) end, desc = "Dap UI" },
|
||||||
{ k.nvim_dap_ui.eval_dap_ui, function() require("dapui").eval() end, desc = "Eval", mode = {"n", "v"} },
|
{ k.dap_eval_dap_ui, function() require("dapui").eval() end, desc = "Eval", mode = {"n", "v"} },
|
||||||
},
|
},
|
||||||
opts = {},
|
opts = {},
|
||||||
config = function(_, opts)
|
config = function(_, opts)
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,4 @@
|
||||||
local k = require("lazyvim.keymaps").get_keymaps().extras.editor.aerial
|
local k = require("lazyvim.keymaps").get_keymaps()
|
||||||
local p = require("lazyvim.keymaps").get_keymaps().extras.editor.picker
|
|
||||||
local t = require("lazyvim.keymaps").get_keymaps().editor.trouble
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
desc = "Aerial Symbol Browser",
|
desc = "Aerial Symbol Browser",
|
||||||
|
|
@ -47,7 +45,7 @@ return {
|
||||||
return opts
|
return opts
|
||||||
end,
|
end,
|
||||||
keys = {
|
keys = {
|
||||||
{ k.toggle, "<cmd>AerialToggle<cr>", desc = "Aerial (Symbols)" },
|
{ k.aerial_toggle, "<cmd>AerialToggle<cr>", desc = "Aerial (Symbols)" },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -55,7 +53,7 @@ return {
|
||||||
"folke/trouble.nvim",
|
"folke/trouble.nvim",
|
||||||
optional = true,
|
optional = true,
|
||||||
keys = {
|
keys = {
|
||||||
{ t.symbols_toggle, false },
|
{ k.trouble_symbols_toggle, false },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -70,7 +68,7 @@ return {
|
||||||
end,
|
end,
|
||||||
keys = {
|
keys = {
|
||||||
{
|
{
|
||||||
p.go_to_symbol,
|
k.picker_go_to_symbol,
|
||||||
"<cmd>Telescope aerial<cr>",
|
"<cmd>Telescope aerial<cr>",
|
||||||
desc = "Goto Symbol (Aerial)",
|
desc = "Goto Symbol (Aerial)",
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
local M = {}
|
local M = {}
|
||||||
local k = require("lazyvim.keymaps").get_keymaps().extras.editor.dial
|
local k = require("lazyvim.keymaps").get_keymaps()
|
||||||
|
|
||||||
---@param increment boolean
|
---@param increment boolean
|
||||||
---@param g? boolean
|
---@param g? boolean
|
||||||
|
|
@ -19,9 +19,9 @@ return {
|
||||||
-- stylua: ignore
|
-- stylua: ignore
|
||||||
keys = {
|
keys = {
|
||||||
{ k.increase, function() return M.dial(true) end, expr = true, desc = "Increment", mode = {"n", "v"} },
|
{ k.increase, function() return M.dial(true) end, expr = true, desc = "Increment", mode = {"n", "v"} },
|
||||||
{ k.decrement, function() return M.dial(false) end, expr = true, desc = "Decrement", mode = {"n", "v"} },
|
{ k.dial_decrement, function() return M.dial(false) end, expr = true, desc = "Decrement", mode = {"n", "v"} },
|
||||||
{ k.increment_g, function() return M.dial(true, true) end, expr = true, desc = "Increment", mode = {"n", "v"} },
|
{ k.dial_increment_g, function() return M.dial(true, true) end, expr = true, desc = "Increment", mode = {"n", "v"} },
|
||||||
{ k.decrement_g, function() return M.dial(false, true) end, expr = true, desc = "Decrement", mode = {"n", "v"} },
|
{ k.dial_decrement_g, function() return M.dial(false, true) end, expr = true, desc = "Decrement", mode = {"n", "v"} },
|
||||||
},
|
},
|
||||||
opts = function()
|
opts = function()
|
||||||
local augend = require("dial.augend")
|
local augend = require("dial.augend")
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,4 @@
|
||||||
local k = require("lazyvim.keymaps").get_keymaps().extras.editor.picker
|
local k = require("lazyvim.keymaps").get_keymaps()
|
||||||
local lang = require("lazyvim.keymaps").get_keymaps().extras.lang
|
|
||||||
local t = require("lazyvim.keymaps").get_keymaps().editor.todo_comments
|
|
||||||
|
|
||||||
if lazyvim_docs then
|
if lazyvim_docs then
|
||||||
-- In case you don't want to use `:LazyExtras`,
|
-- In case you don't want to use `:LazyExtras`,
|
||||||
|
|
@ -103,8 +101,8 @@ return {
|
||||||
end
|
end
|
||||||
|
|
||||||
local default_keymaps = {
|
local default_keymaps = {
|
||||||
[k.actions.find_files_no_ignore] = { actions.toggle_ignore },
|
[k.picker_find_files_no_ignore] = { actions.toggle_ignore },
|
||||||
[k.actions.find_files_with_hidden] = { actions.toggle_hidden },
|
[k.picker_find_files_with_hidden] = { actions.toggle_hidden },
|
||||||
}
|
}
|
||||||
local keymaps = {}
|
local keymaps = {}
|
||||||
|
|
||||||
|
|
@ -215,50 +213,59 @@ return {
|
||||||
{ "<c-j>", "<c-j>", ft = "fzf", mode = "t", nowait = true },
|
{ "<c-j>", "<c-j>", ft = "fzf", mode = "t", nowait = true },
|
||||||
{ "<c-k>", "<c-k>", ft = "fzf", mode = "t", nowait = true },
|
{ "<c-k>", "<c-k>", ft = "fzf", mode = "t", nowait = true },
|
||||||
{
|
{
|
||||||
k.switch_buffer,
|
k.picker_switch_buffer,
|
||||||
"<cmd>FzfLua buffers sort_mru=true sort_lastused=true<cr>",
|
"<cmd>FzfLua buffers sort_mru=true sort_lastused=true<cr>",
|
||||||
desc = "Switch Buffer",
|
desc = "Switch Buffer",
|
||||||
},
|
},
|
||||||
{ k.grep_root, LazyVim.pick("live_grep"), desc = "Grep (Root Dir)" },
|
{ k.picker_grep_root, LazyVim.pick("live_grep"), desc = "Grep (Root Dir)" },
|
||||||
{ k.command_history, "<cmd>FzfLua command_history<cr>", desc = "Command History" },
|
{ k.picker_command_history, "<cmd>FzfLua command_history<cr>", desc = "Command History" },
|
||||||
{ k.find_files_root, LazyVim.pick("files"), desc = "Find Files (Root Dir)" },
|
{ k.picker_find_files_root, LazyVim.pick("files"), desc = "Find Files (Root Dir)" },
|
||||||
-- find
|
-- find
|
||||||
{ k.find_buffers, "<cmd>FzfLua buffers sort_mru=true sort_lastused=true<cr>", desc = "Buffers" },
|
{ k.picker_find_buffers, "<cmd>FzfLua buffers sort_mru=true sort_lastused=true<cr>", desc = "Buffers" },
|
||||||
{ k.find_config_file, LazyVim.pick.config_files(), desc = "Find Config File" },
|
{ k.picker_find_config_file, LazyVim.pick.config_files(), desc = "Find Config File" },
|
||||||
{ k.find_files_root_alt, LazyVim.pick("files"), desc = "Find Files (Root Dir)" },
|
{ k.picker_find_files_root_alt, LazyVim.pick("files"), desc = "Find Files (Root Dir)" },
|
||||||
{ k.find_files_cwd, LazyVim.pick("files", { root = false }), desc = "Find Files (cwd)" },
|
{ k.picker_find_files_cwd, LazyVim.pick("files", { root = false }), desc = "Find Files (cwd)" },
|
||||||
{ k.find_git_files, "<cmd>FzfLua git_files<cr>", desc = "Find Files (git-files)" },
|
{ k.picker_find_git_files, "<cmd>FzfLua git_files<cr>", desc = "Find Files (git-files)" },
|
||||||
{ k.find_recent_files, "<cmd>FzfLua oldfiles<cr>", desc = "Recent" },
|
{ k.picker_find_recent_files, "<cmd>FzfLua oldfiles<cr>", desc = "Recent" },
|
||||||
{ k.find_recent_files_cwd, LazyVim.pick("oldfiles", { cwd = vim.uv.cwd() }), desc = "Recent (cwd)" },
|
{ k.picker_find_recent_files_cwd, LazyVim.pick("oldfiles", { cwd = vim.uv.cwd() }), desc = "Recent (cwd)" },
|
||||||
-- git
|
-- git
|
||||||
{ k.git_commits, "<cmd>FzfLua git_commits<CR>", desc = "Commits" },
|
{ k.picker_git_commits, "<cmd>FzfLua git_commits<CR>", desc = "Commits" },
|
||||||
{ k.git_status, "<cmd>FzfLua git_status<CR>", desc = "Status" },
|
{ k.picker_git_status, "<cmd>FzfLua git_status<CR>", desc = "Status" },
|
||||||
-- search
|
-- search
|
||||||
{ k.search_registers, "<cmd>FzfLua registers<cr>", desc = "Registers" },
|
{ k.picker_search_registers, "<cmd>FzfLua registers<cr>", desc = "Registers" },
|
||||||
{ k.search_autocommands, "<cmd>FzfLua autocmds<cr>", desc = "Auto Commands" },
|
{ k.picker_search_autocommands, "<cmd>FzfLua autocmds<cr>", desc = "Auto Commands" },
|
||||||
{ k.search_buffer, "<cmd>FzfLua grep_curbuf<cr>", desc = "Buffer" },
|
{ k.picker_search_buffer, "<cmd>FzfLua grep_curbuf<cr>", desc = "Buffer" },
|
||||||
{ k.search_command_history, "<cmd>FzfLua command_history<cr>", desc = "Command History" },
|
{ k.picker_search_command_history, "<cmd>FzfLua command_history<cr>", desc = "Command History" },
|
||||||
{ k.search_commands, "<cmd>FzfLua commands<cr>", desc = "Commands" },
|
{ k.picker_search_commands, "<cmd>FzfLua commands<cr>", desc = "Commands" },
|
||||||
{ k.search_document_diagnostics, "<cmd>FzfLua diagnostics_document<cr>", desc = "Document Diagnostics" },
|
{ k.picker_search_document_diagnostics, "<cmd>FzfLua diagnostics_document<cr>", desc = "Document Diagnostics" },
|
||||||
{ k.search_workspace_diagnostics, "<cmd>FzfLua diagnostics_workspace<cr>", desc = "Workspace Diagnostics" },
|
|
||||||
{ k.search_grep_root, LazyVim.pick("live_grep"), desc = "Grep (Root Dir)" },
|
|
||||||
{ k.search_grep_cwd, LazyVim.pick("live_grep", { root = false }), desc = "Grep (cwd)" },
|
|
||||||
{ k.search_help_pages, "<cmd>FzfLua help_tags<cr>", desc = "Help Pages" },
|
|
||||||
{ k.search_highlight_groups, "<cmd>FzfLua highlights<cr>", desc = "Search Highlight Groups" },
|
|
||||||
{ k.search_jumplist, "<cmd>FzfLua jumps<cr>", desc = "Jumplist" },
|
|
||||||
{ k.search_keymaps, "<cmd>FzfLua keymaps<cr>", desc = "Key Maps" },
|
|
||||||
{ k.search_loclist, "<cmd>FzfLua loclist<cr>", desc = "Location List" },
|
|
||||||
{ k.search_man_pages, "<cmd>FzfLua man_pages<cr>", desc = "Man Pages" },
|
|
||||||
{ k.search_marks, "<cmd>FzfLua marks<cr>", desc = "Jump to Mark" },
|
|
||||||
{ k.search_resume, "<cmd>FzfLua resume<cr>", desc = "Resume" },
|
|
||||||
{ k.search_quickfix, "<cmd>FzfLua quickfix<cr>", desc = "Quickfix List" },
|
|
||||||
{ k.search_word_root, LazyVim.pick("grep_cword"), desc = "Word (Root Dir)" },
|
|
||||||
{ k.search_word_cwd, LazyVim.pick("grep_cword", { root = false }), desc = "Word (cwd)" },
|
|
||||||
{ k.search_selection_root, LazyVim.pick("grep_visual"), mode = "v", desc = "Selection (Root Dir)" },
|
|
||||||
{ k.search_selection_cwd, LazyVim.pick("grep_visual", { root = false }), mode = "v", desc = "Selection (cwd)" },
|
|
||||||
{ k.colorscheme_preview, LazyVim.pick("colorschemes"), desc = "Colorscheme with Preview" },
|
|
||||||
{
|
{
|
||||||
k.go_to_symbol,
|
k.picker_search_workspace_diagnostics,
|
||||||
|
"<cmd>FzfLua diagnostics_workspace<cr>",
|
||||||
|
desc = "Workspace Diagnostics",
|
||||||
|
},
|
||||||
|
{ k.picker_search_grep_root, LazyVim.pick("live_grep"), desc = "Grep (Root Dir)" },
|
||||||
|
{ k.picker_search_grep_cwd, LazyVim.pick("live_grep", { root = false }), desc = "Grep (cwd)" },
|
||||||
|
{ k.picker_search_help_pages, "<cmd>FzfLua help_tags<cr>", desc = "Help Pages" },
|
||||||
|
{ k.picker_search_highlight_groups, "<cmd>FzfLua highlights<cr>", desc = "Search Highlight Groups" },
|
||||||
|
{ k.picker_search_jumplist, "<cmd>FzfLua jumps<cr>", desc = "Jumplist" },
|
||||||
|
{ k.picker_search_keymaps, "<cmd>FzfLua keymaps<cr>", desc = "Key Maps" },
|
||||||
|
{ k.picker_search_loclist, "<cmd>FzfLua loclist<cr>", desc = "Location List" },
|
||||||
|
{ k.picker_search_man_pages, "<cmd>FzfLua man_pages<cr>", desc = "Man Pages" },
|
||||||
|
{ k.picker_search_marks, "<cmd>FzfLua marks<cr>", desc = "Jump to Mark" },
|
||||||
|
{ k.picker_search_resume, "<cmd>FzfLua resume<cr>", desc = "Resume" },
|
||||||
|
{ k.picker_search_quickfix, "<cmd>FzfLua quickfix<cr>", desc = "Quickfix List" },
|
||||||
|
{ k.picker_search_word_root, LazyVim.pick("grep_cword"), desc = "Word (Root Dir)" },
|
||||||
|
{ k.picker_search_word_cwd, LazyVim.pick("grep_cword", { root = false }), desc = "Word (cwd)" },
|
||||||
|
{ k.picker_search_selection_root, LazyVim.pick("grep_visual"), mode = "v", desc = "Selection (Root Dir)" },
|
||||||
|
{
|
||||||
|
k.picker_search_selection_cwd,
|
||||||
|
LazyVim.pick("grep_visual", { root = false }),
|
||||||
|
mode = "v",
|
||||||
|
desc = "Selection (cwd)",
|
||||||
|
},
|
||||||
|
{ k.picker_colorscheme_preview, LazyVim.pick("colorschemes"), desc = "Colorscheme with Preview" },
|
||||||
|
{
|
||||||
|
k.picker_go_to_symbol,
|
||||||
function()
|
function()
|
||||||
require("fzf-lua").lsp_document_symbols({
|
require("fzf-lua").lsp_document_symbols({
|
||||||
regex_filter = symbols_filter,
|
regex_filter = symbols_filter,
|
||||||
|
|
@ -267,7 +274,7 @@ return {
|
||||||
desc = "Goto Symbol",
|
desc = "Goto Symbol",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
k.go_to_symbol_workspace,
|
k.picker_go_to_symbol_workspace,
|
||||||
function()
|
function()
|
||||||
require("fzf-lua").lsp_live_workspace_symbols({
|
require("fzf-lua").lsp_live_workspace_symbols({
|
||||||
regex_filter = symbols_filter,
|
regex_filter = symbols_filter,
|
||||||
|
|
@ -283,8 +290,8 @@ return {
|
||||||
optional = true,
|
optional = true,
|
||||||
-- stylua: ignore
|
-- stylua: ignore
|
||||||
keys = {
|
keys = {
|
||||||
{ t.todo_telescope, function() require("todo-comments.fzf").todo() end, desc = "Todo" },
|
{ k.todo_telescope, function() require("todo-comments.fzf").todo() end, desc = "Todo" },
|
||||||
{ t.todo_fix_fixme_telescope, function () require("todo-comments.fzf").todo({ keywords = { "TODO", "FIX", "FIXME" } }) end, desc = "Todo/Fix/Fixme" },
|
{ k.todo_fix_fixme_telescope, function () require("todo-comments.fzf").todo({ keywords = { "TODO", "FIX", "FIXME" } }) end, desc = "Todo/Fix/Fixme" },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -294,10 +301,10 @@ return {
|
||||||
local Keys = require("lazyvim.plugins.lsp.keymaps").get()
|
local Keys = require("lazyvim.plugins.lsp.keymaps").get()
|
||||||
-- stylua: ignore
|
-- stylua: ignore
|
||||||
vim.list_extend(Keys, {
|
vim.list_extend(Keys, {
|
||||||
{ lang.go_to_definition, "<cmd>FzfLua lsp_definitions jump_to_single_result=true ignore_current_line=true<cr>", desc = "Goto Definition", has = "definition" },
|
{ k.lang_go_to_definition, "<cmd>FzfLua lsp_definitions jump_to_single_result=true ignore_current_line=true<cr>", desc = "Goto Definition", has = "definition" },
|
||||||
{ lang.references, "<cmd>FzfLua lsp_references jump_to_single_result=true ignore_current_line=true<cr>", desc = "References", nowait = true },
|
{ k.lang_references, "<cmd>FzfLua lsp_references jump_to_single_result=true ignore_current_line=true<cr>", desc = "References", nowait = true },
|
||||||
{ lang.go_to_implementation, "<cmd>FzfLua lsp_implementations jump_to_single_result=true ignore_current_line=true<cr>", desc = "Goto Implementation" },
|
{ k.lang_go_to_implementation, "<cmd>FzfLua lsp_implementations jump_to_single_result=true ignore_current_line=true<cr>", desc = "Goto Implementation" },
|
||||||
{ lang.go_to_type_definition, "<cmd>FzfLua lsp_typedefs jump_to_single_result=true ignore_current_line=true<cr>", desc = "Goto T[y]pe Definition" },
|
{ k.lang_go_to_type_definition, "<cmd>FzfLua lsp_typedefs jump_to_single_result=true ignore_current_line=true<cr>", desc = "Goto T[y]pe Definition" },
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
local k = require("lazyvim.keymaps").get_keymaps().extras.editor.harpoon2
|
local k = require("lazyvim.keymaps").get_keymaps()
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"ThePrimeagen/harpoon",
|
"ThePrimeagen/harpoon",
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
-- Automatically highlights other instances of the word under your cursor.
|
-- Automatically highlights other instances of the word under your cursor.
|
||||||
-- This works with LSP, Treesitter, and regexp matching to find the other
|
-- This works with LSP, Treesitter, and regexp matching to find the other
|
||||||
-- instances.
|
-- instances.
|
||||||
local k = require("lazyvim.keymaps").get_keymaps().extras.editor.vim_illuminate
|
local k = require("lazyvim.keymaps").get_keymaps()
|
||||||
|
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
|
|
@ -23,21 +23,21 @@ return {
|
||||||
end, { desc = dir:sub(1, 1):upper() .. dir:sub(2) .. " Reference", buffer = buffer })
|
end, { desc = dir:sub(1, 1):upper() .. dir:sub(2) .. " Reference", buffer = buffer })
|
||||||
end
|
end
|
||||||
|
|
||||||
map(k.next, "next")
|
map(k.illuminate_next, "next")
|
||||||
map(k.prev, "prev")
|
map(k.illuminate_prev, "prev")
|
||||||
|
|
||||||
-- also set it after loading ftplugins, since a lot overwrite [[ and ]]
|
-- also set it after loading ftplugins, since a lot overwrite [[ and ]]
|
||||||
vim.api.nvim_create_autocmd("FileType", {
|
vim.api.nvim_create_autocmd("FileType", {
|
||||||
callback = function()
|
callback = function()
|
||||||
local buffer = vim.api.nvim_get_current_buf()
|
local buffer = vim.api.nvim_get_current_buf()
|
||||||
map(k.next, "next", buffer)
|
map(k.illuminate_next, "next", buffer)
|
||||||
map(k.prev, "prev", buffer)
|
map(k.illuminate_prev, "prev", buffer)
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
keys = {
|
keys = {
|
||||||
{ k.next, desc = "Next Reference" },
|
{ k.illuminate_next, desc = "Next Reference" },
|
||||||
{ k.prev, desc = "Prev Reference" },
|
{ k.illuminate_prev, desc = "Prev Reference" },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
local k = require("lazyvim.keymaps").get_keymaps().extras.editor.inc_rename
|
local k = require("lazyvim.keymaps").get_keymaps()
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
||||||
|
|
@ -17,7 +17,7 @@ return {
|
||||||
opts = function()
|
opts = function()
|
||||||
local keys = require("lazyvim.plugins.lsp.keymaps").get()
|
local keys = require("lazyvim.plugins.lsp.keymaps").get()
|
||||||
keys[#keys + 1] = {
|
keys[#keys + 1] = {
|
||||||
k.rename,
|
k.increname_rename,
|
||||||
function()
|
function()
|
||||||
local inc_rename = require("inc_rename")
|
local inc_rename = require("inc_rename")
|
||||||
return ":" .. inc_rename.config.cmd_name .. " " .. vim.fn.expand("<cword>")
|
return ":" .. inc_rename.config.cmd_name .. " " .. vim.fn.expand("<cword>")
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
local k = require("lazyvim.keymaps").get_keymaps().extras.editor.leap
|
local k = require("lazyvim.keymaps").get_keymaps()
|
||||||
local m = require("lazyvim.keymaps").get_keymaps().extras.coding.mini_surround
|
local default = require("lazyvim.keymaps").default_keymaps
|
||||||
local default = require("lazyvim.keymaps").default_keymaps.extras.coding.mini_surround
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
-- disable flash
|
-- disable flash
|
||||||
|
|
@ -24,9 +23,9 @@ return {
|
||||||
"ggandor/leap.nvim",
|
"ggandor/leap.nvim",
|
||||||
enabled = true,
|
enabled = true,
|
||||||
keys = {
|
keys = {
|
||||||
{ k.next, mode = { "n", "x", "o" }, desc = "Leap Forward to" },
|
{ k.leap_next, mode = { "n", "x", "o" }, desc = "Leap Forward to" },
|
||||||
{ k.prev, mode = { "n", "x", "o" }, desc = "Leap Backward to" },
|
{ k.leap_prev, mode = { "n", "x", "o" }, desc = "Leap Backward to" },
|
||||||
{ k.from_windows, mode = { "n", "x", "o" }, desc = "Leap from Windows" },
|
{ k.leap_from_windows, mode = { "n", "x", "o" }, desc = "Leap from Windows" },
|
||||||
},
|
},
|
||||||
config = function(_, opts)
|
config = function(_, opts)
|
||||||
local leap = require("leap")
|
local leap = require("leap")
|
||||||
|
|
@ -45,17 +44,22 @@ return {
|
||||||
optional = true,
|
optional = true,
|
||||||
opts = {
|
opts = {
|
||||||
mappings = {
|
mappings = {
|
||||||
add = m.add == default.add and "gza" or m.add, -- Add surrounding in Normal and Visual modes
|
add = k.minisurround_add == default.minisurround_add and "gza" or k.minisurround_add, -- Add surrounding in Normal and Visual modes
|
||||||
delete = m.delete == default.delete and "gzd" or m.delete, -- Delete surrounding
|
delete = k.minisurround_delete == default.minisurround_delete and "gzd" or k.minisurround_delete, -- Delete surrounding
|
||||||
find = m.find == default.find and "gzf" or m.find, -- Find surrounding (to the right)
|
find = k.minisurround_find == default.minisurround_find and "gzf" or k.minisurround_find, -- Find surrounding (to the right)
|
||||||
find_left = m.find_left == default.find_left and "gzF" or m.find_left, -- Find surrounding (to the left)
|
find_left = k.minisurround_find_left == default.minisurround_find_left and "gzF" or k.minisurround_find_left, -- Find surrounding (to the left)
|
||||||
highlight = m.highlight == default.highlight and "gzh" or m.highlight, -- Highlight surrounding
|
highlight = k.minisurround_highlight == default.minisurround_highlight and "gzh" or k.minisurround_highlight, -- Highlight surrounding
|
||||||
replace = m.replace == default.replace and "gzr" or m.replace, -- Replace surrounding
|
replace = k.minisurround_replace == default.minisurround_replace and "gzr" or k.minisurround_replace, -- Replace surrounding
|
||||||
update_n_lines = m.update_n_lines == default.update_n_lines and "gzn" or m.update_n_lines, -- Update `n_lines`
|
update_n_lines = k.minisurround_update_n_lines == default.minisurround_update_n_lines and "gzn"
|
||||||
|
or k.minisurround_update_n_lines, -- Update `n_lines`
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
keys = {
|
keys = {
|
||||||
{ m.prefix == default.prefix and "gz" or m.prefix, "", desc = "+surround" },
|
{
|
||||||
|
k.minisurround_prefix == default.minisurround_prefix and "gz" or k.minisurround_prefix,
|
||||||
|
"",
|
||||||
|
desc = "+surround",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
local k = require("lazyvim.keymaps").get_keymaps().extras.editor.mini_diff
|
local k = require("lazyvim.keymaps").get_keymaps()
|
||||||
|
|
||||||
return {
|
return {
|
||||||
-- disable gitsigns.nvim
|
-- disable gitsigns.nvim
|
||||||
|
|
@ -13,7 +13,7 @@ return {
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
keys = {
|
keys = {
|
||||||
{
|
{
|
||||||
k.toggle_overlay,
|
k.minidiff_toggle_overlay,
|
||||||
function()
|
function()
|
||||||
require("mini.diff").toggle_overlay(0)
|
require("mini.diff").toggle_overlay(0)
|
||||||
end,
|
end,
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
local map = LazyVim.keymap_set
|
local map = LazyVim.keymap_set
|
||||||
local k = require("lazyvim.keymaps").get_keymaps().extras.editor.mini_files
|
local k = require("lazyvim.keymaps").get_keymaps()
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"echasnovski/mini.files",
|
"echasnovski/mini.files",
|
||||||
|
|
@ -17,14 +17,14 @@ return {
|
||||||
},
|
},
|
||||||
keys = {
|
keys = {
|
||||||
{
|
{
|
||||||
k.open_current_file_dir,
|
k.minifiles_open_current_file_dir,
|
||||||
function()
|
function()
|
||||||
require("mini.files").open(vim.api.nvim_buf_get_name(0), true)
|
require("mini.files").open(vim.api.nvim_buf_get_name(0), true)
|
||||||
end,
|
end,
|
||||||
desc = "Open mini.files (Directory of Current File)",
|
desc = "Open mini.files (Directory of Current File)",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
k.open_cwd,
|
k.minifiles_open_cwd,
|
||||||
function()
|
function()
|
||||||
require("mini.files").open(vim.uv.cwd(), true)
|
require("mini.files").open(vim.uv.cwd(), true)
|
||||||
end,
|
end,
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
local k = require("lazyvim.keymaps").get_keymaps().editor.trouble
|
local k = require("lazyvim.keymaps").get_keymaps()
|
||||||
local o = require("lazyvim.keymaps").get_keymaps().extras.editor.outline
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
-- Disable `<leader>cs` keymap so it doesn't conflict with `outline.nvim`
|
-- Disable `<leader>cs` keymap so it doesn't conflict with `outline.nvim`
|
||||||
|
|
@ -7,12 +6,12 @@ return {
|
||||||
"folke/trouble.nvim",
|
"folke/trouble.nvim",
|
||||||
optional = true,
|
optional = true,
|
||||||
keys = {
|
keys = {
|
||||||
{ k.symbols_toggle, false },
|
{ k.trouble_symbols_toggle, false },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"hedyhli/outline.nvim",
|
"hedyhli/outline.nvim",
|
||||||
keys = { { k.symbols_toggle, "<cmd>Outline<cr>", desc = "Toggle Outline" } },
|
keys = { { k.trouble_symbols_toggle, "<cmd>Outline<cr>", desc = "Toggle Outline" } },
|
||||||
cmd = "Outline",
|
cmd = "Outline",
|
||||||
opts = function()
|
opts = function()
|
||||||
local defaults = require("outline.config").defaults
|
local defaults = require("outline.config").defaults
|
||||||
|
|
@ -25,8 +24,8 @@ return {
|
||||||
}
|
}
|
||||||
|
|
||||||
local keymaps = {
|
local keymaps = {
|
||||||
up_and_jump = o.up_and_jump,
|
up_and_jump = k.outline_up_and_jump,
|
||||||
down_and_jump = o.down_and_jump,
|
down_and_jump = k.outline_down_and_jump,
|
||||||
}
|
}
|
||||||
for key, value in pairs(keymaps) do
|
for key, value in pairs(keymaps) do
|
||||||
if value and value ~= "" then
|
if value and value ~= "" then
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
local k = require("lazyvim.keymaps").get_keymaps().extras.editor.overseer
|
local k = require("lazyvim.keymaps").get_keymaps()
|
||||||
|
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
|
|
@ -53,13 +53,13 @@ return {
|
||||||
},
|
},
|
||||||
-- stylua: ignore
|
-- stylua: ignore
|
||||||
keys = {
|
keys = {
|
||||||
{ k.toggle, "<cmd>OverseerToggle<cr>", desc = "Task list" },
|
{ k.overseer_toggle, "<cmd>OverseerToggle<cr>", desc = "Task list" },
|
||||||
{ k.run, "<cmd>OverseerRun<cr>", desc = "Run task" },
|
{ k.overseer_run, "<cmd>OverseerRun<cr>", desc = "Run task" },
|
||||||
{ k.quick_action, "<cmd>OverseerQuickAction<cr>", desc = "Action recent task" },
|
{ k.overseer_quick_action, "<cmd>OverseerQuickAction<cr>", desc = "Action recent task" },
|
||||||
{ k.info, "<cmd>OverseerInfo<cr>", desc = "Overseer Info" },
|
{ k.overseer_info, "<cmd>OverseerInfo<cr>", desc = "Overseer Info" },
|
||||||
{ k.build, "<cmd>OverseerBuild<cr>", desc = "Task builder" },
|
{ k.overseer_build, "<cmd>OverseerBuild<cr>", desc = "Task builder" },
|
||||||
{ k.task_action, "<cmd>OverseerTaskAction<cr>", desc = "Task action" },
|
{ k.overseer_task_action, "<cmd>OverseerTaskAction<cr>", desc = "Task action" },
|
||||||
{ k.clear_cache, "<cmd>OverseerClearCache<cr>", desc = "Clear cache" },
|
{ k.overseer_clear_cache, "<cmd>OverseerClearCache<cr>", desc = "Clear cache" },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -67,7 +67,7 @@ return {
|
||||||
optional = true,
|
optional = true,
|
||||||
opts = {
|
opts = {
|
||||||
spec = {
|
spec = {
|
||||||
k.prefix == "" and {} or { k.prefix, group = "overseer" },
|
k.overseer_prefix == "" and {} or { k.overseer_prefix, group = "overseer" },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
local k = require("lazyvim.keymaps").get_keymaps().extras.editor.refactoring
|
local k = require("lazyvim.keymaps").get_keymaps()
|
||||||
|
|
||||||
local pick = function()
|
local pick = function()
|
||||||
if LazyVim.pick.picker.name == "telescope" then
|
if LazyVim.pick.picker.name == "telescope" then
|
||||||
|
|
@ -30,15 +30,15 @@ return {
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
},
|
},
|
||||||
keys = {
|
keys = {
|
||||||
{ k.prefix, "", desc = "+refactor", mode = { "n", "v" } },
|
{ k.refactoring_prefix, "", desc = "+refactor", mode = { "n", "v" } },
|
||||||
{
|
{
|
||||||
k.refactor,
|
k.refactoring_refactor,
|
||||||
pick,
|
pick,
|
||||||
mode = "v",
|
mode = "v",
|
||||||
desc = "Refactor",
|
desc = "Refactor",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
k.inline_variable,
|
k.refactoring_inline_variable,
|
||||||
function()
|
function()
|
||||||
require("refactoring").refactor("Inline Variable")
|
require("refactoring").refactor("Inline Variable")
|
||||||
end,
|
end,
|
||||||
|
|
@ -46,42 +46,42 @@ return {
|
||||||
desc = "Inline Variable",
|
desc = "Inline Variable",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
k.extract_block,
|
k.refactoring_extract_block,
|
||||||
function()
|
function()
|
||||||
require("refactoring").refactor("Extract Block")
|
require("refactoring").refactor("Extract Block")
|
||||||
end,
|
end,
|
||||||
desc = "Extract Block",
|
desc = "Extract Block",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
k.extract_block_to_file,
|
k.refactoring_extract_block_to_file,
|
||||||
function()
|
function()
|
||||||
require("refactoring").refactor("Extract Block To File")
|
require("refactoring").refactor("Extract Block To File")
|
||||||
end,
|
end,
|
||||||
desc = "Extract Block To File",
|
desc = "Extract Block To File",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
k.debug_print,
|
k.refactoring_debug_print,
|
||||||
function()
|
function()
|
||||||
require("refactoring").debug.printf({ below = false })
|
require("refactoring").debug.printf({ below = false })
|
||||||
end,
|
end,
|
||||||
desc = "Debug Print",
|
desc = "Debug Print",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
k.debug_print_variable,
|
k.refactoring_debug_print_variable,
|
||||||
function()
|
function()
|
||||||
require("refactoring").debug.print_var({ normal = true })
|
require("refactoring").debug.print_var({ normal = true })
|
||||||
end,
|
end,
|
||||||
desc = "Debug Print Variable",
|
desc = "Debug Print Variable",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
k.debug_cleanup,
|
k.refactoring_debug_cleanup,
|
||||||
function()
|
function()
|
||||||
require("refactoring").debug.cleanup({})
|
require("refactoring").debug.cleanup({})
|
||||||
end,
|
end,
|
||||||
desc = "Debug Cleanup",
|
desc = "Debug Cleanup",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
k.extract_function,
|
k.refactoring_extract_function,
|
||||||
function()
|
function()
|
||||||
require("refactoring").refactor("Extract Function")
|
require("refactoring").refactor("Extract Function")
|
||||||
end,
|
end,
|
||||||
|
|
@ -89,7 +89,7 @@ return {
|
||||||
desc = "Extract Function",
|
desc = "Extract Function",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
k.extract_function_to_file,
|
k.refactoring_extract_function_to_file,
|
||||||
function()
|
function()
|
||||||
require("refactoring").refactor("Extract Function To File")
|
require("refactoring").refactor("Extract Function To File")
|
||||||
end,
|
end,
|
||||||
|
|
@ -97,7 +97,7 @@ return {
|
||||||
desc = "Extract Function To File",
|
desc = "Extract Function To File",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
k.extract_variable,
|
k.refactoring_extract_variable,
|
||||||
function()
|
function()
|
||||||
require("refactoring").refactor("Extract Variable")
|
require("refactoring").refactor("Extract Variable")
|
||||||
end,
|
end,
|
||||||
|
|
@ -105,7 +105,7 @@ return {
|
||||||
desc = "Extract Variable",
|
desc = "Extract Variable",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
k.debug_print_variable,
|
k.refactoring_debug_print_variable,
|
||||||
function()
|
function()
|
||||||
require("refactoring").debug.print_var()
|
require("refactoring").debug.print_var()
|
||||||
end,
|
end,
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,4 @@
|
||||||
local extras = require("lazyvim.keymaps").get_keymaps().extras
|
local k = require("lazyvim.keymaps").get_keymaps()
|
||||||
local k = extras.editor.picker
|
|
||||||
local lang = extras.lang
|
|
||||||
|
|
||||||
if lazyvim_docs then
|
if lazyvim_docs then
|
||||||
-- In case you don't want to use `:LazyExtras`,
|
-- In case you don't want to use `:LazyExtras`,
|
||||||
|
|
@ -90,55 +88,64 @@ return {
|
||||||
},
|
},
|
||||||
keys = {
|
keys = {
|
||||||
{
|
{
|
||||||
k.switch_buffer,
|
k.picker_switch_buffer,
|
||||||
"<cmd>Telescope buffers sort_mru=true sort_lastused=true<cr>",
|
"<cmd>Telescope buffers sort_mru=true sort_lastused=true<cr>",
|
||||||
desc = "Switch Buffer",
|
desc = "Switch Buffer",
|
||||||
},
|
},
|
||||||
{ k.grep_root, LazyVim.pick("live_grep"), desc = "Grep (Root Dir)" },
|
{ k.picker_grep_root, LazyVim.pick("live_grep"), desc = "Grep (Root Dir)" },
|
||||||
{ k.command_history, "<cmd>Telescope command_history<cr>", desc = "Command History" },
|
{ k.picker_command_history, "<cmd>Telescope command_history<cr>", desc = "Command History" },
|
||||||
{ k.find_files_root, LazyVim.pick("files"), desc = "Find Files (Root Dir)" },
|
{ k.picker_find_files_root, LazyVim.pick("files"), desc = "Find Files (Root Dir)" },
|
||||||
-- find
|
-- find
|
||||||
{ k.find_buffers, "<cmd>Telescope buffers sort_mru=true sort_lastused=true<cr>", desc = "Buffers" },
|
{ k.picker_find_buffers, "<cmd>Telescope buffers sort_mru=true sort_lastused=true<cr>", desc = "Buffers" },
|
||||||
{ k.find_config_file, LazyVim.pick.config_files(), desc = "Find Config File" },
|
{ k.picker_find_config_file, LazyVim.pick.config_files(), desc = "Find Config File" },
|
||||||
{ k.find_files_root_alt, LazyVim.pick("files"), desc = "Find Files (Root Dir)" },
|
{ k.picker_find_files_root_alt, LazyVim.pick("files"), desc = "Find Files (Root Dir)" },
|
||||||
{ k.find_files_cwd, LazyVim.pick("files", { root = false }), desc = "Find Files (cwd)" },
|
{ k.picker_find_files_cwd, LazyVim.pick("files", { root = false }), desc = "Find Files (cwd)" },
|
||||||
{ k.find_git_files, "<cmd>Telescope git_files<cr>", desc = "Find Files (git-files)" },
|
{ k.picker_find_git_files, "<cmd>Telescope git_files<cr>", desc = "Find Files (git-files)" },
|
||||||
{ k.find_recent_files, "<cmd>Telescope oldfiles<cr>", desc = "Recent" },
|
{ k.picker_find_recent_files, "<cmd>Telescope oldfiles<cr>", desc = "Recent" },
|
||||||
{ k.find_files_cwd, LazyVim.pick("oldfiles", { cwd = vim.uv.cwd() }), desc = "Recent (cwd)" },
|
{ k.picker_find_files_cwd, LazyVim.pick("oldfiles", { cwd = vim.uv.cwd() }), desc = "Recent (cwd)" },
|
||||||
-- git
|
-- git
|
||||||
{ k.git_commits, "<cmd>Telescope git_commits<CR>", desc = "Commits" },
|
{ k.picker_git_commits, "<cmd>Telescope git_commits<CR>", desc = "Commits" },
|
||||||
{ k.git_status, "<cmd>Telescope git_status<CR>", desc = "Status" },
|
{ k.picker_git_status, "<cmd>Telescope git_status<CR>", desc = "Status" },
|
||||||
-- search
|
-- search
|
||||||
{ k.search_registers, "<cmd>Telescope registers<cr>", desc = "Registers" },
|
{ k.picker_search_registers, "<cmd>Telescope registers<cr>", desc = "Registers" },
|
||||||
{ k.search_autocommands, "<cmd>Telescope autocommands<cr>", desc = "Auto Commands" },
|
{ k.picker_search_autocommands, "<cmd>Telescope autocommands<cr>", desc = "Auto Commands" },
|
||||||
{ k.search_buffer, "<cmd>Telescope current_buffer_fuzzy_find<cr>", desc = "Buffer" },
|
{ k.picker_search_buffer, "<cmd>Telescope current_buffer_fuzzy_find<cr>", desc = "Buffer" },
|
||||||
{ k.search_command_history, "<cmd>Telescope command_history<cr>", desc = "Command History" },
|
{ k.picker_search_command_history, "<cmd>Telescope command_history<cr>", desc = "Command History" },
|
||||||
{ k.search_commands, "<cmd>Telescope commands<cr>", desc = "Commands" },
|
{ k.picker_search_commands, "<cmd>Telescope commands<cr>", desc = "Commands" },
|
||||||
{ k.search_document_diagnostics, "<cmd>Telescope diagnostics bufnr=0<cr>", desc = "Document Diagnostics" },
|
{ k.picker_search_document_diagnostics, "<cmd>Telescope diagnostics bufnr=0<cr>", desc = "Document Diagnostics" },
|
||||||
{ k.search_workspace_diagnostics, "<cmd>Telescope diagnostics<cr>", desc = "Workspace Diagnostics" },
|
{ k.picker_search_workspace_diagnostics, "<cmd>Telescope diagnostics<cr>", desc = "Workspace Diagnostics" },
|
||||||
{ k.search_grep_root, LazyVim.pick("live_grep"), desc = "Grep (Root Dir)" },
|
{ k.picker_search_grep_root, LazyVim.pick("live_grep"), desc = "Grep (Root Dir)" },
|
||||||
{ k.search_grep_cwd, LazyVim.pick("live_grep", { root = false }), desc = "Grep (cwd)" },
|
{ k.picker_search_grep_cwd, LazyVim.pick("live_grep", { root = false }), desc = "Grep (cwd)" },
|
||||||
{ k.search_help_pages, "<cmd>Telescope help_tags<cr>", desc = "Help Pages" },
|
{ k.picker_search_help_pages, "<cmd>Telescope help_tags<cr>", desc = "Help Pages" },
|
||||||
{ k.search_highlight_groups, "<cmd>Telescope highlights<cr>", desc = "Search Highlight Groups" },
|
{ k.picker_search_highlight_groups, "<cmd>Telescope highlights<cr>", desc = "Search Highlight Groups" },
|
||||||
{ k.search_jumplist, "<cmd>Telescope jumplist<cr>", desc = "Jumplist" },
|
{ k.picker_search_jumplist, "<cmd>Telescope jumplist<cr>", desc = "Jumplist" },
|
||||||
{ k.search_keymaps, "<cmd>Telescope keymaps<cr>", desc = "Key Maps" },
|
{ k.picker_search_keymaps, "<cmd>Telescope keymaps<cr>", desc = "Key Maps" },
|
||||||
{ k.search_loclist, "<cmd>Telescope loclist<cr>", desc = "Location List" },
|
{ k.picker_search_loclist, "<cmd>Telescope loclist<cr>", desc = "Location List" },
|
||||||
{ k.search_man_pages, "<cmd>Telescope man_pages<cr>", desc = "Man Pages" },
|
{ k.picker_search_man_pages, "<cmd>Telescope man_pages<cr>", desc = "Man Pages" },
|
||||||
{ k.search_marks, "<cmd>Telescope marks<cr>", desc = "Jump to Mark" },
|
{ k.picker_search_marks, "<cmd>Telescope marks<cr>", desc = "Jump to Mark" },
|
||||||
{ k.search_options, "<cmd>Telescope vim_options<cr>", desc = "Options" },
|
{ k.picker_search_options, "<cmd>Telescope vim_options<cr>", desc = "Options" },
|
||||||
{ k.search_resume, "<cmd>Telescope resume<cr>", desc = "Resume" },
|
{ k.picker_search_resume, "<cmd>Telescope resume<cr>", desc = "Resume" },
|
||||||
{ k.search_quickfix, "<cmd>Telescope quickfix<cr>", desc = "Quickfix List" },
|
{ k.picker_search_quickfix, "<cmd>Telescope quickfix<cr>", desc = "Quickfix List" },
|
||||||
{ k.search_word_root, LazyVim.pick("grep_string", { word_match = "-w" }), desc = "Word (Root Dir)" },
|
{ k.picker_search_word_root, LazyVim.pick("grep_string", { word_match = "-w" }), desc = "Word (Root Dir)" },
|
||||||
{ k.search_word_cwd, LazyVim.pick("grep_string", { root = false, word_match = "-w" }), desc = "Word (cwd)" },
|
|
||||||
{ k.search_selection_root, LazyVim.pick("grep_string"), mode = "v", desc = "Selection (Root Dir)" },
|
|
||||||
{ k.search_selection_cwd, LazyVim.pick("grep_string", { root = false }), mode = "v", desc = "Selection (cwd)" },
|
|
||||||
{
|
{
|
||||||
k.colorscheme_preview,
|
k.picker_search_word_cwd,
|
||||||
|
LazyVim.pick("grep_string", { root = false, word_match = "-w" }),
|
||||||
|
desc = "Word (cwd)",
|
||||||
|
},
|
||||||
|
{ k.picker_search_selection_root, LazyVim.pick("grep_string"), mode = "v", desc = "Selection (Root Dir)" },
|
||||||
|
{
|
||||||
|
k.picker_search_selection_cwd,
|
||||||
|
LazyVim.pick("grep_string", { root = false }),
|
||||||
|
mode = "v",
|
||||||
|
desc = "Selection (cwd)",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
k.picker_colorscheme_preview,
|
||||||
LazyVim.pick("colorscheme", { enable_preview = true }),
|
LazyVim.pick("colorscheme", { enable_preview = true }),
|
||||||
desc = "Colorscheme with Preview",
|
desc = "Colorscheme with Preview",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
k.go_to_symbol,
|
k.picker_go_to_symbol,
|
||||||
function()
|
function()
|
||||||
require("telescope.builtin").lsp_document_symbols({
|
require("telescope.builtin").lsp_document_symbols({
|
||||||
symbols = LazyVim.config.get_kind_filter(),
|
symbols = LazyVim.config.get_kind_filter(),
|
||||||
|
|
@ -147,7 +154,7 @@ return {
|
||||||
desc = "Goto Symbol",
|
desc = "Goto Symbol",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
k.go_to_symbol_workspace,
|
k.picker_go_to_symbol_workspace,
|
||||||
function()
|
function()
|
||||||
require("telescope.builtin").lsp_dynamic_workspace_symbols({
|
require("telescope.builtin").lsp_dynamic_workspace_symbols({
|
||||||
symbols = LazyVim.config.get_kind_filter(),
|
symbols = LazyVim.config.get_kind_filter(),
|
||||||
|
|
@ -189,17 +196,17 @@ return {
|
||||||
|
|
||||||
local keymaps = {
|
local keymaps = {
|
||||||
i = {
|
i = {
|
||||||
{ k.actions.open_with_trouble, open_with_trouble },
|
{ k.picker_open_with_trouble, open_with_trouble },
|
||||||
{ k.actions.open_with_trouble_alt, open_with_trouble },
|
{ k.picker_open_with_trouble_alt, open_with_trouble },
|
||||||
{ k.actions.find_files_no_ignore, find_files_no_ignore },
|
{ k.picker_find_files_no_ignore, find_files_no_ignore },
|
||||||
{ k.actions.find_files_with_hidden, find_files_with_hidden },
|
{ k.picker_find_files_with_hidden, find_files_with_hidden },
|
||||||
{ k.actions.cycle_history_next, actions.cycle_history_next },
|
{ k.picker_cycle_history_next, actions.cycle_history_next },
|
||||||
{ k.actions.cycle_history_prev, actions.cycle_history_prev },
|
{ k.picker_cycle_history_prev, actions.cycle_history_prev },
|
||||||
{ k.actions.preview_scrolling_down, actions.preview_scrolling_down },
|
{ k.picker_preview_scrolling_down, actions.preview_scrolling_down },
|
||||||
{ k.actions.preview_scrolling_up, actions.preview_scrolling_up },
|
{ k.picker_preview_scrolling_up, actions.preview_scrolling_up },
|
||||||
},
|
},
|
||||||
n = {
|
n = {
|
||||||
{ k.actions.close, actions.close },
|
{ k.picker_close, actions.close },
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
local mappings = {
|
local mappings = {
|
||||||
|
|
@ -273,8 +280,8 @@ return {
|
||||||
end
|
end
|
||||||
opts.defaults = vim.tbl_deep_extend("force", opts.defaults or {}, {
|
opts.defaults = vim.tbl_deep_extend("force", opts.defaults or {}, {
|
||||||
mappings = {
|
mappings = {
|
||||||
n = k.flash.normal == "" and {} or { [k.flash.normal] = flash },
|
n = k.flash_normal == "" and {} or { [k.flash_normal] = flash },
|
||||||
i = k.flash.insert == "" and {} or { [k.flash.insert] = flash },
|
i = k.flash_insert == "" and {} or { [k.flash_insert] = flash },
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
|
|
@ -310,10 +317,10 @@ return {
|
||||||
local Keys = require("lazyvim.plugins.lsp.keymaps").get()
|
local Keys = require("lazyvim.plugins.lsp.keymaps").get()
|
||||||
-- stylua: ignore
|
-- stylua: ignore
|
||||||
vim.list_extend(Keys, {
|
vim.list_extend(Keys, {
|
||||||
{ lang.go_to_definition, function() require("telescope.builtin").lsp_definitions({ reuse_win = true }) end, desc = "Goto Definition", has = "definition" },
|
{ k.lang_go_to_definition, function() require("telescope.builtin").lsp_definitions({ reuse_win = true }) end, desc = "Goto Definition", has = "definition" },
|
||||||
{ lang.references, "<cmd>Telescope lsp_references<cr>", desc = "References", nowait = true },
|
{ k.lang_references, "<cmd>Telescope lsp_references<cr>", desc = "References", nowait = true },
|
||||||
{ lang.go_to_implementation, function() require("telescope.builtin").lsp_implementations({ reuse_win = true }) end, desc = "Goto Implementation" },
|
{ k.lang_go_to_implementation, function() require("telescope.builtin").lsp_implementations({ reuse_win = true }) end, desc = "Goto Implementation" },
|
||||||
{ lang.go_to_type_definition, function() require("telescope.builtin").lsp_type_definitions({ reuse_win = true }) end, desc = "Goto T[y]pe Definition" },
|
{ k.lang_go_to_type_definition, function() require("telescope.builtin").lsp_type_definitions({ reuse_win = true }) end, desc = "Goto T[y]pe Definition" },
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
local k = require("lazyvim.keymaps").get_keymaps().extras.lang.ansible
|
local k = require("lazyvim.keymaps").get_keymaps()
|
||||||
|
|
||||||
return {
|
return {
|
||||||
recommended = function()
|
recommended = function()
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
local k = require("lazyvim.keymaps").get_keymaps().extras.lang.clangd
|
local k = require("lazyvim.keymaps").get_keymaps()
|
||||||
return {
|
return {
|
||||||
recommended = function()
|
recommended = function()
|
||||||
return LazyVim.extras.wants({
|
return LazyVim.extras.wants({
|
||||||
|
|
@ -59,8 +59,11 @@ return {
|
||||||
-- Ensure mason installs the server
|
-- Ensure mason installs the server
|
||||||
clangd = {
|
clangd = {
|
||||||
keys = {
|
keys = {
|
||||||
k.switch_source_header == "" and {}
|
k.clangd_switch_source_header == "" and {} or {
|
||||||
or { k.switch_source_header, "<cmd>ClangdSwitchSourceHeader<cr>", desc = "Switch Source/Header (C/C++)" },
|
k.clangd_switch_source_header,
|
||||||
|
"<cmd>ClangdSwitchSourceHeader<cr>",
|
||||||
|
desc = "Switch Source/Header (C/C++)",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
root_dir = function(fname)
|
root_dir = function(fname)
|
||||||
return require("lspconfig.util").root_pattern(
|
return require("lspconfig.util").root_pattern(
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
local map = LazyVim.keymap_set
|
local map = LazyVim.keymap_set
|
||||||
local k = require("lazyvim.keymaps").get_keymaps().extras.lang.clojure
|
local k = require("lazyvim.keymaps").get_keymaps()
|
||||||
|
|
||||||
return {
|
return {
|
||||||
recommended = function()
|
recommended = function()
|
||||||
|
|
@ -80,13 +80,13 @@ return {
|
||||||
|
|
||||||
map(
|
map(
|
||||||
{ "n", "v" },
|
{ "n", "v" },
|
||||||
k.jump_prev_evaluation_output,
|
k.clojure_jump_prev_evaluation_output,
|
||||||
"<CMD>call search('^; -\\+$', 'bw')<CR>",
|
"<CMD>call search('^; -\\+$', 'bw')<CR>",
|
||||||
{ silent = true, buffer = true, desc = "Jumps to the beginning of previous evaluation output." }
|
{ silent = true, buffer = true, desc = "Jumps to the beginning of previous evaluation output." }
|
||||||
)
|
)
|
||||||
map(
|
map(
|
||||||
{ "n", "v" },
|
{ "n", "v" },
|
||||||
k.jump_next_evaluation_output,
|
k.clojure_jump_next_evaluation_output,
|
||||||
"<CMD>call search('^; -\\+$', 'w')<CR>",
|
"<CMD>call search('^; -\\+$', 'w')<CR>",
|
||||||
{ silent = true, buffer = true, desc = "Jumps to the beginning of next evaluation output." }
|
{ silent = true, buffer = true, desc = "Jumps to the beginning of next evaluation output." }
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
local k = require("lazyvim.keymaps").get_keymaps().extras.lang.elixir
|
local k = require("lazyvim.keymaps").get_keymaps()
|
||||||
|
|
||||||
return {
|
return {
|
||||||
recommended = function()
|
recommended = function()
|
||||||
|
|
@ -14,7 +14,7 @@ return {
|
||||||
elixirls = {
|
elixirls = {
|
||||||
keys = {
|
keys = {
|
||||||
{
|
{
|
||||||
k.to_pipe,
|
k.elixir_to_pipe,
|
||||||
function()
|
function()
|
||||||
local params = vim.lsp.util.make_position_params()
|
local params = vim.lsp.util.make_position_params()
|
||||||
LazyVim.lsp.execute({
|
LazyVim.lsp.execute({
|
||||||
|
|
@ -25,7 +25,7 @@ return {
|
||||||
desc = "To Pipe",
|
desc = "To Pipe",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
k.from_pipe,
|
k.elixir_from_pipe,
|
||||||
function()
|
function()
|
||||||
local params = vim.lsp.util.make_position_params()
|
local params = vim.lsp.util.make_position_params()
|
||||||
LazyVim.lsp.execute({
|
LazyVim.lsp.execute({
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
-- This is the same as in lspconfig.configs.jdtls, but avoids
|
-- This is the same as in lspconfig.configs.jdtls, but avoids
|
||||||
-- needing to require that when this module loads.
|
-- needing to require that when this module loads.
|
||||||
local k = require("lazyvim.keymaps").get_keymaps().extras.lang
|
local k = require("lazyvim.keymaps").get_keymaps()
|
||||||
local t = require("lazyvim.keymaps").get_keymaps().extras.test.core
|
|
||||||
|
|
||||||
local java_filetypes = { "java" }
|
local java_filetypes = { "java" }
|
||||||
|
|
||||||
|
|
@ -197,31 +196,32 @@ return {
|
||||||
{
|
{
|
||||||
mode = "n",
|
mode = "n",
|
||||||
buffer = args.buf,
|
buffer = args.buf,
|
||||||
{ k.extract.prefix, group = "extract" },
|
{ k.lang_extract_prefix, group = "extract" },
|
||||||
{ k.extract.variable, require("jdtls").extract_variable_all, desc = "Extract Variable" },
|
{ k.lang_extract_variable, require("jdtls").extract_variable_all, desc = "Extract Variable" },
|
||||||
{ k.extract.constant, require("jdtls").extract_constant, desc = "Extract Constant" },
|
{ k.lang_extract_constant, require("jdtls").extract_constant, desc = "Extract Constant" },
|
||||||
{ k.go_to_super, require("jdtls").super_implementation, desc = "Goto Super" },
|
{ k.lang_go_to_super, require("jdtls").super_implementation, desc = "Goto Super" },
|
||||||
{ k.go_to_subjects, require("jdtls.tests").goto_subjects, desc = "Goto Subjects" },
|
{ k.lang_go_to_subjects, require("jdtls.tests").goto_subjects, desc = "Goto Subjects" },
|
||||||
{ k.organize_imports, require("jdtls").organize_imports, desc = "Organize Imports" },
|
{ k.lang_organize_imports, require("jdtls").organize_imports, desc = "Organize Imports" },
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
wk.add({
|
wk.add({
|
||||||
{
|
{
|
||||||
mode = "v",
|
mode = "v",
|
||||||
buffer = args.buf,
|
buffer = args.buf,
|
||||||
{ k.extract.prefix, group = "extract" },
|
{ k.lang_extract_prefix, group = "extract" },
|
||||||
{
|
{
|
||||||
k.extract.method,
|
k.lang_extract_method,
|
||||||
[[<ESC><CMD>lua require('jdtls').extract_method(true)<CR>]],
|
[[<ESC><CMD>lua require('jdtls').extract_method(true)<CR>]],
|
||||||
desc = "Extract Method",
|
desc = "Extract Method",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
k.extract.variable,
|
k.lang_extract_variable,
|
||||||
[[<ESC><CMD>lua require('jdtls').extract_variable_all(true)<CR>]],
|
[[<ESC><CMD>lua require('jdtls').extract_variable_all(true)<CR>]],
|
||||||
desc = "Extract Variable",
|
desc = "Extract Variable",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
k.extract.constant([[<ESC><CMD>lua require('jdtls').extract_constant(true)<CR>]]),
|
k.lang_extract_constant,
|
||||||
|
[[<ESC><CMD>lua require('jdtls').extract_constant(true)<CR>]],
|
||||||
desc = "Extract Constant",
|
desc = "Extract Constant",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
@ -239,9 +239,9 @@ return {
|
||||||
{
|
{
|
||||||
mode = "n",
|
mode = "n",
|
||||||
buffer = args.buf,
|
buffer = args.buf,
|
||||||
{ t.prefix, group = "test" },
|
{ k.test_prefix, group = "test" },
|
||||||
{
|
{
|
||||||
t.run_all_test_files,
|
k.test_run_all_test_files,
|
||||||
function()
|
function()
|
||||||
require("jdtls.dap").test_class({
|
require("jdtls.dap").test_class({
|
||||||
config_overrides = type(opts.test) ~= "boolean" and opts.test.config_overrides or nil,
|
config_overrides = type(opts.test) ~= "boolean" and opts.test.config_overrides or nil,
|
||||||
|
|
@ -250,7 +250,7 @@ return {
|
||||||
desc = "Run All Test",
|
desc = "Run All Test",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
t.run_nearest,
|
k.test_run_nearest,
|
||||||
function()
|
function()
|
||||||
require("jdtls.dap").test_nearest_method({
|
require("jdtls.dap").test_nearest_method({
|
||||||
config_overrides = type(opts.test) ~= "boolean" and opts.test.config_overrides or nil,
|
config_overrides = type(opts.test) ~= "boolean" and opts.test.config_overrides or nil,
|
||||||
|
|
@ -258,7 +258,7 @@ return {
|
||||||
end,
|
end,
|
||||||
desc = "Run Nearest Test",
|
desc = "Run Nearest Test",
|
||||||
},
|
},
|
||||||
{ t.run_file, require("jdtls.dap").pick_test, desc = "Run Test" },
|
{ k.test_run_file, require("jdtls.dap").pick_test, desc = "Run Test" },
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
local k = require("lazyvim.keymaps").get_keymaps().extras.lang.lean
|
local k = require("lazyvim.keymaps").get_keymaps()
|
||||||
|
|
||||||
return {
|
return {
|
||||||
recommended = function()
|
recommended = function()
|
||||||
|
|
@ -62,7 +62,7 @@ return {
|
||||||
},
|
},
|
||||||
-- Change if you don't like the backslash
|
-- Change if you don't like the backslash
|
||||||
-- (comma is a popular choice on French keyboards)
|
-- (comma is a popular choice on French keyboards)
|
||||||
leader = k.abbreviations_leader,
|
leader = k.lean_abbreviations_leader,
|
||||||
},
|
},
|
||||||
|
|
||||||
-- Enable suggested mappings?
|
-- Enable suggested mappings?
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
local k = require("lazyvim.keymaps").get_keymaps().extras.lang.markdown
|
local k = require("lazyvim.keymaps").get_keymaps()
|
||||||
|
|
||||||
LazyVim.on_very_lazy(function()
|
LazyVim.on_very_lazy(function()
|
||||||
vim.filetype.add({
|
vim.filetype.add({
|
||||||
|
|
@ -110,7 +110,7 @@ return {
|
||||||
ft = { "markdown", "norg", "rmd", "org" },
|
ft = { "markdown", "norg", "rmd", "org" },
|
||||||
config = function(_, opts)
|
config = function(_, opts)
|
||||||
require("render-markdown").setup(opts)
|
require("render-markdown").setup(opts)
|
||||||
LazyVim.toggle.map(k.render_markdown_toggle, {
|
LazyVim.toggle.map(k.markdown_render_markdown_toggle, {
|
||||||
name = "Render Markdown",
|
name = "Render Markdown",
|
||||||
get = function()
|
get = function()
|
||||||
return require("render-markdown.state").enabled
|
return require("render-markdown.state").enabled
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
local k = require("lazyvim.keymaps").get_keymaps().extras.lang
|
local k = require("lazyvim.keymaps")
|
||||||
|
|
||||||
return {
|
return {
|
||||||
recommended = function()
|
recommended = function()
|
||||||
|
|
@ -53,7 +53,7 @@ return {
|
||||||
},
|
},
|
||||||
keys = {
|
keys = {
|
||||||
{
|
{
|
||||||
k.go_to_definition,
|
k.lang_go_to_definition,
|
||||||
LazyVim.has("telescope.nvim") and function()
|
LazyVim.has("telescope.nvim") and function()
|
||||||
require("omnisharp_extended").telescope_lsp_definitions()
|
require("omnisharp_extended").telescope_lsp_definitions()
|
||||||
end or function()
|
end or function()
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
local k = require("lazyvim.keymaps").get_keymaps().extras.lang
|
local k = require("lazyvim.keymaps").get_keymaps()
|
||||||
|
|
||||||
if lazyvim_docs then
|
if lazyvim_docs then
|
||||||
-- LSP Server to use for Python.
|
-- LSP Server to use for Python.
|
||||||
|
|
@ -42,7 +42,7 @@ return {
|
||||||
},
|
},
|
||||||
keys = {
|
keys = {
|
||||||
{
|
{
|
||||||
k.organize_imports,
|
k.lang_organize_imports,
|
||||||
LazyVim.lsp.action["source.organizeImports"],
|
LazyVim.lsp.action["source.organizeImports"],
|
||||||
desc = "Organize Imports",
|
desc = "Organize Imports",
|
||||||
},
|
},
|
||||||
|
|
@ -51,7 +51,7 @@ return {
|
||||||
ruff_lsp = {
|
ruff_lsp = {
|
||||||
keys = {
|
keys = {
|
||||||
{
|
{
|
||||||
k.organize_imports,
|
k.lang_organize_imports,
|
||||||
LazyVim.lsp.action["source.organizeImports"],
|
LazyVim.lsp.action["source.organizeImports"],
|
||||||
desc = "Organize Imports",
|
desc = "Organize Imports",
|
||||||
},
|
},
|
||||||
|
|
@ -101,8 +101,8 @@ return {
|
||||||
"mfussenegger/nvim-dap-python",
|
"mfussenegger/nvim-dap-python",
|
||||||
-- stylua: ignore
|
-- stylua: ignore
|
||||||
keys = {
|
keys = {
|
||||||
{ k.python.debug_method, function() require('dap-python').test_method() end, desc = "Debug Method", ft = "python" },
|
{ k.python_debug_method, function() require('dap-python').test_method() end, desc = "Debug Method", ft = "python" },
|
||||||
{ k.python.debug_class, function() require('dap-python').test_class() end, desc = "Debug Class", ft = "python" },
|
{ k.python_debug_class, function() require('dap-python').test_class() end, desc = "Debug Class", ft = "python" },
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
if vim.fn.has("win32") == 1 then
|
if vim.fn.has("win32") == 1 then
|
||||||
|
|
@ -130,7 +130,7 @@ return {
|
||||||
},
|
},
|
||||||
-- Call config for python files and load the cached venv automatically
|
-- Call config for python files and load the cached venv automatically
|
||||||
ft = "python",
|
ft = "python",
|
||||||
keys = { { k.python.select_virtual_env, "<cmd>:VenvSelect<cr>", desc = "Select VirtualEnv", ft = "python" } },
|
keys = { { k.python_select_virtual_env, "<cmd>:VenvSelect<cr>", desc = "Select VirtualEnv", ft = "python" } },
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
local map = LazyVim.keymap_set
|
local map = LazyVim.keymap_set
|
||||||
local k = require("lazyvim.keymaps").get_keymaps().extras.lang.r
|
local k = require("lazyvim.keymaps").get_keymaps()
|
||||||
|
|
||||||
return {
|
return {
|
||||||
recommended = function()
|
recommended = function()
|
||||||
|
|
@ -19,25 +19,25 @@ return {
|
||||||
-- This function will be called at the FileType event
|
-- This function will be called at the FileType event
|
||||||
-- of files supported by R.nvim. This is an
|
-- of files supported by R.nvim. This is an
|
||||||
-- opportunity to create mappings local to buffers.
|
-- opportunity to create mappings local to buffers.
|
||||||
map("n", k.send, "<Plug>RDSendLine", { buffer = true })
|
map("n", k.r_send, "<Plug>RDSendLine", { buffer = true })
|
||||||
map("v", k.send, "<Plug>RSendSelection", { buffer = true })
|
map("v", k.r_send, "<Plug>RSendSelection", { buffer = true })
|
||||||
|
|
||||||
local wk = require("which-key")
|
local wk = require("which-key")
|
||||||
wk.add({
|
wk.add({
|
||||||
buffer = true,
|
buffer = true,
|
||||||
{ k.send_all, group = "all" },
|
{ k.r_send_all, group = "all" },
|
||||||
{ k.send_between_marks, group = "between marks" },
|
{ k.r_send_between_marks, group = "between marks" },
|
||||||
{ k.send_chunks, group = "chunks" },
|
{ k.r_send_chunks, group = "chunks" },
|
||||||
{ k.send_functions, group = "functions" },
|
{ k.r_send_functions, group = "functions" },
|
||||||
{ k.send_goto, group = "goto" },
|
{ k.r_send_goto, group = "goto" },
|
||||||
{ k.send_install, group = "install" },
|
{ k.r_send_install, group = "install" },
|
||||||
{ k.send_knit, group = "knit" },
|
{ k.r_send_knit, group = "knit" },
|
||||||
{ k.send_paragraph, group = "paragraph" },
|
{ k.r_send_paragraph, group = "paragraph" },
|
||||||
{ k.send_quarto, group = "quarto" },
|
{ k.r_send_quarto, group = "quarto" },
|
||||||
{ k.send_general, group = "r general" },
|
{ k.r_send_general, group = "r general" },
|
||||||
{ k.send_split_or_send, group = "split or send" },
|
{ k.r_send_split_or_send, group = "split or send" },
|
||||||
{ k.send_terminal, group = "terminal" },
|
{ k.r_send_terminal, group = "terminal" },
|
||||||
{ k.send_view, group = "view" },
|
{ k.r_send_view, group = "view" },
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
local map = LazyVim.keymap_set
|
local map = LazyVim.keymap_set
|
||||||
local k = require("lazyvim.keymaps").get_keymaps().extras.lang.rust
|
local k = require("lazyvim.keymaps").get_keymaps()
|
||||||
|
|
||||||
return {
|
return {
|
||||||
recommended = function()
|
recommended = function()
|
||||||
|
|
@ -51,10 +51,10 @@ return {
|
||||||
opts = {
|
opts = {
|
||||||
server = {
|
server = {
|
||||||
on_attach = function(_, bufnr)
|
on_attach = function(_, bufnr)
|
||||||
map("n", k.code_action, function()
|
map("n", k.rust_code_action, function()
|
||||||
vim.cmd.RustLsp("codeAction")
|
vim.cmd.RustLsp("codeAction")
|
||||||
end, { desc = "Code Action", buffer = bufnr })
|
end, { desc = "Code Action", buffer = bufnr })
|
||||||
map("n", k.debuggables, function()
|
map("n", k.rust_debuggables, function()
|
||||||
vim.cmd.RustLsp("debuggables")
|
vim.cmd.RustLsp("debuggables")
|
||||||
end, { desc = "Rust Debuggables", buffer = bufnr })
|
end, { desc = "Rust Debuggables", buffer = bufnr })
|
||||||
end,
|
end,
|
||||||
|
|
@ -101,7 +101,7 @@ return {
|
||||||
taplo = {
|
taplo = {
|
||||||
keys = {
|
keys = {
|
||||||
{
|
{
|
||||||
k.show_crate_documentation,
|
k.rust_show_crate_documentation,
|
||||||
function()
|
function()
|
||||||
if vim.fn.expand("%:t") == "Cargo.toml" and require("crates").popup_available() then
|
if vim.fn.expand("%:t") == "Cargo.toml" and require("crates").popup_available() then
|
||||||
require("crates").show_popup()
|
require("crates").show_popup()
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
local k = require("lazyvim.keymaps").get_keymaps().extras.lang.scala
|
local k = require("lazyvim.keymaps").get_keymaps()
|
||||||
|
|
||||||
return {
|
return {
|
||||||
recommended = function()
|
recommended = function()
|
||||||
|
|
@ -23,14 +23,14 @@ return {
|
||||||
metals = {
|
metals = {
|
||||||
keys = {
|
keys = {
|
||||||
{
|
{
|
||||||
k.metals_commands,
|
k.scala_metals_commands,
|
||||||
function()
|
function()
|
||||||
require("telescope").extensions.metals.commands()
|
require("telescope").extensions.metals.commands()
|
||||||
end,
|
end,
|
||||||
desc = "Metals commands",
|
desc = "Metals commands",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
k.metals_compile_cascade,
|
k.scala_metals_compile_cascade,
|
||||||
function()
|
function()
|
||||||
require("metals").compile_cascade()
|
require("metals").compile_cascade()
|
||||||
end,
|
end,
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
local k = require("lazyvim.keymaps").get_keymaps().extras.lang.sql
|
local k = require("lazyvim.keymaps").get_keymaps()
|
||||||
|
|
||||||
if lazyvim_docs then
|
if lazyvim_docs then
|
||||||
-- The setup below will automatically configure connections without the need for manual input each time.
|
-- The setup below will automatically configure connections without the need for manual input each time.
|
||||||
|
|
@ -73,7 +73,7 @@ return {
|
||||||
cmd = { "DBUI", "DBUIToggle", "DBUIAddConnection", "DBUIFindBuffer" },
|
cmd = { "DBUI", "DBUIToggle", "DBUIAddConnection", "DBUIFindBuffer" },
|
||||||
dependencies = "vim-dadbod",
|
dependencies = "vim-dadbod",
|
||||||
keys = {
|
keys = {
|
||||||
{ k.toggle_dbui, "<cmd>DBUIToggle<CR>", desc = "Toggle DBUI" },
|
{ k.sql_toggle_dbui, "<cmd>DBUIToggle<CR>", desc = "Toggle DBUI" },
|
||||||
},
|
},
|
||||||
init = function()
|
init = function()
|
||||||
local data_path = vim.fn.stdpath("data")
|
local data_path = vim.fn.stdpath("data")
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
local k = require("lazyvim.keymaps").get_keymaps().extras.lang
|
local k = require("lazyvim.keymaps").get_keymaps()
|
||||||
|
|
||||||
return {
|
return {
|
||||||
recommended = function()
|
recommended = function()
|
||||||
|
|
@ -28,7 +28,7 @@ return {
|
||||||
svelte = {
|
svelte = {
|
||||||
keys = {
|
keys = {
|
||||||
{
|
{
|
||||||
k.organize_imports,
|
k.lang_organize_imports,
|
||||||
LazyVim.lsp.action["source.organizeImports"],
|
LazyVim.lsp.action["source.organizeImports"],
|
||||||
desc = "Organize Imports",
|
desc = "Organize Imports",
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
local k = require("lazyvim.keymaps").get_keymaps().extras.lang.tex
|
local k = require("lazyvim.keymaps").get_keymaps()
|
||||||
|
|
||||||
return {
|
return {
|
||||||
recommended = function()
|
recommended = function()
|
||||||
|
|
@ -32,7 +32,7 @@ return {
|
||||||
vim.g.vimtex_quickfix_method = vim.fn.executable("pplatex") == 1 and "pplatex" or "latexlog"
|
vim.g.vimtex_quickfix_method = vim.fn.executable("pplatex") == 1 and "pplatex" or "latexlog"
|
||||||
end,
|
end,
|
||||||
keys = {
|
keys = {
|
||||||
{ k.prefix, "", desc = "+vimtex" },
|
{ k.tex_prefix, "", desc = "+vimtex" },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -44,7 +44,7 @@ return {
|
||||||
servers = {
|
servers = {
|
||||||
texlab = {
|
texlab = {
|
||||||
keys = {
|
keys = {
|
||||||
{ k.vimtex_docs, "<plug>(vimtex-doc-package)", desc = "Vimtex Docs", silent = true },
|
{ k.tex_vimtex_docs, "<plug>(vimtex-doc-package)", desc = "Vimtex Docs", silent = true },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
local k = require("lazyvim.keymaps").get_keymaps().extras.lang
|
local k = require("lazyvim.keymaps").get_keymaps()
|
||||||
|
|
||||||
return {
|
return {
|
||||||
recommended = function()
|
recommended = function()
|
||||||
|
|
@ -68,7 +68,7 @@ return {
|
||||||
},
|
},
|
||||||
keys = {
|
keys = {
|
||||||
{
|
{
|
||||||
k.typescript.go_to_source_definition,
|
k.typescript_go_to_source_definition,
|
||||||
function()
|
function()
|
||||||
local params = vim.lsp.util.make_position_params()
|
local params = vim.lsp.util.make_position_params()
|
||||||
LazyVim.lsp.execute({
|
LazyVim.lsp.execute({
|
||||||
|
|
@ -80,7 +80,7 @@ return {
|
||||||
desc = "Goto Source Definition",
|
desc = "Goto Source Definition",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
k.file_references,
|
k.lang_file_references,
|
||||||
function()
|
function()
|
||||||
LazyVim.lsp.execute({
|
LazyVim.lsp.execute({
|
||||||
command = "typescript.findAllFileReferences",
|
command = "typescript.findAllFileReferences",
|
||||||
|
|
@ -91,27 +91,27 @@ return {
|
||||||
desc = "File References",
|
desc = "File References",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
k.organize_imports,
|
k.lang_organize_imports,
|
||||||
LazyVim.lsp.action["source.organizeImports"],
|
LazyVim.lsp.action["source.organizeImports"],
|
||||||
desc = "Organize Imports",
|
desc = "Organize Imports",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
k.add_missing_imports,
|
k.lang_add_missing_imports,
|
||||||
LazyVim.lsp.action["source.addMissingImports.ts"],
|
LazyVim.lsp.action["source.addMissingImports.ts"],
|
||||||
desc = "Add missing imports",
|
desc = "Add missing imports",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
k.remove_unused_imports,
|
k.lang_remove_unused_imports,
|
||||||
LazyVim.lsp.action["source.removeUnused.ts"],
|
LazyVim.lsp.action["source.removeUnused.ts"],
|
||||||
desc = "Remove unused imports",
|
desc = "Remove unused imports",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
k.fix_all_diagnostics,
|
k.lang_fix_all_diagnostics,
|
||||||
LazyVim.lsp.action["source.fixAll.ts"],
|
LazyVim.lsp.action["source.fixAll.ts"],
|
||||||
desc = "Fix all diagnostics",
|
desc = "Fix all diagnostics",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
k.select_lang_version,
|
k.lang_select_lang_version,
|
||||||
function()
|
function()
|
||||||
LazyVim.lsp.execute({ command = "typescript.selectTypeScriptVersion" })
|
LazyVim.lsp.execute({ command = "typescript.selectTypeScriptVersion" })
|
||||||
end,
|
end,
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
local k = require("lazyvim.keymaps").get_keymaps().extras.test.core
|
local k = require("lazyvim.keymaps").get_keymaps()
|
||||||
|
|
||||||
return {
|
return {
|
||||||
recommended = true,
|
recommended = true,
|
||||||
|
|
@ -107,16 +107,16 @@ return {
|
||||||
end,
|
end,
|
||||||
-- stylua: ignore
|
-- stylua: ignore
|
||||||
keys = {
|
keys = {
|
||||||
{ k.prefix, "", desc = "+test"},
|
{ k.test_prefix, "", desc = "+test"},
|
||||||
{ k.run_file, function() require("neotest").run.run(vim.fn.expand("%")) end, desc = "Run File" },
|
{ k.test_run_file, function() require("neotest").run.run(vim.fn.expand("%")) end, desc = "Run File" },
|
||||||
{ k.run_all_test_files, function() require("neotest").run.run(vim.uv.cwd()) end, desc = "Run All Test Files" },
|
{ k.test_run_all_test_files, function() require("neotest").run.run(vim.uv.cwd()) end, desc = "Run All Test Files" },
|
||||||
{ k.run_nearest, function() require("neotest").run.run() end, desc = "Run Nearest" },
|
{ k.test_run_nearest, function() require("neotest").run.run() end, desc = "Run Nearest" },
|
||||||
{ k.run_last, function() require("neotest").run.run_last() end, desc = "Run Last" },
|
{ k.test_run_last, function() require("neotest").run.run_last() end, desc = "Run Last" },
|
||||||
{ k.toggle_summary, function() require("neotest").summary.toggle() end, desc = "Toggle Summary" },
|
{ k.test_toggle_summary, function() require("neotest").summary.toggle() end, desc = "Toggle Summary" },
|
||||||
{ k.show_output, function() require("neotest").output.open({ enter = true, auto_close = true }) end, desc = "Show Output" },
|
{ k.test_show_output, function() require("neotest").output.open({ enter = true, auto_close = true }) end, desc = "Show Output" },
|
||||||
{ k.toggle_output_panel, function() require("neotest").output_panel.toggle() end, desc = "Toggle Output Panel" },
|
{ k.test_toggle_output_panel, function() require("neotest").output_panel.toggle() end, desc = "Toggle Output Panel" },
|
||||||
{ k.stop, function() require("neotest").run.stop() end, desc = "Stop" },
|
{ k.test_stop, function() require("neotest").run.stop() end, desc = "Stop" },
|
||||||
{ k.toggle_watch, function() require("neotest").watch.toggle(vim.fn.expand("%")) end, desc = "Toggle Watch" },
|
{ k.test_toggle_watch, function() require("neotest").watch.toggle(vim.fn.expand("%")) end, desc = "Toggle Watch" },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -124,7 +124,7 @@ return {
|
||||||
optional = true,
|
optional = true,
|
||||||
-- stylua: ignore
|
-- stylua: ignore
|
||||||
keys = {
|
keys = {
|
||||||
{ k.debug_nearest, function() require("neotest").run.run({strategy = "dap"}) end, desc = "Debug Nearest" },
|
{ k.test_debug_nearest, function() require("neotest").run.run({strategy = "dap"}) end, desc = "Debug Nearest" },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
local k = require("lazyvim.keymaps").get_keymaps().ui.dashboard
|
local k = require("lazyvim.keymaps").get_keymaps()
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
||||||
|
|
@ -26,15 +26,15 @@ return {
|
||||||
-- stylua: ignore
|
-- stylua: ignore
|
||||||
dashboard.section.buttons.val = {}
|
dashboard.section.buttons.val = {}
|
||||||
local actions = {
|
local actions = {
|
||||||
{ k.find_file, " " .. " Find file", LazyVim.pick() },
|
{ k.dashboard_find_file, " " .. " Find file", LazyVim.pick() },
|
||||||
{ k.new_file, " " .. " New file", [[<cmd> ene <BAR> startinsert <cr>]] },
|
{ k.dashboard_new_file, " " .. " New file", [[<cmd> ene <BAR> startinsert <cr>]] },
|
||||||
{ k.recent_files, " " .. " Recent files", LazyVim.pick("oldfiles") },
|
{ k.dashboard_recent_files, " " .. " Recent files", LazyVim.pick("oldfiles") },
|
||||||
{ k.find_text, " " .. " Find text", LazyVim.pick("live_grep") },
|
{ k.dashboard_find_text, " " .. " Find text", LazyVim.pick("live_grep") },
|
||||||
{ k.config, " " .. " Config", LazyVim.pick.config_files() },
|
{ k.dashboard_config, " " .. " Config", LazyVim.pick.config_files() },
|
||||||
{ k.restore_session, " " .. " Restore Session", [[<cmd> lua require("persistence").load() <cr>]] },
|
{ k.dashboard_restore_session, " " .. " Restore Session", [[<cmd> lua require("persistence").load() <cr>]] },
|
||||||
{ k.lazy_extras, " " .. " Lazy Extras", "<cmd> LazyExtras <cr>" },
|
{ k.dashboard_lazy_extras, " " .. " Lazy Extras", "<cmd> LazyExtras <cr>" },
|
||||||
{ k.lazy, " " .. " Lazy", "<cmd> Lazy <cr>" },
|
{ k.dashboard_lazy, " " .. " Lazy", "<cmd> Lazy <cr>" },
|
||||||
{ k.quit, " " .. " Quit", "<cmd> qa <cr>" },
|
{ k.dashboard_quit, " " .. " Quit", "<cmd> qa <cr>" },
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, action in ipairs(actions) do
|
for _, action in ipairs(actions) do
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
local k = require("lazyvim.keymaps").get_keymaps().extras.ui.edgy
|
local k = require("lazyvim.keymaps").get_keymaps()
|
||||||
local r = require("lazyvim.keymaps").get_keymaps().keymaps.resize_window
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
-- edgy
|
-- edgy
|
||||||
|
|
@ -8,32 +7,32 @@ return {
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
keys = {
|
keys = {
|
||||||
{
|
{
|
||||||
k.toggle,
|
k.edgy_toggle,
|
||||||
function()
|
function()
|
||||||
require("edgy").toggle()
|
require("edgy").toggle()
|
||||||
end,
|
end,
|
||||||
desc = "Edgy Toggle",
|
desc = "Edgy Toggle",
|
||||||
},
|
},
|
||||||
-- stylua: ignore
|
-- stylua: ignore
|
||||||
{ k.select_window, function() require("edgy").select() end, desc = "Edgy Select Window" },
|
{ k.edgy_select_window, function() require("edgy").select() end, desc = "Edgy Select Window" },
|
||||||
},
|
},
|
||||||
opts = function()
|
opts = function()
|
||||||
local keys = {}
|
local keys = {}
|
||||||
local actions = {
|
local actions = {
|
||||||
-- increase width
|
-- increase width
|
||||||
[r.increase_width] = function(win)
|
[k.size_increase_width] = function(win)
|
||||||
win:resize("width", 2)
|
win:resize("width", 2)
|
||||||
end,
|
end,
|
||||||
-- decrease width
|
-- decrease width
|
||||||
[r.decrease_width] = function(win)
|
[k.size_decrease_width] = function(win)
|
||||||
win:resize("width", -2)
|
win:resize("width", -2)
|
||||||
end,
|
end,
|
||||||
-- increase height
|
-- increase height
|
||||||
[r.increase_height] = function(win)
|
[k.size_increase_height] = function(win)
|
||||||
win:resize("height", 2)
|
win:resize("height", 2)
|
||||||
end,
|
end,
|
||||||
-- decrease height
|
-- decrease height
|
||||||
[r.decrease_height] = function(win)
|
[k.size_decrease_height] = function(win)
|
||||||
win:resize("height", -2)
|
win:resize("height", -2)
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
-- animations
|
-- animations
|
||||||
local k = require("lazyvim.keymaps").get_keymaps().extras.ui.mini_animate
|
local k = require("lazyvim.keymaps").get_keymaps()
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"echasnovski/mini.animate",
|
"echasnovski/mini.animate",
|
||||||
|
|
@ -23,7 +23,7 @@ return {
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
LazyVim.toggle.map(k.toggle, {
|
LazyVim.toggle.map(k.minianimae_toggle, {
|
||||||
name = "Mini Animate",
|
name = "Mini Animate",
|
||||||
get = function()
|
get = function()
|
||||||
return not vim.g.minianimate_disable
|
return not vim.g.minianimate_disable
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
-- Show context of the current function
|
-- Show context of the current function
|
||||||
local k = require("lazyvim.keymaps").get_keymaps().extras.ui.treesitter_context
|
local k = require("lazyvim.keymaps").get_keymaps()
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"nvim-treesitter/nvim-treesitter-context",
|
"nvim-treesitter/nvim-treesitter-context",
|
||||||
|
|
@ -7,7 +7,7 @@ return {
|
||||||
opts = function()
|
opts = function()
|
||||||
local tsc = require("treesitter-context")
|
local tsc = require("treesitter-context")
|
||||||
|
|
||||||
LazyVim.toggle.map(k.toggle, {
|
LazyVim.toggle.map(k.tscontext_toggle, {
|
||||||
name = "Treesitter Context",
|
name = "Treesitter Context",
|
||||||
get = tsc.enabled,
|
get = tsc.enabled,
|
||||||
set = function(state)
|
set = function(state)
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
local k = require("lazyvim.keymaps").get_keymaps().extras.util.chezmoi
|
local k = require("lazyvim.keymaps").get_keymaps()
|
||||||
|
|
||||||
local pick_chezmoi = function()
|
local pick_chezmoi = function()
|
||||||
if LazyVim.pick.picker.name == "telescope" then
|
if LazyVim.pick.picker.name == "telescope" then
|
||||||
|
|
@ -37,7 +37,7 @@ return {
|
||||||
"xvzc/chezmoi.nvim",
|
"xvzc/chezmoi.nvim",
|
||||||
keys = {
|
keys = {
|
||||||
{
|
{
|
||||||
k.pick_chezmoi,
|
k.chezmoi_pick_chezmoi,
|
||||||
pick_chezmoi,
|
pick_chezmoi,
|
||||||
desc = "Chezmoi",
|
desc = "Chezmoi",
|
||||||
},
|
},
|
||||||
|
|
@ -53,7 +53,7 @@ return {
|
||||||
on_watch = false,
|
on_watch = false,
|
||||||
},
|
},
|
||||||
telescope = {
|
telescope = {
|
||||||
select = k.select == "" and {} or { k.select },
|
select = k.chezmoi_select == "" and {} or { k.chezmoi_select },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
init = function()
|
init = function()
|
||||||
|
|
@ -70,7 +70,7 @@ return {
|
||||||
"nvimdev/dashboard-nvim",
|
"nvimdev/dashboard-nvim",
|
||||||
optional = true,
|
optional = true,
|
||||||
opts = function(_, opts)
|
opts = function(_, opts)
|
||||||
if not k.key or k.key == "" then
|
if not k.chezmoi_key or k.chezmoi_key == "" then
|
||||||
return opts
|
return opts
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -78,7 +78,7 @@ return {
|
||||||
action = pick_chezmoi,
|
action = pick_chezmoi,
|
||||||
desc = " Config",
|
desc = " Config",
|
||||||
icon = "",
|
icon = "",
|
||||||
key = k.key,
|
key = k.chezmoi_key,
|
||||||
}
|
}
|
||||||
|
|
||||||
projects.desc = projects.desc .. string.rep(" ", 43 - #projects.desc)
|
projects.desc = projects.desc .. string.rep(" ", 43 - #projects.desc)
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
local k = require("lazyvim.keymaps").get_keymaps().keymaps.lazygit
|
local k = require("lazyvim.keymaps").get_keymaps()
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
||||||
|
|
@ -8,14 +8,14 @@ return {
|
||||||
opts = { ensure_installed = { "gitui" } },
|
opts = { ensure_installed = { "gitui" } },
|
||||||
keys = {
|
keys = {
|
||||||
{
|
{
|
||||||
k.toggle_cwd,
|
k.lazygit_toggle_cwd,
|
||||||
function()
|
function()
|
||||||
LazyVim.terminal.open({ "gitui" }, { esc_esc = false, ctrl_hjkl = false })
|
LazyVim.terminal.open({ "gitui" }, { esc_esc = false, ctrl_hjkl = false })
|
||||||
end,
|
end,
|
||||||
desc = "GitUi (cwd)",
|
desc = "GitUi (cwd)",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
k.toggle_root,
|
k.lazygit_toggle_root,
|
||||||
function()
|
function()
|
||||||
LazyVim.terminal.open({ "gitui" }, { cwd = LazyVim.root.get(), esc_esc = false, ctrl_hjkl = false })
|
LazyVim.terminal.open({ "gitui" }, { cwd = LazyVim.root.get(), esc_esc = false, ctrl_hjkl = false })
|
||||||
end,
|
end,
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
local k = require("lazyvim.keymaps").get_keymaps().extras.util.octo
|
local k = require("lazyvim.keymaps").get_keymaps()
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
||||||
|
|
@ -17,22 +17,22 @@ return {
|
||||||
picker = "telescope",
|
picker = "telescope",
|
||||||
},
|
},
|
||||||
keys = {
|
keys = {
|
||||||
{ k.issue_list, "<cmd>Octo issue list<CR>", desc = "List Issues (Octo)" },
|
{ k.octo_issue_list, "<cmd>Octo issue list<CR>", desc = "List Issues (Octo)" },
|
||||||
{ k.issue_search, "<cmd>Octo issue search<CR>", desc = "Search Issues (Octo)" },
|
{ k.octo_issue_search, "<cmd>Octo issue search<CR>", desc = "Search Issues (Octo)" },
|
||||||
{ k.pr_list, "<cmd>Octo pr list<CR>", desc = "List PRs (Octo)" },
|
{ k.octo_pr_list, "<cmd>Octo pr list<CR>", desc = "List PRs (Octo)" },
|
||||||
{ k.pr_search, "<cmd>Octo pr search<CR>", desc = "Search PRs (Octo)" },
|
{ k.octo_pr_search, "<cmd>Octo pr search<CR>", desc = "Search PRs (Octo)" },
|
||||||
{ k.repo_list, "<cmd>Octo repo list<CR>", desc = "List Repos (Octo)" },
|
{ k.octo_repo_list, "<cmd>Octo repo list<CR>", desc = "List Repos (Octo)" },
|
||||||
{ k.search, "<cmd>Octo search<CR>", desc = "Search (Octo)" },
|
{ k.octo_search, "<cmd>Octo search<CR>", desc = "Search (Octo)" },
|
||||||
|
|
||||||
{ k.assignee, "", desc = "+assignee (Octo)", ft = "octo" },
|
{ k.octo_assignee, "", desc = "+assignee (Octo)", ft = "octo" },
|
||||||
{ k.comment_code, "", desc = "+comment/code (Octo)", ft = "octo" },
|
{ k.octo_comment_code, "", desc = "+comment/code (Octo)", ft = "octo" },
|
||||||
{ k.label, "", desc = "+label (Octo)", ft = "octo" },
|
{ k.octo_label, "", desc = "+label (Octo)", ft = "octo" },
|
||||||
{ k.issue, "", desc = "+issue (Octo)", ft = "octo" },
|
{ k.octo_issue, "", desc = "+issue (Octo)", ft = "octo" },
|
||||||
{ k.react, "", desc = "+react (Octo)", ft = "octo" },
|
{ k.octo_react, "", desc = "+react (Octo)", ft = "octo" },
|
||||||
{ k.pr, "", desc = "+pr (Octo)", ft = "octo" },
|
{ k.octo_pr, "", desc = "+pr (Octo)", ft = "octo" },
|
||||||
{ k.review, "", desc = "+review (Octo)", ft = "octo" },
|
{ k.octo_review, "", desc = "+review (Octo)", ft = "octo" },
|
||||||
{ k.insert_at, "@<C-x><C-o>", mode = "i", ft = "octo", silent = true },
|
{ k.octo_insert_at, "@<C-x><C-o>", mode = "i", ft = "octo", silent = true },
|
||||||
{ k.insert_hashtag, "#<C-x><C-o>", mode = "i", ft = "octo", silent = true },
|
{ k.octo_insert_hashtag, "#<C-x><C-o>", mode = "i", ft = "octo", silent = true },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
local k = require("lazyvim.keymaps").get_keymaps().extras.editor.picker
|
local k = require("lazyvim.keymaps").get_keymaps()
|
||||||
local d = require("lazyvim.keymaps").get_keymaps().ui.dashboard
|
|
||||||
|
|
||||||
local pick = nil
|
local pick = nil
|
||||||
|
|
||||||
|
|
@ -104,7 +103,7 @@ return {
|
||||||
"nvim-telescope/telescope.nvim",
|
"nvim-telescope/telescope.nvim",
|
||||||
optional = true,
|
optional = true,
|
||||||
keys = {
|
keys = {
|
||||||
{ k.find_projects, pick, desc = "Projects" },
|
{ k.picker_find_projects, pick, desc = "Projects" },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -112,7 +111,7 @@ return {
|
||||||
"ibhagwan/fzf-lua",
|
"ibhagwan/fzf-lua",
|
||||||
optional = true,
|
optional = true,
|
||||||
keys = {
|
keys = {
|
||||||
{ k.find_projects, pick, desc = "Projects" },
|
{ k.picker_find_projects, pick, desc = "Projects" },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -146,7 +145,7 @@ return {
|
||||||
"nvimdev/dashboard-nvim",
|
"nvimdev/dashboard-nvim",
|
||||||
optional = true,
|
optional = true,
|
||||||
opts = function(_, opts)
|
opts = function(_, opts)
|
||||||
if not d.projects or d.projects == "" then
|
if not k.dashboard_projects or k.dashboard_projects == "" then
|
||||||
return opts
|
return opts
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -154,7 +153,7 @@ return {
|
||||||
action = pick,
|
action = pick,
|
||||||
desc = " Projects",
|
desc = " Projects",
|
||||||
icon = " ",
|
icon = " ",
|
||||||
key = d.projects,
|
key = k.dashboard_projects,
|
||||||
}
|
}
|
||||||
|
|
||||||
projects.desc = projects.desc .. string.rep(" ", 43 - #projects.desc)
|
projects.desc = projects.desc .. string.rep(" ", 43 - #projects.desc)
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
local k = require("lazyvim.keymaps").get_keymaps().extras.util.rest.kulala
|
local k = require("lazyvim.keymaps").get_keymaps()
|
||||||
|
|
||||||
vim.filetype.add({
|
vim.filetype.add({
|
||||||
extension = {
|
extension = {
|
||||||
|
|
@ -10,11 +10,15 @@ return {
|
||||||
"mistweaverco/kulala.nvim",
|
"mistweaverco/kulala.nvim",
|
||||||
ft = "http",
|
ft = "http",
|
||||||
keys = {
|
keys = {
|
||||||
{ k.prefix, "", desc = "+Rest" },
|
{ k.kulala_prefix, "", desc = "+Rest" },
|
||||||
{ k.send_request, "<cmd>lua require('kulala').run()<cr>", desc = "Send the request" },
|
{ k.kulala_send_request, "<cmd>lua require('kulala').run()<cr>", desc = "Send the request" },
|
||||||
{ k.toggle_view, "<cmd>lua require('kulala').toggle_view()<cr>", desc = "Toggle headers/body" },
|
{ k.kulala_toggle_view, "<cmd>lua require('kulala').toggle_view()<cr>", desc = "Toggle headers/body" },
|
||||||
{ k.jump_to_previous_request, "<cmd>lua require('kulala').jump_prev()<cr>", desc = "Jump to previous request" },
|
{
|
||||||
{ k.jump_to_next_request, "<cmd>lua require('kulala').jump_next()<cr>", desc = "Jump to next request" },
|
k.kulala_jump_to_previous_request,
|
||||||
|
"<cmd>lua require('kulala').jump_prev()<cr>",
|
||||||
|
desc = "Jump to previous request",
|
||||||
|
},
|
||||||
|
{ k.kulala_jump_to_next_request, "<cmd>lua require('kulala').jump_next()<cr>", desc = "Jump to next request" },
|
||||||
},
|
},
|
||||||
opts = {},
|
opts = {},
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -29,15 +29,15 @@ Config.options.defaults.cond = function(plugin)
|
||||||
end
|
end
|
||||||
|
|
||||||
local map = LazyVim.keymap_set
|
local map = LazyVim.keymap_set
|
||||||
local k = require("lazyvim.keymaps").get_keymaps().extras.vscode
|
local k = require("lazyvim.keymaps").get_keymaps()
|
||||||
|
|
||||||
-- Add some vscode specific keymaps
|
-- Add some vscode specific keymaps
|
||||||
vim.api.nvim_create_autocmd("User", {
|
vim.api.nvim_create_autocmd("User", {
|
||||||
pattern = "LazyVimKeymapsDefaults",
|
pattern = "LazyVimKeymapsDefaults",
|
||||||
callback = function()
|
callback = function()
|
||||||
map("n", k.find, "<cmd>Find<cr>")
|
map("n", k.vscode_find, "<cmd>Find<cr>")
|
||||||
map("n", k.find_in_files, [[<cmd>lua require('vscode').action('workbench.action.findInFiles')<cr>]])
|
map("n", k.vscode_find_in_files, [[<cmd>lua require('vscode').action('workbench.action.findInFiles')<cr>]])
|
||||||
map("n", k.go_to_symbol, [[<cmd>lua require('vscode').action('workbench.action.gotoSymbol')<cr>]])
|
map("n", k.vscode_go_to_symbol, [[<cmd>lua require('vscode').action('workbench.action.gotoSymbol')<cr>]])
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
local M = {}
|
local M = {}
|
||||||
local k = require("lazyvim.keymaps").get_keymaps().formatting
|
local k = require("lazyvim.keymaps").get_keymaps()
|
||||||
|
|
||||||
---@param opts conform.setupOpts
|
---@param opts conform.setupOpts
|
||||||
function M.setup(_, opts)
|
function M.setup(_, opts)
|
||||||
|
|
@ -26,7 +26,7 @@ return {
|
||||||
cmd = "ConformInfo",
|
cmd = "ConformInfo",
|
||||||
keys = {
|
keys = {
|
||||||
{
|
{
|
||||||
k.conform.format,
|
k.conform_format,
|
||||||
function()
|
function()
|
||||||
require("conform").format({ formatters = { "injected" }, timeout_ms = 3000 })
|
require("conform").format({ formatters = { "injected" }, timeout_ms = 3000 })
|
||||||
end,
|
end,
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
local k = require("lazyvim.keymaps").get_keymaps().extras.lang
|
local k = require("lazyvim.keymaps").get_keymaps()
|
||||||
return {
|
return {
|
||||||
-- lspconfig
|
-- lspconfig
|
||||||
{
|
{
|
||||||
|
|
@ -264,7 +264,7 @@ return {
|
||||||
|
|
||||||
"williamboman/mason.nvim",
|
"williamboman/mason.nvim",
|
||||||
cmd = "Mason",
|
cmd = "Mason",
|
||||||
keys = { { k.mason, "<cmd>Mason<cr>", desc = "Mason" } },
|
keys = { { k.lang_mason, "<cmd>Mason<cr>", desc = "Mason" } },
|
||||||
build = ":MasonUpdate",
|
build = ":MasonUpdate",
|
||||||
opts_extend = { "ensure_installed" },
|
opts_extend = { "ensure_installed" },
|
||||||
opts = {
|
opts = {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
local M = {}
|
local M = {}
|
||||||
local k = require("lazyvim.keymaps").get_keymaps().extras.lang
|
local k = require("lazyvim.keymaps").get_keymaps()
|
||||||
|
|
||||||
---@type LazyKeysLspSpec[]|nil
|
---@type LazyKeysLspSpec[]|nil
|
||||||
M._keys = nil
|
M._keys = nil
|
||||||
|
|
@ -13,35 +13,41 @@ function M.get()
|
||||||
return M._keys
|
return M._keys
|
||||||
end
|
end
|
||||||
local actions = {
|
local actions = {
|
||||||
{ k.lsp_info, "<cmd>LspInfo<cr>", desc = "Lsp Info" },
|
{ k.lang_lsp_info, "<cmd>LspInfo<cr>", desc = "Lsp Info" },
|
||||||
{ k.go_to_definition, vim.lsp.buf.definition, desc = "Goto Definition", has = "definition" },
|
{ k.lang_go_to_definition, vim.lsp.buf.definition, desc = "Goto Definition", has = "definition" },
|
||||||
{ k.references, vim.lsp.buf.references, desc = "References", nowait = true },
|
{ k.lang_references, vim.lsp.buf.references, desc = "References", nowait = true },
|
||||||
{ k.go_to_implementation, vim.lsp.buf.implementation, desc = "Goto Implementation" },
|
{ k.lang_go_to_implementation, vim.lsp.buf.implementation, desc = "Goto Implementation" },
|
||||||
{ k.go_to_type_definition, vim.lsp.buf.type_definition, desc = "Goto T[y]pe Definition" },
|
{ k.lang_go_to_type_definition, vim.lsp.buf.type_definition, desc = "Goto T[y]pe Definition" },
|
||||||
{ k.go_to_declaration, vim.lsp.buf.declaration, desc = "Goto Declaration" },
|
{ k.lang_go_to_declaration, vim.lsp.buf.declaration, desc = "Goto Declaration" },
|
||||||
{ k.hover, vim.lsp.buf.hover, desc = "Hover" },
|
{ k.lang_hover, vim.lsp.buf.hover, desc = "Hover" },
|
||||||
{ k.signature_help, vim.lsp.buf.signature_help, desc = "Signature Help", has = "signatureHelp" },
|
{ k.lang_signature_help, vim.lsp.buf.signature_help, desc = "Signature Help", has = "signatureHelp" },
|
||||||
{ k.insert_signature_help, vim.lsp.buf.signature_help, mode = "i", desc = "Signature Help", has = "signatureHelp" },
|
|
||||||
{ k.code_action, vim.lsp.buf.code_action, desc = "Code Action", mode = { "n", "v" }, has = "codeAction" },
|
|
||||||
{ k.run_codelens, vim.lsp.codelens.run, desc = "Run Codelens", mode = { "n", "v" }, has = "codeLens" },
|
|
||||||
{
|
{
|
||||||
k.refresh_codelens,
|
k.lang_insert_signature_help,
|
||||||
|
vim.lsp.buf.signature_help,
|
||||||
|
mode = "i",
|
||||||
|
desc = "Signature Help",
|
||||||
|
has = "signatureHelp",
|
||||||
|
},
|
||||||
|
{ k.lang_code_action, vim.lsp.buf.code_action, desc = "Code Action", mode = { "n", "v" }, has = "codeAction" },
|
||||||
|
{ k.lang_run_codelens, vim.lsp.codelens.run, desc = "Run Codelens", mode = { "n", "v" }, has = "codeLens" },
|
||||||
|
{
|
||||||
|
k.lang_refresh_codelens,
|
||||||
vim.lsp.codelens.refresh,
|
vim.lsp.codelens.refresh,
|
||||||
desc = "Refresh & Display Codelens",
|
desc = "Refresh & Display Codelens",
|
||||||
mode = { "n" },
|
mode = { "n" },
|
||||||
has = "codeLens",
|
has = "codeLens",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
k.rename_file,
|
k.lang_rename_file,
|
||||||
LazyVim.lsp.rename_file,
|
LazyVim.lsp.rename_file,
|
||||||
desc = "Rename File",
|
desc = "Rename File",
|
||||||
mode = { "n" },
|
mode = { "n" },
|
||||||
has = { "workspace/didRenameFiles", "workspace/willRenameFiles" },
|
has = { "workspace/didRenameFiles", "workspace/willRenameFiles" },
|
||||||
},
|
},
|
||||||
{ k.rename, vim.lsp.buf.rename, desc = "Rename", has = "rename" },
|
{ k.lang_rename, vim.lsp.buf.rename, desc = "Rename", has = "rename" },
|
||||||
{ k.source_action, LazyVim.lsp.action.source, desc = "Source Action", has = "codeAction" },
|
{ k.lang_source_action, LazyVim.lsp.action.source, desc = "Source Action", has = "codeAction" },
|
||||||
{
|
{
|
||||||
k.next_reference,
|
k.lang_next_reference,
|
||||||
function()
|
function()
|
||||||
LazyVim.lsp.words.jump(vim.v.count1)
|
LazyVim.lsp.words.jump(vim.v.count1)
|
||||||
end,
|
end,
|
||||||
|
|
@ -52,7 +58,7 @@ function M.get()
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
k.prev_reference,
|
k.lang_prev_reference,
|
||||||
function()
|
function()
|
||||||
LazyVim.lsp.words.jump(-vim.v.count1)
|
LazyVim.lsp.words.jump(-vim.v.count1)
|
||||||
end,
|
end,
|
||||||
|
|
@ -63,7 +69,7 @@ function M.get()
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
k.cycle_next_reference,
|
k.lang_cycle_next_reference,
|
||||||
function()
|
function()
|
||||||
LazyVim.lsp.words.jump(vim.v.count1, true)
|
LazyVim.lsp.words.jump(vim.v.count1, true)
|
||||||
end,
|
end,
|
||||||
|
|
@ -74,7 +80,7 @@ function M.get()
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
k.cycle_prev_reference,
|
k.lang_cycle_prev_reference,
|
||||||
function()
|
function()
|
||||||
LazyVim.lsp.words.jump(-vim.v.count1, true)
|
LazyVim.lsp.words.jump(-vim.v.count1, true)
|
||||||
end,
|
end,
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
local k = require("lazyvim.keymaps").get_keymaps().treesitter
|
local k = require("lazyvim.keymaps").get_keymaps()
|
||||||
|
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"folke/which-key.nvim",
|
"folke/which-key.nvim",
|
||||||
opts = {
|
opts = {
|
||||||
spec = {
|
spec = {
|
||||||
{ k.decrement_selection, desc = "Decrement Selection", mode = "x" },
|
{ k.ts_decrement_selection, desc = "Decrement Selection", mode = "x" },
|
||||||
{ k.increment_selection, desc = "Increment Selection", mode = { "x", "n" } },
|
{ k.ts_increment_selection, desc = "Increment Selection", mode = { "x", "n" } },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
@ -31,8 +31,8 @@ return {
|
||||||
end,
|
end,
|
||||||
cmd = { "TSUpdateSync", "TSUpdate", "TSInstall" },
|
cmd = { "TSUpdateSync", "TSUpdate", "TSInstall" },
|
||||||
keys = {
|
keys = {
|
||||||
{ k.increment_selection, desc = "Increment Selection" },
|
{ k.ts_increment_selection, desc = "Increment Selection" },
|
||||||
{ k.decrement_selection, desc = "Decrement Selection", mode = "x" },
|
{ k.ts_decrement_selection, desc = "Decrement Selection", mode = "x" },
|
||||||
},
|
},
|
||||||
opts_extend = { "ensure_installed" },
|
opts_extend = { "ensure_installed" },
|
||||||
---@type TSConfig
|
---@type TSConfig
|
||||||
|
|
@ -69,34 +69,37 @@ return {
|
||||||
incremental_selection = {
|
incremental_selection = {
|
||||||
enable = true,
|
enable = true,
|
||||||
keymaps = {
|
keymaps = {
|
||||||
init_selection = (k.increment_selection and k.increment_selection ~= "") and k.increment_selection or false,
|
init_selection = (k.ts_increment_selection and k.ts_increment_selection ~= "") and k.ts_increment_selection
|
||||||
node_incremental = (k.increment_selection and k.increment_selection ~= "") and k.increment_selection or false,
|
or false,
|
||||||
|
node_incremental = (k.ts_increment_selection and k.ts_increment_selection ~= "") and k.ts_increment_selection
|
||||||
|
or false,
|
||||||
scope_incremental = false,
|
scope_incremental = false,
|
||||||
node_decremental = (k.decrement_selection and k.decrement_selection ~= "") and k.decrement_selection or false,
|
node_decremental = (k.ts_decrement_selection and k.ts_decrement_selection ~= "") and k.ts_decrement_selection
|
||||||
|
or false,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
textobjects = {
|
textobjects = {
|
||||||
move = {
|
move = {
|
||||||
enable = true,
|
enable = true,
|
||||||
goto_next_start = {
|
goto_next_start = {
|
||||||
[k.textobjects.goto_next_start.function_outer] = "@function.outer",
|
[k.ts_ns_function_outer] = "@function.outer",
|
||||||
[k.textobjects.goto_next_start.class_outer] = "@class.outer",
|
[k.ts_ns_class_outer] = "@class.outer",
|
||||||
[k.textobjects.goto_next_start.parameter_inner] = "@parameter.inner",
|
[k.ts_ns_parameter_inner] = "@parameter.inner",
|
||||||
},
|
},
|
||||||
goto_next_end = {
|
goto_next_end = {
|
||||||
[k.textobjects.goto_next_end.function_outer] = "@function.outer",
|
[k.ts_ne_function_outer] = "@function.outer",
|
||||||
[k.textobjects.goto_next_end.class_outer] = "@class.outer",
|
[k.ts_ne_class_outer] = "@class.outer",
|
||||||
[k.textobjects.goto_next_end.parameter_inner] = "@parameter.inner",
|
[k.ts_ne_parameter_inner] = "@parameter.inner",
|
||||||
},
|
},
|
||||||
goto_previous_start = {
|
goto_previous_start = {
|
||||||
[k.textobjects.goto_previous_start.function_outer] = "@function.outer",
|
[k.ts_ps_function_outer] = "@function.outer",
|
||||||
[k.textobjects.goto_previous_start.class_outer] = "@class.outer",
|
[k.ts_ps_class_outer] = "@class.outer",
|
||||||
[k.textobjects.goto_previous_start.parameter_inner] = "@parameter.inner",
|
[k.ts_ps_parameter_inner] = "@parameter.inner",
|
||||||
},
|
},
|
||||||
goto_previous_end = {
|
goto_previous_end = {
|
||||||
[k.textobjects.goto_previous_end.function_outer] = "@function.outer",
|
[k.ts_pe_function_outer] = "@function.outer",
|
||||||
[k.textobjects.goto_previous_end.class_outer] = "@class.outer",
|
[k.ts_pe_class_outer] = "@class.outer",
|
||||||
[k.textobjects.goto_previous_end.parameter_inner] = "@parameter.inner",
|
[k.ts_pe_parameter_inner] = "@parameter.inner",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
local k = require("lazyvim.keymaps").get_keymaps().ui
|
local k = require("lazyvim.keymaps").get_keymaps()
|
||||||
|
|
||||||
return {
|
return {
|
||||||
-- Better `vim.notify()`
|
-- Better `vim.notify()`
|
||||||
|
|
@ -6,7 +6,7 @@ return {
|
||||||
"rcarriga/nvim-notify",
|
"rcarriga/nvim-notify",
|
||||||
keys = {
|
keys = {
|
||||||
{
|
{
|
||||||
k.nvim_notify.dismiss_all_notifications,
|
k.nvimnotify_dismiss_all_notifications,
|
||||||
function()
|
function()
|
||||||
require("notify").dismiss({ silent = true, pending = true })
|
require("notify").dismiss({ silent = true, pending = true })
|
||||||
end,
|
end,
|
||||||
|
|
@ -42,29 +42,29 @@ return {
|
||||||
"akinsho/bufferline.nvim",
|
"akinsho/bufferline.nvim",
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
keys = {
|
keys = {
|
||||||
{ k.bufferline.toggle_pin, "<Cmd>BufferLineTogglePin<CR>", desc = "Toggle Pin" },
|
{ k.bufferline_toggle_pin, "<Cmd>BufferLineTogglePin<CR>", desc = "Toggle Pin" },
|
||||||
{
|
{
|
||||||
k.bufferline.delete_non_pinned_buffers,
|
k.bufferline_delete_non_pinned_buffers,
|
||||||
"<Cmd>BufferLineGroupClose ungrouped<CR>",
|
"<Cmd>BufferLineGroupClose ungrouped<CR>",
|
||||||
desc = "Delete Non-Pinned Buffers",
|
desc = "Delete Non-Pinned Buffers",
|
||||||
},
|
},
|
||||||
{ k.bufferline.delete_other_buffers, "<Cmd>BufferLineCloseOthers<CR>", desc = "Delete Other Buffers" },
|
{ k.bufferline_delete_other_buffers, "<Cmd>BufferLineCloseOthers<CR>", desc = "Delete Other Buffers" },
|
||||||
{
|
{
|
||||||
k.bufferline.delete_buffers_to_the_right,
|
k.bufferline_delete_buffers_to_the_right,
|
||||||
"<Cmd>BufferLineCloseRight<CR>",
|
"<Cmd>BufferLineCloseRight<CR>",
|
||||||
desc = "Delete Buffers to the Right",
|
desc = "Delete Buffers to the Right",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
k.bufferline.delete_buffers_to_the_left,
|
k.bufferline_delete_buffers_to_the_left,
|
||||||
"<Cmd>BufferLineCloseLeft<CR>",
|
"<Cmd>BufferLineCloseLeft<CR>",
|
||||||
desc = "Delete Buffers to the Left",
|
desc = "Delete Buffers to the Left",
|
||||||
},
|
},
|
||||||
{ k.bufferline.prev_buffer, "<cmd>BufferLineCyclePrev<cr>", desc = "Prev Buffer" },
|
{ k.bufferline_prev_buffer, "<cmd>BufferLineCyclePrev<cr>", desc = "Prev Buffer" },
|
||||||
{ k.bufferline.next_buffer, "<cmd>BufferLineCycleNext<cr>", desc = "Next Buffer" },
|
{ k.bufferline_next_buffer, "<cmd>BufferLineCycleNext<cr>", desc = "Next Buffer" },
|
||||||
{ k.bufferline.prev_buffer_alt, "<cmd>BufferLineCyclePrev<cr>", desc = "Prev Buffer" },
|
{ k.bufferline_prev_buffer_alt, "<cmd>BufferLineCyclePrev<cr>", desc = "Prev Buffer" },
|
||||||
{ k.bufferline.next_buffer_alt, "<cmd>BufferLineCycleNext<cr>", desc = "Next Buffer" },
|
{ k.bufferline_next_buffer_alt, "<cmd>BufferLineCycleNext<cr>", desc = "Next Buffer" },
|
||||||
{ k.bufferline.move_buffer_prev, "<cmd>BufferLineMovePrev<cr>", desc = "Move buffer prev" },
|
{ k.bufferline_move_buffer_prev, "<cmd>BufferLineMovePrev<cr>", desc = "Move buffer prev" },
|
||||||
{ k.bufferline.move_buffer_next, "<cmd>BufferLineMoveNext<cr>", desc = "Move buffer next" },
|
{ k.bufferline_move_buffer_next, "<cmd>BufferLineMoveNext<cr>", desc = "Move buffer next" },
|
||||||
},
|
},
|
||||||
opts = {
|
opts = {
|
||||||
options = {
|
options = {
|
||||||
|
|
@ -240,7 +240,7 @@ return {
|
||||||
"lukas-reineke/indent-blankline.nvim",
|
"lukas-reineke/indent-blankline.nvim",
|
||||||
event = "LazyFile",
|
event = "LazyFile",
|
||||||
opts = function()
|
opts = function()
|
||||||
LazyVim.toggle.map(k.indent_blankline.toggle, {
|
LazyVim.toggle.map(k.indentblankline_toggle, {
|
||||||
name = "Indention Guides",
|
name = "Indention Guides",
|
||||||
get = function()
|
get = function()
|
||||||
return require("ibl.config").get_config(0).enabled
|
return require("ibl.config").get_config(0).enabled
|
||||||
|
|
@ -309,15 +309,15 @@ return {
|
||||||
},
|
},
|
||||||
-- stylua: ignore
|
-- stylua: ignore
|
||||||
keys = {
|
keys = {
|
||||||
{ k.noice.prefix, "", desc = "+noice"},
|
{ k.noice_prefix, "", desc = "+noice"},
|
||||||
{ k.noice.redirect_cmdline, function() require("noice").redirect(vim.fn.getcmdline()) end, mode = "c", desc = "Redirect Cmdline" },
|
{ k.noice_redirect_cmdline, function() require("noice").redirect(vim.fn.getcmdline()) end, mode = "c", desc = "Redirect Cmdline" },
|
||||||
{ k.noice.last_message, function() require("noice").cmd("last") end, desc = "Noice Last Message" },
|
{ k.noice_last_message, function() require("noice").cmd("last") end, desc = "Noice Last Message" },
|
||||||
{ k.noice.history, function() require("noice").cmd("history") end, desc = "Noice History" },
|
{ k.noice_history, function() require("noice").cmd("history") end, desc = "Noice History" },
|
||||||
{ k.noice.all, function() require("noice").cmd("all") end, desc = "Noice All" },
|
{ k.noice_all, function() require("noice").cmd("all") end, desc = "Noice All" },
|
||||||
{ k.noice.dismiss, function() require("noice").cmd("dismiss") end, desc = "Dismiss All" },
|
{ k.noice_dismiss, function() require("noice").cmd("dismiss") end, desc = "Dismiss All" },
|
||||||
{ k.noice.pick, function() require("noice").cmd("pick") end, desc = "Noice Picker (Telescope/FzfLua)" },
|
{ k.noice_pick, function() require("noice").cmd("pick") end, desc = "Noice Picker (Telescope/FzfLua)" },
|
||||||
{ k.noice.scroll_forward, function() if not require("noice.lsp").scroll(4) then return "<c-f>" end end, silent = true, expr = true, desc = "Scroll Forward", mode = {"i", "n", "s"} },
|
{ k.noice_scroll_forward, function() if not require("noice.lsp").scroll(4) then return "<c-f>" end end, silent = true, expr = true, desc = "Scroll Forward", mode = {"i", "n", "s"} },
|
||||||
{ k.noice.scroll_backward, function() if not require("noice.lsp").scroll(-4) then return "<c-b>" end end, silent = true, expr = true, desc = "Scroll Backward", mode = {"i", "n", "s"}},
|
{ k.noice_scroll_backward, function() if not require("noice.lsp").scroll(-4) then return "<c-b>" end end, silent = true, expr = true, desc = "Scroll Backward", mode = {"i", "n", "s"}},
|
||||||
},
|
},
|
||||||
config = function(_, opts)
|
config = function(_, opts)
|
||||||
-- HACK: noice shows messages from before it was enabled,
|
-- HACK: noice shows messages from before it was enabled,
|
||||||
|
|
@ -374,49 +374,49 @@ return {
|
||||||
action = "lua LazyVim.pick()()",
|
action = "lua LazyVim.pick()()",
|
||||||
desc = " Find File",
|
desc = " Find File",
|
||||||
icon = " ",
|
icon = " ",
|
||||||
key = k.dashboard.find_file,
|
key = k.dashboard_find_file,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
action = "ene | startinsert",
|
action = "ene | startinsert",
|
||||||
desc = " New File",
|
desc = " New File",
|
||||||
icon = " ",
|
icon = " ",
|
||||||
key = k.dashboard.new_file,
|
key = k.dashboard_new_file,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
action = 'lua LazyVim.pick("oldfiles")()',
|
action = 'lua LazyVim.pick("oldfiles")()',
|
||||||
desc = " Recent Files",
|
desc = " Recent Files",
|
||||||
icon = " ",
|
icon = " ",
|
||||||
key = k.dashboard.recent_files,
|
key = k.dashboard_recent_files,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
action = 'lua LazyVim.pick("live_grep")()',
|
action = 'lua LazyVim.pick("live_grep")()',
|
||||||
desc = " Find Text",
|
desc = " Find Text",
|
||||||
icon = " ",
|
icon = " ",
|
||||||
key = k.dashboard.find_text,
|
key = k.dashboard_find_text,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
action = "lua LazyVim.pick.config_files()()",
|
action = "lua LazyVim.pick()()",
|
||||||
desc = " Config",
|
desc = " Config",
|
||||||
icon = " ",
|
icon = " ",
|
||||||
key = k.dashboard.config,
|
key = k.dashboard_config,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
action = 'lua require("persistence").load()',
|
action = 'lua require("persistence").load()',
|
||||||
desc = " Restore Session",
|
desc = " Restore Session",
|
||||||
icon = " ",
|
icon = " ",
|
||||||
key = k.dashboard.restore_session,
|
key = k.dashboard_restore_session,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
action = "LazyExtras",
|
action = "LazyExtras",
|
||||||
desc = " Lazy Extras",
|
desc = " Lazy Extras",
|
||||||
icon = " ",
|
icon = " ",
|
||||||
key = k.dashboard.lazy_extras,
|
key = k.dashboard_lazy_extras,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
action = "Lazy",
|
action = "Lazy",
|
||||||
desc = " Lazy",
|
desc = " Lazy",
|
||||||
icon = " ",
|
icon = " ",
|
||||||
key = k.dashboard.lazy,
|
key = k.dashboard_lazy,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
action = function()
|
action = function()
|
||||||
|
|
@ -424,7 +424,7 @@ return {
|
||||||
end,
|
end,
|
||||||
desc = " Quit",
|
desc = " Quit",
|
||||||
icon = " ",
|
icon = " ",
|
||||||
key = k.dashboard.quit,
|
key = k.dashboard_quit,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
local k = require("lazyvim.keymaps").get_keymaps().util.persistence
|
local k = require("lazyvim.keymaps").get_keymaps()
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
||||||
|
|
@ -11,10 +11,10 @@ return {
|
||||||
opts = {},
|
opts = {},
|
||||||
-- stylua: ignore
|
-- stylua: ignore
|
||||||
keys = {
|
keys = {
|
||||||
{ k.restore_session, function() require("persistence").load() end, desc = "Restore Session" },
|
{ k.persistence_restore_session, function() require("persistence").load() end, desc = "Restore Session" },
|
||||||
{ k.select_session, function() require("persistence").select() end,desc = "Select Session" },
|
{ k.persistence_select_session, function() require("persistence").select() end,desc = "Select Session" },
|
||||||
{ k.restore_last_session, function() require("persistence").load({ last = true }) end, desc = "Restore Last Session" },
|
{ k.persistence_restore_last_session, function() require("persistence").load({ last = true }) end, desc = "Restore Last Session" },
|
||||||
{ k.skip_current_session, function() require("persistence").stop() end, desc = "Don't Save Current Session" },
|
{ k.persistence_skip_current_session, function() require("persistence").stop() end, desc = "Don't Save Current Session" },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
local k = require("lazyvim.keymaps").get_keymaps().util.mini_pairs
|
local k = require("lazyvim.keymaps").get_keymaps()
|
||||||
|
|
||||||
---@class lazyvim.util.mini
|
---@class lazyvim.util.mini
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
@ -123,7 +123,7 @@ end
|
||||||
|
|
||||||
---@param opts {skip_next: string, skip_ts: string[], skip_unbalanced: boolean, markdown: boolean}
|
---@param opts {skip_next: string, skip_ts: string[], skip_unbalanced: boolean, markdown: boolean}
|
||||||
function M.pairs(opts)
|
function M.pairs(opts)
|
||||||
LazyVim.toggle.map(k.toggle, {
|
LazyVim.toggle.map(k.minipairs_toggle, {
|
||||||
name = "Mini Pairs",
|
name = "Mini Pairs",
|
||||||
get = function()
|
get = function()
|
||||||
return not vim.g.minipairs_disable
|
return not vim.g.minipairs_disable
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue