How to set up Angular Language Service in Neovim

Discussão em 'Angular' iniciado por domrac, Novembro 29, 2024.

  1. domrac

    domrac Guest

    My setup at the moment looks like this:

    local cwd = vim.fn.getcwd()
    local project_library_path = cwd .. "/node_modules"

    local cmd = {
    DATA_PATH .. "/lsp_servers/angularls/node_modules/@angular/language-server/bin/ngserver",
    "--ngProbeLocations",
    project_library_path,
    "--tsProbeLocations",
    project_library_path ,
    "--stdio",
    }

    require'lspconfig'.angularls.setup{
    cmd = cmd,
    on_new_config = function(new_config, new_root_dir)
    new_config.cmd = cmd
    end
    }



    On :LspInfo, I can see that the cmd is executable, but somehow it doesn't attach.

    I have difficulty to differentiate @angular/language-server from @angular/language-service...

    I am not sure what the tsProbeLocations and ngProbeLocations do and if my path is correct.

    Finally, I red from Angular Language Service website and there isn't a good guideline for neovim. (except for coc-angular, but I don't use coc.)

    Continue reading...

Compartilhe esta Página