New plugins
This commit is contained in:
parent
8d2bf49223
commit
86ccf3bb2d
2
init.lua
2
init.lua
@ -18,4 +18,6 @@ end
|
||||
|
||||
dofile(vim.g.base46_cache .. "defaults")
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
vim.api.nvim_command "packadd cfilter"
|
||||
vim.api.nvim_command "packadd justify"
|
||||
require "plugins"
|
||||
|
||||
@ -112,7 +112,14 @@ M.customstuffs = {
|
||||
-- Mappings: TODO
|
||||
|
||||
-- "trim(system('git branch --show-current 2>/dev/null'))"
|
||||
["<leader>tt"] = { ":call append(line('.') - 1, repeat(' ', indent('.')) . '# TODO-' . trim(system('git branch --show-current 2>/dev/null')) . ': ' . input('Comment >'))<CR>", "Add TODO comment + add to quickfix list" },
|
||||
-- ["<leader>tt"] = { ":call append(line('.') - 1, repeat(' ', indent('.')) . '# TODO-' . trim(system('git branch --show-current 2>/dev/null')) . ': ' . input('Comment >'))<CR>", "Add TODO comment + add to quickfix list" },
|
||||
["<leader>tt"] = { ":call append(line('.') - 1, repeat(' ', indent('.')) . '# TODO: ' . input('Comment >'))<CR>", "Add TODO comment + add to quickfix list" },
|
||||
|
||||
["<leader>ww"] = { ":lua require('nvim-window').pick()<CR>", "Pick window to goto" },
|
||||
["<leader>wm"] = { ":WinShift<CR>", "Enter move window mode" },
|
||||
["<leader>ws"] = { ":WinShift swap<CR>", "Swap window, with selection" },
|
||||
|
||||
["<leader>gg"] = { ":LazyGit<CR>", "Open lazygit" },
|
||||
},
|
||||
v = {
|
||||
["n"] = { "nzz", "Next + auto center" },
|
||||
@ -328,9 +335,15 @@ M.telescope = {
|
||||
["<C-b>"] = { "<cmd> Telescope buffers <CR>", "Find buffers" },
|
||||
|
||||
["<leader>fg"] = { "<cmd> lua require('telescope.builtin').live_grep({default_text=vim.fn.getreg('/')}) <CR>", "Live grep with actual search value as prefix" },
|
||||
["<leader>gf"] = { "<cmd> lua require('telescope.builtin').find_files({default_text=vim.fn.getreg('/')}) <CR>", "Live grep with actual search value as prefix" },
|
||||
["<leader>ac"] = { ":execute 'vimgrep' input('Pattern >', getreg('/')) '**/*' <CR>", "add search term files in quickfix list" },
|
||||
["<leader>qc"] = { "<cmd> Telescope quickfix <CR>", "Show quickfix list" },
|
||||
["<leader>qr"] = { ":execute 'cdo' '%s/' . input('Search term >', getreg('/')) . '/' . input('Replace by >', getreg('')) . '/g | update' <CR>", "Replace pattern in all quickfix list" },
|
||||
-- ["<leader>qr"] = { ":execute 'cdo' '%s/' . input('Search term >', getreg('/')) . '/' . input('Replace by >', getreg('')) . '/g | update' <CR>", "Replace pattern in all quickfix list" },
|
||||
["<leader>qr"] = { ":cdo '%s/' . input('Search term >', getreg('/')) . '/' . input('Replace by >', '') . '/g | update' <CR>", "Replace pattern in all quickfix list" },
|
||||
["<leader>br"] = { ":execute '%s/' . input('Search term >', getreg('/')) . '/' . input('Replace by >', '') . '/g | update' <CR>", "Replace pattern in current buffer" },
|
||||
|
||||
["<leader>ql"] = { "<cmd> Telescope quickfix <CR>", "Show quickfix list" },
|
||||
["<leader>qn"] = { ":cnext<CR>", "Jump to next in quickfix list" },
|
||||
["<leader>qp"] = { ":cprevious<CR>", "Jump to previous in quickfix list" },
|
||||
|
||||
["<leader>ll"] = { "<cmd> Telescope loclist <CR>", "Show loclist list" },
|
||||
["<leader>ln"] = { ":lnext<CR>", "Jump to next in loclist" },
|
||||
@ -340,6 +353,8 @@ M.telescope = {
|
||||
["<leader>fo"] = { "<cmd> Telescope oldfiles <CR>", "Find oldfiles" },
|
||||
["<leader>fz"] = { "<cmd> Telescope current_buffer_fuzzy_find <CR>", "Find in current buffer" },
|
||||
|
||||
["<leader>wl"] = { "<cmd> Telescope workspaces <CR>", "Find workspaces" },
|
||||
|
||||
-- git
|
||||
--- Commits
|
||||
["<leader>gc"] = { "<cmd> lua require('custom.telescope').my_git_commits()<CR>", "Custom Git commits" },
|
||||
@ -362,6 +377,10 @@ M.telescope = {
|
||||
-- History
|
||||
["<leader>ch"] = { "<cmd> Telescope command_history <CR>", "telescope commands history" },
|
||||
["<leader>/"] = { "<cmd> Telescope search_history <CR>", "telescope search history" },
|
||||
|
||||
-- Diaglist: LSP diagnostics in quick/loc list
|
||||
["<leader>dw"] = { "<cmd>lua require('diaglist').open_all_diagnostics()<CR>", "Open all open buffers diagnostics in quickfix list" },
|
||||
["<leader>d0"] = { "<cmd>lua require('diaglist').open_buffer_diagnostics()<CR>", "Open current buffer diagnostics in loclist list" },
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@ -40,7 +40,8 @@ require('lspconfig').ruff_lsp.setup {
|
||||
init_options = {
|
||||
settings = {
|
||||
-- Any extra CLI arguments for `ruff` go here.
|
||||
args = {},
|
||||
args = {"--ignore", "E741"},
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -168,7 +168,7 @@ local options = {
|
||||
}
|
||||
},
|
||||
|
||||
extensions_list = { "themes", "terms", "fzf" },
|
||||
extensions_list = { "themes", "terms", "fzf", "macrothis" },
|
||||
extensions = {
|
||||
fzf = {
|
||||
fuzzy = true,
|
||||
|
||||
@ -236,6 +236,97 @@ local default_plugins = {
|
||||
end,
|
||||
},
|
||||
|
||||
-- Save and load macro / register
|
||||
{
|
||||
"desdic/macrothis.nvim",
|
||||
opts = {},
|
||||
keys = {
|
||||
{ "<Leader>kkd", function() require('macrothis').delete() end, desc = "Delete" },
|
||||
{ "<Leader>kke", function() require('macrothis').edit() end, desc = "Edit" },
|
||||
{ "<Leader>kkl", function() require('macrothis').load() end, desc = "Load" },
|
||||
{ "<Leader>kkn", function() require('macrothis').rename() end, desc = "Rename" },
|
||||
{ "<Leader>kkq", function() require('macrothis').quickfix() end, desc = "Run macro on all files in quickfix" },
|
||||
{ "<Leader>kkr", function() require('macrothis').run() end, desc = "Run macro" },
|
||||
{ "<Leader>kks", function() require('macrothis').save() end, desc = "Save" },
|
||||
{ "<Leader>kkx", function() require('macrothis').register() end, desc = "Edit register" },
|
||||
{ "<Leader>kkp", function() require('macrothis').copy_register_printable() end, desc = "Copy register as printable" },
|
||||
{ "<Leader>kkm", function() require('macrothis').copy_macro_printable() end, desc = "Copy macro as printable" },
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"onsails/diaglist.nvim",
|
||||
lazy=false,
|
||||
debug=false,
|
||||
},
|
||||
|
||||
{
|
||||
"natecraddock/workspaces.nvim",
|
||||
lazy=false,
|
||||
|
||||
config = function()
|
||||
require("workspaces").setup({
|
||||
hooks = {
|
||||
open = {"Telescope find_files"},
|
||||
}
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
{
|
||||
"mangelozzi/rgflow.nvim",
|
||||
lazy=false,
|
||||
|
||||
config = function()
|
||||
require("rgflow").setup({
|
||||
-- Set the default rip grep flags and options for when running a search via
|
||||
-- RgFlow. Once changed via the UI, the previous search flags are used for
|
||||
-- each subsequent search (until Neovim restarts).
|
||||
cmd_flags = "--smart-case --fixed-strings --ignore --max-columns 200",
|
||||
|
||||
-- Mappings to trigger RgFlow functions
|
||||
default_trigger_mappings = true,
|
||||
-- These mappings are only active when the RgFlow UI (panel) is open
|
||||
default_ui_mappings = true,
|
||||
-- QuickFix window only mapping
|
||||
default_quickfix_mappings = true,
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
{
|
||||
"yorickpeterse/nvim-window",
|
||||
lazy=false,
|
||||
config = function()
|
||||
require('nvim-window').setup({
|
||||
normal_hl = 'Normal',
|
||||
hint_hl = 'Bold',
|
||||
border = 'single'
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
{
|
||||
"sindrets/winshift.nvim",
|
||||
lazy=false,
|
||||
},
|
||||
|
||||
{
|
||||
"kdheepak/lazygit.nvim",
|
||||
lazy=false,
|
||||
config = function()
|
||||
require("lazy").setup({
|
||||
{
|
||||
"kdheepak/lazygit.nvim",
|
||||
-- optional for floating window border decoration
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
-- file managing , picker etc
|
||||
{
|
||||
"nvim-tree/nvim-tree.lua",
|
||||
@ -277,6 +368,7 @@ local default_plugins = {
|
||||
-- Only load whichkey after all the gui
|
||||
{
|
||||
"folke/which-key.nvim",
|
||||
lazy=false,
|
||||
keys = { "<leader>", '"', "'", "`", "c", "v" },
|
||||
init = function()
|
||||
require("core.utils").load_mappings "whichkey"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user