Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
SingularisArt committed May 4, 2024
1 parent 7967f8e commit 92dad07
Show file tree
Hide file tree
Showing 7 changed files with 126 additions and 109 deletions.
Binary file modified aspects/dotfiles/files/.local/share/autojump/autojump.txt
Binary file not shown.
Binary file modified aspects/dotfiles/files/.local/share/autojump/autojump.txt.bak
Binary file not shown.
1 change: 0 additions & 1 deletion aspects/nvim/files/.config/nvim/lua/config/lazy.lua
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ function Lazyload()
loader("lsp_signature.nvim")

loader("navigator.lua")
loader("pretty_hover")
loader("fidget.nvim")
loader("inlay-hints.nvim")
loader("null-ls.nvim")
Expand Down
23 changes: 22 additions & 1 deletion aspects/nvim/files/.config/nvim/lua/modules/editor/plugins.lua
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,34 @@ return function(use)
cmd = "UndotreeToggle",
})

use({
"ThePrimeagen/harpoon",
opts = {},
keys = {
{ "L", function() require("harpoon.ui").nav_next() end },
{ "H", function() require("harpoon.ui").nav_prev() end },
{ "<Leader>pt", "<CMD>Telescope harpoon marks<CR>" },
{ "<Leader>pa", function() require("harpoon.mark").add_file() end },
{ "<Leader>pu", function() require("harpoon.ui").toggle_quick_menu() end },
{ "<Leader>p1", function() require("harpoon.ui").nav_file(1) end },
{ "<Leader>p2", function() require("harpoon.ui").nav_file(2) end },
{ "<Leader>p3", function() require("harpoon.ui").nav_file(3) end },
{ "<Leader>p4", function() require("harpoon.ui").nav_file(4) end },
{ "<Leader>p5", function() require("harpoon.ui").nav_file(5) end },
{ "<Leader>p6", function() require("harpoon.ui").nav_file(6) end },
{ "<Leader>p7", function() require("harpoon.ui").nav_file(7) end },
{ "<Leader>p8", function() require("harpoon.ui").nav_file(8) end },
{ "<Leader>p9", function() require("harpoon.ui").nav_file(9) end },
},
})

use({
"rmagatti/alternate-toggler",
config = function()
require("alternate-toggler").setup({})
end,
keys = {
{ "<Leader>t", "<CMD>lua require('alternate-toggler').toggleAlternate()<CR>" },
{ "<Leader>t", function() require("alternate-toggler").toggleAlternate() end },
},
})

Expand Down
29 changes: 14 additions & 15 deletions aspects/nvim/files/.config/nvim/lua/modules/lsp/handlers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,11 @@ lsp.attach_mappings = function(_, bufnr)
f = { "<CMD>lua vim.lsp.buf.format { async = true }<CR>", "Format" },
r = { "<CMD>lua vim.lsp.buf.rename()<CR>", "Rename" },
i = { "<CMD>LspInfo<CR>", "LSP info" },
o = { "<CMD>SymbolsOutline<CR>", "Symbols Outline" },
o = { "<CMD>OutlineOpen<CR>", "Symbols Outline" },
j = { "<CMD>lua vim.diagnostic.goto_next()<CR>", "Go to next diagnostic" },
k = { "<CMD>lua vim.diagnostic.goto_prev()<CR>", "Go to previous diagnostic" },
l = { "<CMD>lua require('lsp_lines').toggle()<CR>", "Toggle LSP Lines" },
s = { "<CMD>lua vim.lsp.buf.signature_help()<CR>", "Signature" },
S = { "<CMD>LspSymbols<CR>", "Toggle symbols outline" },
D = { "<cmd>Telescope lsp_document_symbols<cr>", "Document Symbols" },
d = {
name = "Definition",
Expand Down Expand Up @@ -127,19 +126,19 @@ lsp.on_attach = function(client, bufnr)

lsp.capabilities = client.config.capabilities

-- if client.resolved_capabilities.code_lens then
-- local codelens = vim.api.nvim_create_augroup(
-- "LSPCodeLens",
-- { clear = true }
-- )
-- vim.api.nvim_create_autocmd({ "BufEnter", "InsertLeave", "CursorHold" }, {
-- group = codelens,
-- callback = function()
-- vim.lsp.codelens.refresh()
-- end,
-- buffer = bufnr,
-- })
-- end
if client.resolved_capabilities.code_lens then
local codelens = vim.api.nvim_create_augroup(
"LSPCodeLens",
{ clear = true }
)
vim.api.nvim_create_autocmd({ "BufEnter", "InsertLeave", "CursorHold" }, {
group = codelens,
callback = function()
vim.lsp.codelens.refresh()
end,
buffer = bufnr,
})
end
end

return lsp
179 changes: 87 additions & 92 deletions aspects/nvim/files/.config/nvim/lua/modules/ui/which-key.lua
Original file line number Diff line number Diff line change
Expand Up @@ -62,49 +62,58 @@ vars.vmappings["/"] = {
"Comment",
}

vars.mappings["v"] = { "<CMD>vsplit<CR>", "Vertical Split" }
vars.mappings["h"] = { "<CMD>split<CR>", "Horizontal Split" }
vars.mappings[" "] = { "<CMD>normal <C-^><CR>", "Jump to previous buffer" }
vars.mappings["/"] = { "<CMD>lua require('Comment.api').toggle.linewise()<CR>", "Comment out current line" }
vars.mappings["-"] = { require("lir.float").toggle, "Toggle Lir" }
vars.mappings["/"] = { require("Comment.api").toggle.linewise, "Comment out current line" }
vars.mappings["a"] = { require("harpoon.mark").add_file, "Add file to harpoon" }
vars.mappings["e"] = { "<CMD>Neotree toggle<CR>", "Toggle NeoTree" }
vars.mappings["-"] = { "<CMD>lua require('lir.float').toggle()<CR>", "Toggle Lir" }
vars.mappings["z"] = { "<CMD>ZenMode<CR>", "Zen Mode" }
vars.mappings["t"] = { "<CMD>lua require('alternate-toggler').toggleAlternate()<CR>", "Alternate" }
vars.mappings["p"] = { "<CMD>Pantran<CR>", "Translate" }
vars.mappings["h"] = { vim.cmd.split, "Horizontal Split" }
vars.mappings["t"] = { require("alternate-toggler").toggleAlternate, "Alternate" }
vars.mappings["v"] = { vim.cmd.vsplit, "Vertical Split" }
vars.mappings["z"] = { vim.cmd.ZenMode, "Zen Mode" }

vars.mappings["d"] = {
name = "Debug",
t = { require("dap").toggle_breakpoint, "Toggle Breakpoint" },
b = { require("dap").step_back, "Step Back" },
c = { require("dap").continue, "Continue" },
C = { require("dap").run_to_cursor, "Run To Cursor" },
d = { require("dap").disconnect, "Disconnect" },
g = { require("dap").session, "Get Session" },
i = { require("dap").step_into, "Step Into" },
o = { require("dap").step_over, "Step Over" },
u = { require("dap").step_out, "Step Out" },
p = { require("dap").pause, "Pause" },
r = { require("dap").repl.toggle, "Toggle Repl" },
s = { require("dap").continue, "Start" },
q = { require("dap").close, "Quit" },
U = { require("dapui").toggle, "Enable/Disable UI" },
}

vars.mappings["g"] = {
name = "Git",
j = { "<CMD>lua require('gitsigns').next_hunk()<CR>", "Next Hunk" },
k = { "<CMD>lua require('gitsigns').prev_hunk()<CR>", "Prev Hunk" },
l = { "<CMD>lua require('gitsigns').blame_line()<CR>", "Blame" },
p = { "<CMD>lua require('gitsigns').preview_hunk()<CR>", "Preview Hunk" },
m = { "<CMD>GitMessenger<CR>", "View message" },
r = { "<CMD>lua require('gitsigns').reset_hunk()<CR>", "Reset Hunk" },
R = { "<CMD>lua require('gitsigns').reset_buffer()<CR>", "Reset Buffer" },
s = { "<CMD>lua require('gitsigns').stage_hunk()<CR>", "Stage Hunk" },
u = {
"<CMD>lua require('gitsigns').undo_stage_hunk()<CR>",
"Undo Stage Hunk",
},
j = { require("gitsigns").next_hunk, "Next Hunk" },
k = { require("gitsigns").prev_hunk, "Prev Hunk" },
l = { require("gitsigns").blame_line, "Blame" },
p = { require("gitsigns").preview_hunk, "Preview Hunk" },
m = { vim.cmd.GitMessenger, "View message" },
r = { require("gitsigns").reset_hunk, "Reset Hunk" },
R = { require("gitsigns").reset_buffer, "Reset Buffer" },
s = { require("gitsigns").stage_hunk, "Stage Hunk" },
u = { require("gitsigns").undo_stage_hunk, "Undo Stage Hunk" },
o = { "<CMD>Telescope git_status<CR>", "Open changed file" },
b = { "<CMD>Telescope git_branches<CR>", "Checkout branch" },
c = { "<CMD>Telescope git_commits<CR>", "Checkout commit" },
C = {
"<CMD>Telescope git_bcommits<CR>",
"Checkout commit (for current file)",
},
d = {
"<CMD>Gitsigns diffthis HEAD<CR>",
"Git Diff",
},
C = { "<CMD>Telescope git_bcommits<CR>", "Checkout commit" },
d = { "<CMD>Gitsigns diffthis HEAD<CR>", "Git Diff" },
}

vars.mappings["G"] = {
name = "ChatGPT",
a = { "<CMD>ChatGPTActAs<CR>", "Have ChatGPT act as" },
c = { "<CMD>ChatGPTCompleteCode<CR>", "Have ChatGPT complete code" },
t = { "<CMD>ChatGPT<CR>", "Toggle ChatGPT" },
i = { "<CMD>ChatGPTEditWithInstructions<CR>", "Have ChatGPT edit with instructions" },
a = { vim.cmd.ChatGPTActAs, "Have ChatGPT act as" },
c = { vim.cmd.ChatGPTCompleteCode, "Have ChatGPT complete code" },
t = { vim.cmd.ChatGPT, "Toggle ChatGPT" },
i = { vim.cmd.ChatGPTEditWithInstructions, "Have ChatGPT edit with instructions" },
r = {
name = "Run",
a = { "<CMD>ChatGPTRun add_test<CR>", "Implement tests for the code" },
Expand All @@ -122,11 +131,52 @@ vars.mappings["G"] = {
},
}

vars.mappings["H"] = {
a = { "<CMD>lua require('harpoon.mark').add_file()<CR>", "Add file to harpoon" },
h = { "<CMD>lua require('harpoon.ui').toggle_quick_menu()<CR>", "View harpoon" },
n = { "<CMD>lua require('harpoon.ui').nav_next()<CR>", "Navigates to next harpoon mark" },
p = { "<CMD>lua require('harpoon.ui').nav_prev()<CR>", "Navigates to previous harpoon mark" },
vars.mappings["n"] = {
name = "Neotest",
a = { require("neotest").run.attach, "Attach to the nearest test" },
c = {
function()
require("neotest").run.run(vim.fn.expand("%"))
end,
"Run the current file",
},
d = {
function()
require("neotest").run.run({ strategy = "dap" })
end,
"Debug the nearest test",
},
e = {
function()
require("neotest").output.open({ enter = true, auto_close = true })
end,
"Open the output of a test result",
},
j = {
function()
require("neotest").jump.prev({ status = "failed" })
end,
"Jump to next error",
},
k = {
function()
require("neotest").jump.next({ status = "failed" })
end,
"Jump to previous error",
},
n = { require("neotest").run.run, "Run the nearest test" },
s = { require("neotest").run.stop, "Stop the nearest test" },
S = { require("neotest").summary.toggle, "Toggle the summary window" },
}

vars.mappings["r"] = {
name = "Refactor",
e = { "<CMD>lua require('refactoring').refactor('Extract Function')<CR>", "Extract Function" },
f = { "<CMD>lua require('refactoring').refactor('Extract Function to File')<CR>", "Extract Function to File" },
v = { "<CMD>lua require('refactoring').refactor('Extract Variable')<CR>", "Extract Variable" },
i = { "<CMD>lua require('refactoring').refactor('Inline Variable')<CR>", "Inline Variable" },
r = { "<CMD>lua require('telescope').extensions.refactoring.refactors()<CR>", "Refactor" },
V = { "<CMD>lua require('refactoring').debug.print_var({})<CR>", "Debug Print Var" },
}

vars.mappings["s"] = {
Expand All @@ -136,6 +186,7 @@ vars.mappings["s"] = {
b = { "<CMD>Telescope buffers<CR>", "Fuzzy find buffers" },
l = { "<CMD>Telescope live_grep<CR>", "Fuzzy find words" },
s = { "<CMD>Telescope symbols<CR>", "Fuzzy find symbols" },
h = { "<CMD>Telescope harpoon marks<CR>", "View harpoon" },
d = { "<CMD>Telescope diagnostics<CR>", "Fuzzy find diagnostics" },
n = { search_config_files, "Fuzzy find config files" },
c = {
Expand All @@ -149,62 +200,6 @@ vars.mappings["s"] = {
},
}

vars.mappings["m"] = {
name = "Muren",
t = { "<CMD>MurenToggle<CR>", "Toggle Muren" },
o = { "<CMD>MurenOpen<CR>", "Open Muren" },
c = { "<CMD>MurenClose<CR>", "Close Muren" },
f = { "<CMD>MurenFresh<CR>", "Open Muren fresh" },
u = { "<CMD>MurenUnique<CR>", "Toggle with all unique matches of the last search" },
}

vars.mappings["n"] = {
name = "Neotest",
a = { "<CMD>lua require('neotest').run.attach()<CR>", "Attach to the nearest test" },
c = { "<CMD>lua require('neotest').run.run(vim.fn.expand('%'))<CR>", "Run the current file" },
d = { "<CMD>lua require('neotest').run.run({strategy = 'dap'})<CR>", "Debug the nearest test" },
e = {
"<CMD>lua require('neotest').output.open({ enter = true, auto_close = true })<CR>",
"Open the output of a test result",
},
j = { "<CMD>lua require('neotest').jump.prev({ status = 'failed' })<CR>", "Jump to next error" },
k = { "<CMD>lua require('neotest').jump.next({ status = 'failed' })<CR>", "Jump to previous error" },
n = { "<CMD>lua require('neotest').run.run()<CR>", "Run the nearest test" },
s = { "<CMD>lua require('neotest').run.stop()<CR>", "Stop the nearest test" },
S = { "<CMD>lua require('neotest').summary.toggle()<CR>", "Toggle the summary window" },
}

vars.mappings["d"] = {
name = "Debug",
t = { "<CMD>lua require('dap').toggle_breakpoint()<CR>", "Toggle Breakpoint" },
b = { "<CMD>lua require('dap').step_back()<CR>", "Step Back" },
c = { "<CMD>lua require('dap').continue()<CR>", "Continue" },
C = { "<CMD>lua require('dap').run_to_cursor()<CR>", "Run To Cursor" },
d = { "<CMD>lua require('dap').disconnect()<CR>", "Disconnect" },
g = { "<CMD>lua require('dap').session()<CR>", "Get Session" },
i = { "<CMD>lua require('dap').step_into()<CR>", "Step Into" },
o = { "<CMD>lua require('dap').step_over()<CR>", "Step Over" },
u = { "<CMD>lua require('dap').step_out()<CR>", "Step Out" },
p = { "<CMD>lua require('dap').pause()<CR>", "Pause" },
r = { "<CMD>lua require('dap').repl.toggle()<CR>", "Toggle Repl" },
s = { "<CMD>lua require('dap').continue()<CR>", "Start" },
q = { "<CMD>lua require('dap').close()<CR>", "Quit" },
U = { "<CMD>lua require('dapui').toggle()<CR>", "Enable/Disable UI" },
}

vars.mappings["r"] = {
name = "Refactor",
e = { [[ <ESC><CMD>lua require('refactoring').refactor('Extract Function')<CR>]], "Extract Function" },
f = {
[[ <ESC><CMD>lua require('refactoring').refactor('Extract Function to File')<CR>]],
"Extract Function to File",
},
v = { [[ <ESC><CMD>lua require('refactoring').refactor('Extract Variable')<CR>]], "Extract Variable" },
i = { [[ <ESC><CMD>lua require('refactoring').refactor('Inline Variable')<CR>]], "Inline Variable" },
r = { [[ <ESC><CMD>lua require('telescope').extensions.refactoring.refactors()<CR>]], "Refactor" },
V = { [[ <ESC><CMD>lua require('refactoring').debug.print_var({})<CR>]], "Debug Print Var" },
}

local which_key = require("which-key")

which_key.setup(setup)
Expand Down
3 changes: 3 additions & 0 deletions aspects/nvim/files/.config/nvim/selene.toml
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
std="lua51+vim"

[rules]
mixed_table = "allow"

0 comments on commit 92dad07

Please sign in to comment.