Skip to content

Commit

Permalink
nvim: integrate projects.nvim plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
massix committed Jan 6, 2024
1 parent 4aa4c44 commit c9168a3
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
1 change: 1 addition & 0 deletions nvim/lua/plugins/alpha.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ return {
dashboard.button("f", "" .. " Find file", "<CMD> Telescope find_files<CR>"),
dashboard.button("e", "" .. " Open org", [[<CMD> cd ~/org <BAR> e ./index.org<CR>]]),
dashboard.button("l", "󰒲 " .. " Lazy", "<CMD> Lazy<CR>"),
dashboard.button("h", "" .. " Project", "<CMD>Telescope projects<CR>"),
dashboard.button("q", "" .. " Quit", "<CMD> qa<CR>"),
}

Expand Down
2 changes: 2 additions & 0 deletions nvim/lua/plugins/editor.lua
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ return {
config = function(_, opts)
require('telescope').setup(opts)
require('telescope').load_extension('orgmode')
require('telescope').load_extension('projects')
end,
dependencies = {
"nvim-lua/plenary.nvim",
Expand Down Expand Up @@ -121,6 +122,7 @@ return {
{ "<leader>sj", "<cmd>Telescope jumplist<cr>", desc = "Jumplist" },
{ "<leader>so", "<cmd>Telescope vim_options<cr>", desc = "Options" },
{ "<leader>sO", "<cmd>Telescope orgmode search_headings<cr>", desc = "Org Headings" },
{ "<leader>sp", "<cmd>Telescope projects<cr>", desc = "Change project" },
{ "<leader>sR", "<cmd>Telescope resume<cr>", desc = "Resume" },
},
},
Expand Down
27 changes: 27 additions & 0 deletions nvim/lua/plugins/project.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
return {
{
"ahmedkhalf/project.nvim",
lazy = false,
event = "VeryLazy",
opts = {
detection_methods = { "pattern" },
patterns = {
".git",
"_darcs",
".hg",
".bzr",
".svn",
"Makefile",
"package.json",
"index.org",
},
show_hidden = false,
silent_chdir = true,
scope_chdir = 'global',
datapath = vim.fn.stdpath("data"),
},
config = function(_, opts)
require("project_nvim").setup(opts)
end,
},
}

0 comments on commit c9168a3

Please sign in to comment.