Update nvim plugins
This commit is contained in:
parent
f779732115
commit
d1178fbe59
2 changed files with 58 additions and 52 deletions
|
|
@ -9,7 +9,7 @@
|
|||
"gitsigns.nvim": { "branch": "main", "commit": "7c4faa3540d0781a28588cafbd4dd187a28ac6e3" },
|
||||
"goto-preview": { "branch": "main", "commit": "d2d6923c9b9e0e43f0b9b566f261a8b1ae016540" },
|
||||
"incline.nvim": { "branch": "main", "commit": "8b54c59bcb23366645ae10edca6edfb9d3a0853e" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
|
||||
"lazydev.nvim": { "branch": "main", "commit": "ff2cbcba459b637ec3fd165a2be59b7bbaeedf0d" },
|
||||
"live-rename.nvim": { "branch": "main", "commit": "3a3cddf23b89a17992f9ca67afc5858077769462" },
|
||||
"logger.nvim": { "branch": "main", "commit": "63dd10c9b9a159fd6cfe08435d9606384ff103c5" },
|
||||
|
|
@ -19,7 +19,6 @@
|
|||
"neogit": { "branch": "master", "commit": "d3890fc3cdf0859845a86b2be306bba01458df1a" },
|
||||
"noice.nvim": { "branch": "main", "commit": "7bfd942445fb63089b59f97ca487d605e715f155" },
|
||||
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
|
||||
"nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" },
|
||||
"nvim-dap": { "branch": "master", "commit": "a9d8cb68ee7184111dc66156c4a2ebabfbe01bc5" },
|
||||
"nvim-dap-go": { "branch": "main", "commit": "b4421153ead5d726603b02743ea40cf26a51ed5f" },
|
||||
"nvim-dap-repl-highlights": { "branch": "master", "commit": "f31deba47fe3ee6ff8d2f13d9dbd06b2d1ae06b5" },
|
||||
|
|
@ -29,15 +28,15 @@
|
|||
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
|
||||
"nvim-norrsken": { "branch": "master", "commit": "692c2a0f81905dc6fd3011361740d610dfa8052d" },
|
||||
"nvim-surround": { "branch": "main", "commit": "61319d4bd1c5e336e197defa15bd104c51f0fb29" },
|
||||
"nvim-treesitter": { "branch": "main", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
|
||||
"nvim-treesitter-context": { "branch": "master", "commit": "9a8e39993e3b895601bf8227124a48ea8268149e" },
|
||||
"nvim-treesitter-textobjects": { "branch": "main", "commit": "5ca4aaa6efdcc59be46b95a3e876300cfead05ef" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
|
||||
"nvim-treesitter-context": { "branch": "master", "commit": "adf4b6b0420b7be6c717ef0ac7993183d6c201b1" },
|
||||
"nvim-treesitter-textobjects": { "branch": "main", "commit": "93d60a475f0b08a8eceb99255863977d3a25f310" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "d7462543c9e366c0d196c7f67a945eaaf5d99414" },
|
||||
"persistence.nvim": { "branch": "main", "commit": "b20b2a7887bd39c1a356980b45e03250f3dce49c" },
|
||||
"persistent-breakpoints.nvim": { "branch": "main", "commit": "d1656221836207787b8a7969cc2dc72668c4742a" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
|
||||
"rustaceanvim": { "branch": "master", "commit": "e9c5aaba16fead831379d5f44617547a90b913c7" },
|
||||
"snacks.nvim": { "branch": "main", "commit": "e6fd58c82f2f3fcddd3fe81703d47d6d48fc7b9f" },
|
||||
"snacks.nvim": { "branch": "main", "commit": "ad9ede6a9cddf16cedbd31b8932d6dcdee9b716e" },
|
||||
"tiny-glimmer.nvim": { "branch": "main", "commit": "932e6c2cc4a43ce578f007db1f8f61ad6798f938" },
|
||||
"tiny-inline-diagnostic.nvim": { "branch": "main", "commit": "ba133b3e932416e4b9507095731a6d7276878fe8" },
|
||||
"visual-whitespace.nvim": { "branch": "main", "commit": "49ff2b1c572ed7033a584381fa23aad2bf3bb258" }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,20 @@
|
|||
local function ts_select(query)
|
||||
return function() require("nvim-treesitter-textobjects.select").select_textobject(query, "textobjects") end
|
||||
end
|
||||
|
||||
local function ts_move_prev(query)
|
||||
return function() require("nvim-treesitter-textobjects.move").goto_previous_start(query, "textobjects") end
|
||||
end
|
||||
|
||||
local function ts_move_next(query)
|
||||
return function() require("nvim-treesitter-textobjects.move").goto_next_start(query, "textobjects") end
|
||||
end
|
||||
|
||||
-- TODO: Move away from master branch after updating to Neovim 0.12 and use the rewrite
|
||||
return {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
branch = "master",
|
||||
build = ":TSUpdate",
|
||||
dependencies = {
|
||||
{
|
||||
|
|
@ -11,8 +25,45 @@ return {
|
|||
trim_scope = "inner", -- Which context lines to discard if `max_lines` is exceeded. Choices: 'inner', 'outer'
|
||||
}
|
||||
},
|
||||
"nvim-treesitter/nvim-treesitter-textobjects",
|
||||
"OXY2DEV/markview.nvim",
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter-textobjects",
|
||||
branch = "main",
|
||||
init = function()
|
||||
-- Disable entire built-in ftplugin mappings to avoid conflicts.
|
||||
-- See https://github.com/neovim/neovim/tree/master/runtime/ftplugin for built-in ftplugins.
|
||||
vim.g.no_plugin_maps = true
|
||||
end,
|
||||
opts = {
|
||||
select = {
|
||||
lookahead = true,
|
||||
},
|
||||
move = {
|
||||
set_jumps = true,
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
-- select
|
||||
{ "ic", ts_select("@class.inner"), mode = { "x", "o" } },
|
||||
{ "ac", ts_select("@class.outer"), mode = { "x", "o" } },
|
||||
{ "ii", ts_select("@conditional.inner"), mode = { "x", "o" } },
|
||||
{ "ai", ts_select("@conditional.outer"), mode = { "x", "o" } },
|
||||
{ "if", ts_select("@function.inner"), mode = { "x", "o" } },
|
||||
{ "af", ts_select("@function.outer"), mode = { "x", "o" } },
|
||||
{ "il", ts_select("@loop.inner"), mode = { "x", "o" } },
|
||||
{ "al", ts_select("@loop.outer"), mode = { "x", "o" } },
|
||||
{ "ia", ts_select("@attribute.inner"), mode = { "x", "o" } },
|
||||
{ "aa", ts_select("@attribute.outer"), mode = { "x", "o" } },
|
||||
-- move
|
||||
{ "[f", ts_move_prev("@function.outer"), mode = { "n", "x", "o" } },
|
||||
{ "[i", ts_move_prev("@conditional.outer"), mode = { "n", "x", "o" } },
|
||||
{ "[c", ts_move_prev("@class.outer"), mode = { "n", "x", "o" } },
|
||||
{ "[l", ts_move_prev("@loop.outer"), mode = { "n", "x", "o" } },
|
||||
{ "]f", ts_move_next("@function.outer"), mode = { "n", "x", "o" } },
|
||||
{ "]i", ts_move_next("@conditional.outer"), mode = { "n", "x", "o" } },
|
||||
{ "]c", ts_move_next("@class.outer"), mode = { "n", "x", "o" } },
|
||||
{ "]l", ts_move_next("@loop.outer"), mode = { "n", "x", "o" } },
|
||||
},
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
require("nvim-treesitter.configs").setup({
|
||||
|
|
@ -59,55 +110,11 @@ return {
|
|||
"jsonc",
|
||||
},
|
||||
sync_install = false,
|
||||
-- This can be updated to a list of languages instead of defaulting to true
|
||||
highlight = {
|
||||
enable = true,
|
||||
additional_vim_regex_highlighting = false,
|
||||
},
|
||||
indent = { enable = true },
|
||||
incremental_selection = {
|
||||
enable = false,
|
||||
keymaps = {
|
||||
init_selection = "<cr>",
|
||||
node_incremental = "<cr>",
|
||||
scope_incremental = false,
|
||||
node_decremental = "<bs>",
|
||||
},
|
||||
},
|
||||
textobjects = {
|
||||
select = {
|
||||
enable = true,
|
||||
lookahead = true,
|
||||
keymaps = {
|
||||
["ic"] = { query = "@class.inner" },
|
||||
["ac"] = { query = "@class.outer" },
|
||||
["ii"] = { query = "@conditional.inner" },
|
||||
["ai"] = { query = "@conditional.outer" },
|
||||
["if"] = { query = "@function.inner" },
|
||||
["af"] = { query = "@function.outer" },
|
||||
["il"] = { query = "@loop.inner" },
|
||||
["al"] = { query = "@loop.outer" },
|
||||
["ia"] = { query = "@attribute.inner" },
|
||||
["aa"] = { query = "@attribute.outer" },
|
||||
},
|
||||
},
|
||||
move = {
|
||||
enable = true,
|
||||
set_jumps = true,
|
||||
goto_previous_start = {
|
||||
["[f"] = "@function.outer",
|
||||
["[i"] = "@conditional.outer",
|
||||
["[c"] = "@class.outer",
|
||||
["[l"] = "@loop.outer",
|
||||
},
|
||||
goto_next_start = {
|
||||
["]f"] = "@function.outer",
|
||||
["]i"] = "@conditional.outer",
|
||||
["]c"] = "@class.outer",
|
||||
["]l"] = "@loop.outer",
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
end
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue