nvim: Add project plugin

This commit is contained in:
histalek 2023-02-04 21:09:50 +01:00
parent 705012f3c7
commit e18d158a8f
No known key found for this signature in database
GPG key ID: ED1D6449704FDE03
4 changed files with 27 additions and 1 deletions

View file

@ -25,3 +25,4 @@ require("plugins.lsp.lspsaga")
require("plugins.lsp.lspconfig")
require("plugins.lsp.null-ls")
require("plugins.leap")
require("plugins.project")

View file

@ -89,6 +89,9 @@ return packer.startup({
use("nvim-tree/nvim-tree.lua")
use("nvim-tree/nvim-web-devicons")
-- Project manager
use("ahmedkhalf/project.nvim")
-- Popup for available keybinds
use("folke/which-key.nvim")

View file

@ -7,4 +7,20 @@ end
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
nvimtree.setup()
nvimtree.setup({
--integration with project.nvim
sync_root_with_cwd = true,
respect_buf_cwd = true,
update_focused_file = {
enable = true,
update_root = true,
},
view = {
mappings = {
list = {
{ key = "l", action = "expand" },
{ key = "h", action = "collapse" },
},
},
},
})

View file

@ -0,0 +1,6 @@
local status, project = pcall(require, "project_nvim")
if not status then
return
end
project.setup()