Skip to content

Astro lsp doesn't work with current documentation instructions #4101

@AndrijaSkontra

Description

@AndrijaSkontra

Description

astro-ls can be installed via npm >sh
npm install -g @astrojs/language-server

Snippet to enable the language server: >lua
vim.lsp.enable('astro')

This didn't attach astro lsp for me, I had to also install typescript as dev dependency: npm install --save-dev typescript , before that I was getting this error:

Error executing vim.schedule lua callback: .../neovim/0.11.3/share/nvim/runtime/lua/vim/lsp/client.lua:545: RPC[Error] code_name = InternalError, message = "R
equest initialize failed with message: The `typescript.tsdk` init option is required. It should point to a directory containing a `typescript.js` or `tsserver
library.js` file, such as `node_modules/typescript/lib`."
stack traceback:
        [C]: in function 'assert'
        .../neovim/0.11.3/share/nvim/runtime/lua/vim/lsp/client.lua:545: in function ''
        vim/_editor.lua: in function <vim/_editor.lua:0>

Maybe you can include this in the documentation?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions