Treesitter and better diff

Signed-off-by: Ryan <ryan@alien.gov>
This commit is contained in:
Ryan 2023-12-10 15:22:37 +08:00
parent 6d0cbe06cc
commit 85f883864a
No known key found for this signature in database
GPG Key ID: DB5B3AC49EEFD2A5
2 changed files with 4 additions and 10 deletions

View File

@ -15,6 +15,7 @@ o.scrolloff = 10
o.showmode = false
o.termguicolors = true
o.title = true
vim.opt.diffopt = { "internal", "filler", "closeoff", "iwhite" }
-- controlling
global.mapleader = ' '
@ -22,7 +23,7 @@ o.autoindent = true
o.ignorecase = true
o.smartcase = true
o.smartindent = true
vim.opt.completeopt = { 'menu', 'menuone', 'noselect' }
vim.opt.completeopt = { 'menu', 'menuone', 'noselect', 'noinsert' }
-- vscode
if vim.g.vscode then

View File

@ -72,20 +72,13 @@ require("nvim-treesitter.configs").setup({
goto_previous_start = {
["[m"] = "@function.outer",
["[["] = "@class.outer",
["[o"] = "@loop.*",
["[z"] = { query = "@fold", query_group = "folds", desc = "Next fold" },
},
goto_previous_end = {
["[M"] = "@function.outer",
["[]"] = "@class.outer",
},
-- Below will go to either the start or the end, whichever is closer.
-- Use if you want more granular movements
-- Make it even more gradual by adding multiple queries and regex.
goto_next = {
["]d"] = "@conditional.outer",
},
goto_previous = {
["[d"] = "@conditional.outer",
}
},
},
})