update movement in nvim
This commit is contained in:
parent
8ade0b6795
commit
5a1d24ae0d
5 changed files with 80 additions and 17 deletions
|
|
@ -22,6 +22,7 @@
|
|||
"nvim-lspconfig": { "branch": "master", "commit": "4d3b3bb8815fbe37bcaf3dbdb12a22382bc11ebe" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
|
||||
"nvim-treesitter-context": { "branch": "master", "commit": "59f318a65d42a5c4037796886a8874fd57f774fc" },
|
||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "71385f191ec06ffc60e80e6b0c9a9d5daed4824c" },
|
||||
"nvim-ts-context-commentstring": { "branch": "main", "commit": "1b212c2eee76d787bbea6aa5e92a2b534e7b4f8f" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "0422a19d9aa3aad2c7e5cca167e5407b13407a9d" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
|
||||
|
|
|
|||
|
|
@ -51,6 +51,11 @@ return { -- Change colors.none if not using a transparent background
|
|||
style = { "bold" },
|
||||
},
|
||||
GitSignsDeleteVirtLn = { bg = colors.none, fg = colors.red },
|
||||
|
||||
MiniJump2dDim = { fg = colors.surface1 },
|
||||
MiniJump2dSpot = { bg = colors.base, fg = colors.teal, style = { "bold", "underline" } },
|
||||
MiniJump2dSpotAhead = { bg = colors.base, fg = colors.teal, style = { "bold", "underline" } },
|
||||
MiniJump2dSpotUnique = { bg = colors.base, fg = colors.teal, style = { "bold", "underline" } },
|
||||
}
|
||||
end,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,17 @@ return {
|
|||
lazy = false, -- Required to register vim.ui.select() wrapper
|
||||
dependencies = { "echasnovski/mini.nvim" },
|
||||
config = function()
|
||||
require("fzf-lua").setup()
|
||||
require("fzf-lua").setup({
|
||||
winopts = {
|
||||
height = 0.85,
|
||||
width = 0.90,
|
||||
},
|
||||
files = {
|
||||
-- path_shorten = true,
|
||||
cwd_prompt = false,
|
||||
-- formatter = "path.filename_first",
|
||||
},
|
||||
})
|
||||
require("fzf-lua").register_ui_select()
|
||||
end,
|
||||
keys = {
|
||||
|
|
|
|||
|
|
@ -20,7 +20,24 @@ return {
|
|||
require("mini.ai").setup({})
|
||||
require('mini.cursorword').setup() -- Highlight word under cursor
|
||||
require('mini.extra').setup()
|
||||
require('mini.jump').setup() -- Extend f, F, t, T
|
||||
require('mini.jump').setup({
|
||||
mappings = {
|
||||
repeat_jump = ""
|
||||
}
|
||||
}) -- Extend f, F, t, T
|
||||
require('mini.jump2d').setup(
|
||||
{
|
||||
spotter = require('mini.jump2d').gen_pattern_spotter('[^%s%p]+', 'start'),
|
||||
view = {
|
||||
dim = true,
|
||||
n_steps_ahead = 2
|
||||
},
|
||||
allowed_lines = {
|
||||
blank = false,
|
||||
cursor_at = false
|
||||
},
|
||||
}
|
||||
)
|
||||
require('mini.surround').setup()
|
||||
require('mini.operators').setup()
|
||||
require('mini.pairs').setup({
|
||||
|
|
|
|||
|
|
@ -1,20 +1,50 @@
|
|||
return {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
lazy = false,
|
||||
branch = "master",
|
||||
dependencies = {
|
||||
{
|
||||
"JoosepAlviste/nvim-ts-context-commentstring",
|
||||
opts = {
|
||||
enable_autocmd = false,
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
lazy = false,
|
||||
branch = "master",
|
||||
dependencies = {
|
||||
{
|
||||
"JoosepAlviste/nvim-ts-context-commentstring",
|
||||
opts = {
|
||||
enable_autocmd = false,
|
||||
},
|
||||
},
|
||||
{ "nvim-treesitter/nvim-treesitter-context" },
|
||||
},
|
||||
build = ":TSUpdate",
|
||||
opts = {
|
||||
auto_install = true,
|
||||
highlight = { enable = true },
|
||||
indent = { enable = true },
|
||||
},
|
||||
{ "nvim-treesitter/nvim-treesitter-context" },
|
||||
},
|
||||
build = ":TSUpdate",
|
||||
opts = {
|
||||
auto_install = true,
|
||||
highlight = { enable = true },
|
||||
indent = { enable = true },
|
||||
},
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter-textobjects",
|
||||
dependencies = { "nvim-treesitter", },
|
||||
config = function()
|
||||
require 'nvim-treesitter.configs'.setup({
|
||||
textobjects = {
|
||||
move = {
|
||||
enable = true,
|
||||
set_jumps = true, -- whether to set jumps in the jumplist
|
||||
goto_next = {
|
||||
["]]"] = { query = { "@block.outer", "@function.outer", "@class.outer", } },
|
||||
},
|
||||
goto_previous = {
|
||||
["[["] = { query = { "@block.outer", "@function.outer", "@class.outer", } },
|
||||
}
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
local ts_repeat_move = require "nvim-treesitter.textobjects.repeatable_move"
|
||||
|
||||
-- Repeat movement with ; and ,
|
||||
-- ensure ; goes forward and , goes backward regardless of the last direction
|
||||
vim.keymap.set({ "n", "x", "o" }, ";", ts_repeat_move.repeat_last_move_previous)
|
||||
vim.keymap.set({ "n", "x", "o" }, ",", ts_repeat_move.repeat_last_move_next)
|
||||
end
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue