php.lua 731 B

1234567891011121314151617181920212223
  1. require("lspconfig").intelephense.setup {
  2. cmd = { DATA_PATH .. "/lspinstall/php/node_modules/.bin/intelephense", "--stdio" },
  3. on_attach = require("lsp").common_on_attach,
  4. handlers = {
  5. ["textDocument/publishDiagnostics"] = vim.lsp.with(vim.lsp.diagnostic.on_publish_diagnostics, {
  6. virtual_text = O.lang.php.diagnostics.virtual_text,
  7. signs = O.lang.php.diagnostics.signs,
  8. underline = O.lang.php.diagnostics.underline,
  9. update_in_insert = true,
  10. }),
  11. },
  12. filetypes = O.lang.php.filetypes,
  13. settings = {
  14. intelephense = {
  15. format = {
  16. braces = O.lang.php.format.braces,
  17. },
  18. environment = {
  19. phpVersion = O.lang.php.environment.php_version,
  20. },
  21. },
  22. },
  23. }