add hyprlang stuff

This commit is contained in:
2025-02-20 04:18:32 -08:00
parent f4e0406181
commit dc29310cf1
8 changed files with 105 additions and 32 deletions

View File

@@ -6,6 +6,7 @@ local term_factory = term.term_factory
local term_toggle = term.term_toggle
local opts = { silent = true, noremap = true }
local nosilent = { noremap = true }
-- Leader key
vim.g.mapleader = " "
@@ -204,16 +205,22 @@ local lsp_mappings = {
local code_companion_mappings = {
{ mode = "n", key = "<leader>cp", cmd = ":vert Copilot panel<CR>", group = "Code" },
{ mode = "n", key = "<leader>oc", cmd = ":CodeCompanionChat Toggle<CR>", group = "Open" },
{ mode = "n", key = "<leader>Cc", cmd = ":CodeCompanionChat Toggle<CR>", group = "CodeCompanion" },
{ mode = "n", key = "<leader>Ci", cmd = ":CodeCompanion ", group = "CodeCompanion" },
{ mode = "n", key = "<leader>CT", cmd = ":CodeCompanionChat Toggle<CR>", group = "CodeCompanion" },
{ mode = "n", key = "<leader>Ca", cmd = ":CodeCompanionActions<CR>", group = "CodeCompanion" },
{ mode = "v", key = "<leader>Cc", cmd = ":CodeCompanionChat Add<CR>", group = "CodeCompanion" },
{ mode = "v", key = "<leader>Ci", cmd = ":CodeCompanion /buffer ", group = "CodeCompanion" },
{ mode = "v", key = "<leader>Ce", cmd = ":CodeCompanion /explain<CR>", group = "CodeCompanion" },
{ mode = "v", key = "<leader>Cf", cmd = ":CodeCompanion /fix<CR>", group = "CodeCompanion" },
{ mode = "v", key = "<leader>Cl", cmd = ":CodeCompanion /lsp<CR>", group = "CodeCompanion" },
{ mode = "v", key = "<leader>Ct", cmd = ":CodeCompanion /tests<CR>", group = "CodeCompanion" },
{ mode = "n", key = "<leader>Cc", cmd = ":CodeCompanionChat Toggle<CR>", group = "CodeCompanionChat" },
{ mode = "n", key = "<leader>Ci", cmd = ":CodeCompanion ", group = "Inline CodeCompanion", opts = nosilent },
{ mode = "n", key = "<leader>CT", cmd = ":CodeCompanionChat Toggle<CR>", group = "CodeCompanion Toggle" },
{ mode = "n", key = "<leader>Ca", cmd = ":CodeCompanionActions<CR>", group = "CodeCompanion Actions" },
{ mode = "v", key = "<leader>Cc", cmd = ":CodeCompanionChat Add<CR>", group = "CodeCompanion Add" },
{
mode = "v",
key = "<leader>Ci",
cmd = ":CodeCompanion /buffer ",
group = "CodeCompanion /buffer",
opts = nosilent,
},
{ mode = "v", key = "<leader>Ce", cmd = ":CodeCompanion /explain<CR>", group = "CodeCompanion /explain" },
{ mode = "v", key = "<leader>Cf", cmd = ":CodeCompanion /fix<CR>", group = "CodeCompanion /fix" },
{ mode = "v", key = "<leader>Cl", cmd = ":CodeCompanion /lsp<CR>", group = "CodeCompanion /lsp" },
{ mode = "v", key = "<leader>Ct", cmd = ":CodeCompanion /tests<CR>", group = "CodeCompanion /tests" },
}
-- }}}
@@ -391,12 +398,16 @@ local noice_mappings = {
-- {{{ ODIS Mappings
local odis_mappings = {
{ mode = "n", key = "<leader>dv", cmd = ':lua require("odis").show_documentation("vsplit")<CR>', group = "ODIS" },
{ mode = "n", key = "<leader>dh", cmd = ':lua require("odis").show_documentation("vsplit")<CR>', group = "ODIS" },
{ mode = "n", key = "<leader>db", cmd = ':lua require("odis").show_documentation("vsplit")<CR>', group = "ODIS" },
{ mode = "n", key = "<leader>dt", cmd = ':lua require("odis").show_documentation("vsplit")<CR>', group = "ODIS" },
{ mode = "n", key = "<leader>dt", cmd = ':lua require("odis").show_documentation("vsplit")<CR>', group = "ODIS" },
-- { mode = "n", key = "<leader>dc", cmd = 'require("odis").close_float()' },
{
mode = "n",
key = "<leader>dv",
cmd = ':lua require("odis").show_documentation("vsplit")<CR>',
group = "Vertical split",
},
{ mode = "n", key = "<leader>dh", cmd = ':lua require("odis").show_documentation("split")<CR>', group = "Split" },
{ mode = "n", key = "<leader>db", cmd = ':lua require("odis").show_documentation("buffer")<CR>', group = "Buffer" },
{ mode = "n", key = "<leader>dt", cmd = ':lua require("odis").show_documentation("tab")<CR>', group = "Tab" },
{ mode = "n", key = "<leader>df", cmd = ':lua require("odis").show_documentation("float")<CR>', group = "Float" },
}
-- }}}
@@ -407,7 +418,7 @@ local diffview_mappings = {
mode = "n",
key = "<leader>gdo",
cmd = ":DiffviewOpen<CR>",
group = "Git",
group = "DiffviewOpen",
},
{
@@ -537,4 +548,5 @@ add_to_whichkey(map_from_table(workspace_management_mappings))
add_to_whichkey(map_from_table(noice_mappings))
add_to_whichkey(map_from_table(odis_mappings))
add_to_whichkey(map_from_table(diffview_mappings))
add_to_whichkey(nil, { key = "<leader>dc", group = "Close" })
--}}}