dotfiles/.config/nvim/lua/my/tools.lua

57 lines
1.7 KiB
Lua
Raw Normal View History

require('my/plugins')
require('my/keymaps')
2022-08-13 19:09:59 +02:00
require('my/fileformats')
2022-08-08 19:11:44 +02:00
packer.use {
2022-08-08 19:25:36 +02:00
'https://github.com/folke/which-key.nvim',
2022-08-08 19:11:44 +02:00
config = function()
2022-08-08 19:25:36 +02:00
require('which-key').setup {
2022-08-08 19:11:44 +02:00
}
end
}
2022-08-08 19:25:36 +02:00
packer.use {
2022-08-13 19:09:59 +02:00
'https://github.com/nvim-telescope/telescope.nvim',
tag = '*',
requires = {
'https://github.com/nvim-lua/plenary.nvim',
'https://github.com/nvim-treesitter/nvim-treesitter',
},
2022-08-08 19:25:36 +02:00
config = function()
2022-08-13 19:09:59 +02:00
local telescope = require('telescope')
local actions = require('telescope.actions')
telescope.load_extension('media_files') -- FIXME: does not work
require('telescope').setup {
mappings = {
i = {
["<C-_>"] = actions.which_key,
},
n = {
["?"] = actions.which_key,
}
},
extensions = {
media_files = {
filetypes = { 'png', 'webp', 'jpg', 'jpeg', 'epub', 'pdf' }
}
}
2022-08-13 00:14:51 +02:00
}
2022-08-13 19:09:59 +02:00
map('n', '<Leader>tb', require('telescope.builtin').buffers)
map('n', '<Leader>tf', function() require('telescope.builtin').find_files({ cwd = MY_get_project_root() }) end)
map('n', '<Leader>tr', require('telescope.builtin').oldfiles)
map('n', '<Leader>tg', require('telescope.builtin').live_grep)
map('n', '<Leader>tm', require('telescope.builtin').man_pages)
2022-08-08 19:25:36 +02:00
end
}
2022-08-13 19:09:59 +02:00
packer.use {
'https://github.com/nvim-telescope/telescope-media-files.nvim',
requires = {
'https://github.com/nvim-lua/popup.nvim',
'https://github.com/nvim-lua/plenary.nvim',
'https://github.com/nvim-telescope/telescope.nvim'
}
}