feat(nvim): add mini surround
This commit is contained in:
parent
69dd52f596
commit
f4fec1ee0b
3 changed files with 27 additions and 20 deletions
|
@ -167,9 +167,8 @@ in {
|
|||
type = "lua";
|
||||
config = fileContents ./plugins/autopairs.lua;
|
||||
}
|
||||
{
|
||||
plugin = nvim-treesitter-context;
|
||||
}
|
||||
nvim-treesitter-context
|
||||
nvim-treesitter-textobjects
|
||||
{
|
||||
plugin = nvim-treesitter.withAllGrammars;
|
||||
type = "viml";
|
||||
|
@ -183,11 +182,9 @@ in {
|
|||
config = fileContents ./plugins/indent.lua;
|
||||
}
|
||||
{
|
||||
plugin = (plugin "echasnovski" "mini.map"
|
||||
"75b7ca9443e17c852b24055b32f74a880cf48053"
|
||||
"sha256-CoMc6yQXXAW1wzcD9eJGuM+kcOJghuwHjKrqEMxZBec=");
|
||||
plugin = mini-nvim;
|
||||
type = "lua";
|
||||
config = fileContents ./plugins/minimap.lua;
|
||||
config = fileContents ./plugins/mini.lua;
|
||||
}
|
||||
{
|
||||
plugin = neo-tree-nvim;
|
||||
|
|
23
common/modules/neovim/plugins/mini.lua
Normal file
23
common/modules/neovim/plugins/mini.lua
Normal file
|
@ -0,0 +1,23 @@
|
|||
local map = require('mini.map')
|
||||
map.setup({
|
||||
integrations = {
|
||||
map.gen_integration.builtin_search(),
|
||||
map.gen_integration.gitsigns(),
|
||||
map.gen_integration.diagnostic(),
|
||||
},
|
||||
window = {
|
||||
focusable = true,
|
||||
width = 7,
|
||||
winblend = 75,
|
||||
},
|
||||
})
|
||||
|
||||
local ts_input = require('mini.surround').gen_spec.input.treesitter
|
||||
require('mini.surround').setup({
|
||||
custom_surroundings = {
|
||||
-- Use tree-sitter to search for function call
|
||||
f = {
|
||||
input = ts_input({ outer = '@call.outer', inner = '@call.inner' })
|
||||
},
|
||||
}
|
||||
})
|
|
@ -1,13 +0,0 @@
|
|||
local map = require('mini.map')
|
||||
map.setup({
|
||||
integrations = {
|
||||
map.gen_integration.builtin_search(),
|
||||
map.gen_integration.gitsigns(),
|
||||
map.gen_integration.diagnostic(),
|
||||
},
|
||||
window = {
|
||||
focusable = true,
|
||||
width = 7,
|
||||
winblend = 75,
|
||||
},
|
||||
})
|
Loading…
Reference in a new issue