project.lua 516 B

1234567891011121314151617181920
  1. local status, project = pcall(require, "project_nvim")
  2. if not status then
  3. vim.notify("没有找到 project_nvim")
  4. return
  5. end
  6. -- nvim-tree 支持
  7. vim.g.nvim_tree_respect_buf_cwd = 1
  8. project.setup({
  9. detection_methods = { "pattern" },
  10. patterns = { ".git", "_darcs", ".hg", ".bzr", ".svn", "Makefile", "package.json", ".sln", ".nvim" },
  11. })
  12. local status, telescope = pcall(require, "telescope")
  13. if not status then
  14. vim.notify("没有找到 telescope")
  15. return
  16. end
  17. pcall(telescope.load_extension, "projects")