Are there any Neovim users using native lsp that have haxe-language-server running?
local status_ok, lsp_installer = pcall(require, "nvim-lsp-installer")
if not status_ok then
return
end
local servers = {
-- .....
"haxe_language_server",
}
lsp_installer.setup({
ensure_installed = servers,
})
local lspconfig_status_ok, lspconfig = pcall(require, "lspconfig")
if not lspconfig_status_ok then
return
end
local opts = {}
for _, server in pairs(servers) do
opts = {
on_attach = require("user.lsp.handlers").on_attach,
capabilities = require("user.lsp.handlers").capabilities,
}
-- .....
if server == "haxe_language_server" then
opts = vim.tbl_deep_extend("force", {
cmd = { "node", "/home/hristo-laptop/Projects/haxe-language-server/bin/server.js" },
}, opts)
end
lspconfig[server].setup(opts)
end
Just in case your main goal is simply to try out Haxe, you don’t need to set up a language server. The page of your second link states that VSCode’s Haxe extension already uses that code for its own language server.
If you did in fact wish to try out a more complex language server system, any help I can offer is completely useless.
Ah I see. That’s odd. If you still want to try to fix it, you could see if there’s anything when you run :checkhealth or if anything comes up in $HOME/.cache/nvim/lsp.log.
I think there is nothing wrong with the neovim config, the main problem is that haxe filetype is not detected.
try: :setfiletype haxe
and check if the lsp is working.
Keep that in mind LSP works if you have cmp working so it gives you auto completion.
And there is no syntax highlighting, for syntax highlighting you might need vaxe too.
I don’t know yet if it works or not tho this is a simple lspconfig without lsp-installer: