File Type ST - Apex Language Server

I’m trying to get this Apex Language Server connected. I can start the server from the command line but I’m unable to get any clients to attach. LspInfo seems to think the file type is ‘st’ but the file extension is .cls. See screenshot. Where is it getting st from?

Here’s my config:

local lspconfig = require'lspconfig'
local configs = require'lspconfig/configs'
if not lspconfig.apexls then

  configs.apexls = {
    default_config = {
      cmd = { 'java', '-jar', '~/.local/share/nvim/myls/apex/apex-jorje-lsp.jar' },
      filetypes = { 'cls', 'trigger', 'apex' },
      root_dir = lspconfig.util.root_pattern('sfdx-project.json'),
      settings = {},
    },
  }
end
lspconfig.apexls.setup{
    on_attach = require'lsp'.common_on_attach
}

I found the :setfiletype command in the documentation. So this hurdle is passed for now, I’ll figure out the autodetect later. Now I think I need to figure out what arguments to pass to the java executable.

Where you able to make it work? I’m trying to follow your configuration but to no avail…
By the way this is how you can set file type for apex automatically:

au BufRead,BufNewFile *.cls,*.trigger,*.apex set filetype=apex

I’m pretty new to Neovim and have the same problem.

This is how it looks right now:

lspconfig.apex_ls.setup({
          apex_jar_path = vim.fn.expand("$HOME/apex-jorje-lsp.jar"),
          filetypes = { 'cls', 'trigger', 'apex' },
          apex_enable_semantic_errors = false,
          apex_enable_completion_statistics = false,
      })

It works, when i set the filetype manually with :setfiletype, but apex classes and such are not being recognized automatically.

I would be thankful for any help.