diff options
author | PZ31k0nauT <[email protected]> | 2021-07-04 18:50:38 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2021-07-04 12:50:38 -0400 |
commit | 7cd58b1228749f72a81ba84c265cafafe47fa5a6 (patch) | |
tree | dd32860a91db8f22d085db0cc817190d15f88dc4 /ftplugin/php.lua | |
parent | 927d5b165e668eb806fe0fa3150c09fc57427120 (diff) |
Basics for php lsp (#664)
* Update php.lua
* Update default-config.lua
* Update lv-config.example.lua
Diffstat (limited to 'ftplugin/php.lua')
-rw-r--r-- | ftplugin/php.lua | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/ftplugin/php.lua b/ftplugin/php.lua index abc90092..b571a213 100644 --- a/ftplugin/php.lua +++ b/ftplugin/php.lua @@ -1,4 +1,25 @@ require'lspconfig'.intelephense.setup { cmd = { DATA_PATH .. "/lspinstall/php/node_modules/.bin/intelephense", "--stdio" }, - on_attach = require'lsp'.common_on_attach -}
\ No newline at end of file + on_attach = require'lsp'.common_on_attach, + handlers = { + ["textDocument/publishDiagnostics"] = vim.lsp.with( + vim.lsp.diagnostic.on_publish_diagnostics, { + virtual_text = O.lang.php.diagnostics.virtual_text, + signs = O.lang.php.diagnostics.signs, + underline = O.lang.php.diagnostics.underline, + update_in_insert = true + + }) + }, + filetypes = O.lang.php.filetypes, + settings = { + intelephense = { + format = { + braces = O.lang.php.format.braces + }, + environment = { + phpVersion = O.lang.php.environment.php_version + }, + } + }; +} |