mirror of
https://github.com/cap153/nvim.git
synced 2026-04-28 17:41:16 +08:00
增删一些插件
This commit is contained in:
parent
e4487aa27f
commit
996cfc643b
9 changed files with 145 additions and 46 deletions
34
lua/lazy/plugins/television.lua
Normal file
34
lua/lazy/plugins/television.lua
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
return {
|
||||
"alexpasmantier/tv.nvim",
|
||||
config = function()
|
||||
vim.keymap.set('n', '<c-t>', function()
|
||||
if vim.fs.root(0, '.git') then
|
||||
vim.cmd('Tv git-files')
|
||||
else
|
||||
vim.cmd('Tv files')
|
||||
end
|
||||
end, { desc = "Smart Tv: git-files or files" })
|
||||
local h = require('tv').handlers
|
||||
require("tv").setup {
|
||||
channels = {
|
||||
["git-files"] = {
|
||||
handlers = {
|
||||
["<CR>"] = h.open_as_files,
|
||||
},
|
||||
},
|
||||
files = {
|
||||
handlers = {
|
||||
["<CR>"] = h.open_as_files, -- default: open selected files
|
||||
},
|
||||
},
|
||||
-- `text`: ripgrep search through file contents
|
||||
text = {
|
||||
keybinding = '<C-f>',
|
||||
handlers = {
|
||||
['<CR>'] = h.open_at_line, -- Jump to line:col in file
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
end,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue