mirror of
https://github.com/harivansh-afk/nix.git
synced 2026-04-17 11:04:57 +00:00
optimize the shit out of theme loading
switch neovim to vim.pack away from lazy add sandboxagent package to netty update defaults
This commit is contained in:
parent
6dfcfad05f
commit
30ac6bc674
24 changed files with 4764 additions and 646 deletions
|
|
@ -1,56 +1,71 @@
|
|||
vim.pack.add({
|
||||
"https://github.com/nvim-treesitter/nvim-treesitter",
|
||||
"https://github.com/nvim-treesitter/nvim-treesitter-textobjects",
|
||||
}, { load = function() end })
|
||||
|
||||
vim.api.nvim_create_autocmd("PackChanged", {
|
||||
callback = function(ev)
|
||||
local name, kind = ev.data.spec.name, ev.data.kind
|
||||
if kind == "delete" then return end
|
||||
if name == "nvim-treesitter" then vim.schedule(function() vim.cmd "TSUpdate all" end) end
|
||||
end,
|
||||
})
|
||||
|
||||
return {
|
||||
{
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
build = ':TSUpdate',
|
||||
dependencies = { 'nvim-treesitter/nvim-treesitter-textobjects' },
|
||||
config = function()
|
||||
require('nvim-treesitter-textobjects').setup({
|
||||
select = {
|
||||
enable = true,
|
||||
lookahead = true,
|
||||
keymaps = {
|
||||
['af'] = '@function.outer',
|
||||
['if'] = '@function.inner',
|
||||
['ac'] = '@class.outer',
|
||||
['ic'] = '@class.inner',
|
||||
['aa'] = '@parameter.outer',
|
||||
['ia'] = '@parameter.inner',
|
||||
['ai'] = '@conditional.outer',
|
||||
['ii'] = '@conditional.inner',
|
||||
['al'] = '@loop.outer',
|
||||
['il'] = '@loop.inner',
|
||||
['ab'] = '@block.outer',
|
||||
['ib'] = '@block.inner',
|
||||
},
|
||||
},
|
||||
move = {
|
||||
enable = true,
|
||||
set_jumps = true,
|
||||
goto_next_start = {
|
||||
[']f'] = '@function.outer',
|
||||
[']c'] = '@class.outer',
|
||||
[']a'] = '@parameter.inner',
|
||||
},
|
||||
goto_next_end = {
|
||||
[']F'] = '@function.outer',
|
||||
[']C'] = '@class.outer',
|
||||
},
|
||||
goto_previous_start = {
|
||||
['[f'] = '@function.outer',
|
||||
['[c'] = '@class.outer',
|
||||
['[a'] = '@parameter.inner',
|
||||
},
|
||||
goto_previous_end = {
|
||||
['[F'] = '@function.outer',
|
||||
['[C'] = '@class.outer',
|
||||
},
|
||||
},
|
||||
swap = {
|
||||
enable = true,
|
||||
swap_next = { ['<leader>sn'] = '@parameter.inner' },
|
||||
swap_previous = { ['<leader>sp'] = '@parameter.inner' },
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
after = function() require("nvim-treesitter").setup { auto_install = true } end,
|
||||
},
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter-textobjects",
|
||||
after = function()
|
||||
require("nvim-treesitter-textobjects").setup {
|
||||
select = {
|
||||
enable = true,
|
||||
lookahead = true,
|
||||
keymaps = {
|
||||
["af"] = "@function.outer",
|
||||
["if"] = "@function.inner",
|
||||
["ac"] = "@class.outer",
|
||||
["ic"] = "@class.inner",
|
||||
["aa"] = "@parameter.outer",
|
||||
["ia"] = "@parameter.inner",
|
||||
["ai"] = "@conditional.outer",
|
||||
["ii"] = "@conditional.inner",
|
||||
["al"] = "@loop.outer",
|
||||
["il"] = "@loop.inner",
|
||||
["ab"] = "@block.outer",
|
||||
["ib"] = "@block.inner",
|
||||
},
|
||||
},
|
||||
move = {
|
||||
enable = true,
|
||||
set_jumps = true,
|
||||
goto_next_start = {
|
||||
["]f"] = "@function.outer",
|
||||
["]c"] = "@class.outer",
|
||||
["]a"] = "@parameter.inner",
|
||||
},
|
||||
goto_next_end = {
|
||||
["]F"] = "@function.outer",
|
||||
["]C"] = "@class.outer",
|
||||
},
|
||||
goto_previous_start = {
|
||||
["[f"] = "@function.outer",
|
||||
["[c"] = "@class.outer",
|
||||
["[a"] = "@parameter.inner",
|
||||
},
|
||||
goto_previous_end = {
|
||||
["[F"] = "@function.outer",
|
||||
["[C"] = "@class.outer",
|
||||
},
|
||||
},
|
||||
swap = {
|
||||
enable = true,
|
||||
swap_next = { ["<leader>sn"] = "@parameter.inner" },
|
||||
swap_previous = { ["<leader>sp"] = "@parameter.inner" },
|
||||
},
|
||||
}
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue