You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

76 lines
2.6 KiB

10 months ago
9 months ago
10 months ago
  1. return {
  2. "tovijaeschke/laravel.nvim",
  3. -- enabled = false,
  4. branch = "feature/discovery-check-improvements",
  5. dependencies = {
  6. "nvim-telescope/telescope.nvim",
  7. "tpope/vim-dotenv",
  8. "MunifTanjim/nui.nvim",
  9. -- "nvimtools/none-ls.nvim",
  10. },
  11. cmd = { "Sail", "Artisan", "Composer", "Npm", "Yarn", "Laravel" },
  12. keys = {
  13. { "<leader>la", ":Laravel artisan<cr>" },
  14. { "<leader>lr", ":Laravel routes<cr>" },
  15. { "<leader>lm", ":Laravel related<cr>" },
  16. },
  17. event = { "VeryLazy" },
  18. config = function ()
  19. local laravel = require("laravel")
  20. laravel.setup({
  21. lsp_server = "intelephense",
  22. features = {
  23. null_ls = {
  24. enable = false,
  25. },
  26. },
  27. environments = {
  28. env_variable = "NVIM_LARAVEL_ENV",
  29. auto_dicover = false,
  30. default = "docker-compose",
  31. definitions = {
  32. {
  33. name = "sail",
  34. condition = {
  35. file_exists = { "vendor/bin/sail", "docker-compose.yml" },
  36. },
  37. commands = {
  38. sail = { "vendor/bin/sail" },
  39. {
  40. commands = { "php", "composer", "npm", "yarn" },
  41. prefix = { "vendor/bin/sail" },
  42. },
  43. },
  44. },
  45. {
  46. name = "docker-compose",
  47. condition = {
  48. file_exists = { "docker-compose.yml" },
  49. executable = { "docker" },
  50. },
  51. commands = {
  52. compose = { "docker", "compose" },
  53. {
  54. commands = { "php", "composer", "npm" },
  55. docker = {
  56. container = {
  57. env = "APP_SERVICE",
  58. default = "fpm",
  59. },
  60. exec = { "docker", "compose", "exec", "-it" },
  61. },
  62. },
  63. },
  64. },
  65. {
  66. name = "local",
  67. condition = {
  68. executable = { "php" },
  69. },
  70. },
  71. }
  72. }
  73. })
  74. end,
  75. }