replaced telescope projects with workspaces
This commit is contained in:
parent
9d9689df95
commit
9c14a43efb
@ -1,17 +0,0 @@
|
|||||||
return {
|
|
||||||
'nvim-telescope/telescope-project.nvim',
|
|
||||||
dependencies = {
|
|
||||||
'nvim-telescope/telescope.nvim'
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
require 'telescope'.load_extension('project')
|
|
||||||
end,
|
|
||||||
keys = {
|
|
||||||
{
|
|
||||||
'<space>p',
|
|
||||||
function()
|
|
||||||
require 'telescope'.extensions.project.project {}
|
|
||||||
end
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
45
lua/plugins/workspaces.lua
Normal file
45
lua/plugins/workspaces.lua
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
return {
|
||||||
|
'natecraddock/workspaces.nvim',
|
||||||
|
config = function()
|
||||||
|
require('workspaces').setup()
|
||||||
|
end,
|
||||||
|
branch = 'master',
|
||||||
|
keys = {
|
||||||
|
{
|
||||||
|
'<space>p',
|
||||||
|
function()
|
||||||
|
local workspaces = require('workspaces')
|
||||||
|
local fzf_lua = require('fzf-lua')
|
||||||
|
fzf_lua.fzf_exec(function(cb)
|
||||||
|
local results = workspaces.get()
|
||||||
|
for _, e in ipairs(results) do
|
||||||
|
cb(e['name'])
|
||||||
|
end
|
||||||
|
cb()
|
||||||
|
end,
|
||||||
|
{
|
||||||
|
actions = {
|
||||||
|
['default'] = {
|
||||||
|
function(selected)
|
||||||
|
workspaces.open(selected[1])
|
||||||
|
fzf_lua.git_files()
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
['ctrl-d'] = {
|
||||||
|
function(selected)
|
||||||
|
workspaces.remove(selected[1])
|
||||||
|
end,
|
||||||
|
fzf_lua.actions.resume
|
||||||
|
},
|
||||||
|
['ctrl-a'] = {
|
||||||
|
function()
|
||||||
|
workspaces.add()
|
||||||
|
end,
|
||||||
|
fzf_lua.actions.resume
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
end
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user