migrate to dotter
This commit is contained in:
parent
c5618f2f2c
commit
23b6c0a596
265 changed files with 62 additions and 3125 deletions
50
configs/nvim/lua/aleidk/plugins/treesitter.lua
Normal file
50
configs/nvim/lua/aleidk/plugins/treesitter.lua
Normal file
|
|
@ -0,0 +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-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