project.lua 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. local M = {}
  2. --
  3. function M.config()
  4. lvim.builtin.project = {
  5. ---@usage set to false to disable project.nvim.
  6. --- This is on by default since it's currently the expected behavior.
  7. active = true,
  8. ---@usage set to true to disable setting the current-woriking directory
  9. --- Manual mode doesn't automatically change your root directory, so you have
  10. --- the option to manually do so using `:ProjectRoot` command.
  11. manual_mode = false,
  12. ---@usage Methods of detecting the root directory
  13. --- Allowed values: **"lsp"** uses the native neovim lsp
  14. --- **"pattern"** uses vim-rooter like glob pattern matching. Here
  15. --- order matters: if one is not detected, the other is used as fallback. You
  16. --- can also delete or rearangne the detection methods.
  17. detection_methods = { "lsp", "pattern" },
  18. ---@usage patterns used to detect root dir, when **"pattern"** is in detection_methods
  19. patterns = { ".git", "_darcs", ".hg", ".bzr", ".svn", "Makefile", "package.json" },
  20. ---@ Show hidden files in telescope when searching for files in a project
  21. show_hidden = false,
  22. ---@usage When set to false, you will get a message when project.nvim changes your directory.
  23. -- When set to false, you will get a message when project.nvim changes your directory.
  24. silent_chdir = true,
  25. ---@usage list of lsp client names to ignore when using **lsp** detection. eg: { "efm", ... }
  26. ignore_lsp = {},
  27. ---@type string
  28. ---@usage path to store the project history for use in telescope
  29. datapath = CACHE_PATH,
  30. }
  31. end
  32. --
  33. function M.setup()
  34. require("project_nvim").setup(lvim.builtin.project)
  35. end
  36. --
  37. return M