Help use Psalm Phar as LSP in Neovim with no plugins #9189
Unanswered
still-dreaming-1
asked this question in
Q&A
Replies: 1 comment 1 reply
-
With As for local lsputil = require 'lspconfig/util'
local lspconfig = require 'lspconfig'
lspconfig.psalm.setup{
cmd = { "vendor/bin/psalm-language-server", "--verbose" },
filetypes = { "php" },
root_dir = lsputil.root_pattern("psalm.xml", "psalm.xml.dist"),
on_attach = on_lsp_attach
} where The setup above assumes you have https://github.com/neovim/nvim-lspconfig installed. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Theoretically, you don't actually need to use any plugins to use an LSP in Neovim as Neovim has LSP support built in. Checkout
:help LSP
. I'm trying to figure out how to do this, and there seems to be a lack of information about the LSP within the Psalm documentation. It does say how to use it with a few different plugins, but it doesn't really explain what it is showing, and I find it odd that these settings are supposed to work. Specifically the references to "vendor/bin/psalm-language-server" are confusing me. Where is this mysterious psalm-language-server? I don't see it in my project /vendor/bin/, am I supposed to? Perhaps this is because I add Psalm to the project as a phar?Beta Was this translation helpful? Give feedback.
All reactions