php.lua 775 B

12345678910111213141516171819202122232425
  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(
  6. vim.lsp.diagnostic.on_publish_diagnostics, {
  7. virtual_text = O.lang.php.diagnostics.virtual_text,
  8. signs = O.lang.php.diagnostics.signs,
  9. underline = O.lang.php.diagnostics.underline,
  10. update_in_insert = true
  11. })
  12. },
  13. filetypes = O.lang.php.filetypes,
  14. settings = {
  15. intelephense = {
  16. format = {
  17. braces = O.lang.php.format.braces
  18. },
  19. environment = {
  20. phpVersion = O.lang.php.environment.php_version
  21. },
  22. }
  23. };
  24. }