astro-nvim-v3 turn on documents keybinding

This commit is contained in:
huyjaky
2024-07-23 16:18:10 +07:00
parent 16fdd07140
commit 31b13443c7
4 changed files with 14 additions and 10 deletions

1
AstroNvim Submodule

Submodule AstroNvim added at 7d7e3f124d

View File

@@ -23,13 +23,14 @@ return function()
----------- Utility functions ------------- ----------- Utility functions -------------
------------------------------------------- -------------------------------------------
mappings.n["<C-z>"] = { "u", desc = "Undo" } mappings.n["<C-z>"] = { "u", desc = "Undo" }
-- mappings.n["<S-k>"] = { "u", desc = "Undo" }
mappings.n["K"] = { function() vim.lsp.buf.hover() end, desc = "Hover symbol details"}
mappings.i["<C-z>"] = { "<C-o>u", desc = "Undo" } mappings.i["<C-z>"] = { "<C-o>u", desc = "Undo" }
mappings.i["<C-Del>"] = { "<C-o>dw", desc = "Delete a word backward" } mappings.i["<C-Del>"] = { "<C-o>dw", desc = "Delete a word backward" }
mappings.i["<C-s>"] = { "<Cmd>w!<CR>", desc = "Save file" } mappings.i["<C-s>"] = { "<Cmd>w!<CR>", desc = "Save file" }
mappings.i["<S-Tab>"] = { "<C-d>", desc = "Unindent line" } mappings.i["<S-Tab>"] = { "<C-d>", desc = "Unindent line" }
mappings.v["<Tab>"] = { ">gv", desc = "Indent line" } mappings.v["<Tab>"] = { ">gv", desc = "Indent line" }
mappings.v["<S-Tab>"] = { "<gv", desc = "Unindent line" } mappings.v["<S-Tab>"] = { "<gv", desc = "Unindent line" }
-- Separate cut and delete motion -- Separate cut and delete motion
for key, map in pairs { for key, map in pairs {
["d"] = { '"_d', desc = "Delete" }, ["d"] = { '"_d', desc = "Delete" },
@@ -40,15 +41,15 @@ return function()
end end
------ Motions related to jumping or selecting ------ ------ Motions related to jumping or selecting ------
for key, map in pairs { -- for key, map in pairs {
["H"] = { "^", desc = "Jump to beginning of line" }, -- ["H"] = { "^", desc = "Jump to beginning of line" },
["L"] = { "$", desc = "Jump to end of line" }, -- ["L"] = { "$", desc = "Jump to end of line" },
["K"] = { "5k", desc = "Move up 5 lines" }, -- ["K"] = { "5k", desc = "Move up 5 lines" },
["J"] = { "5j", desc = "Move down 5 lines" }, -- ["J"] = { "5j", desc = "Move down 5 lines" },
} do -- } do
mappings.n[key] = map -- mappings.n[key] = map
mappings.v[key] = map -- mappings.v[key] = map
end -- end
mappings.n["<C-a>"] = { "ggVG", desc = "Select all lines" } mappings.n["<C-a>"] = { "ggVG", desc = "Select all lines" }
return mappings return mappings

View File

@@ -6,5 +6,6 @@ return {
hide_fillchars = true, hide_fillchars = true,
borderless_telescope = true, borderless_telescope = true,
terminal_colors = true, terminal_colors = true,
}, },
} }

View File

@@ -68,6 +68,7 @@ return {
event = { "BufReadPre", "BufNewFile" }, event = { "BufReadPre", "BufNewFile" },
config = function(_, opts) config = function(_, opts)
require("hlchunk").setup(require("astrocore").extend_tbl(opts, { require("hlchunk").setup(require("astrocore").extend_tbl(opts, {
ignore ={},
chunk = { chunk = {
enable = true, enable = true,
notify = false, notify = false,