inline-ts-lsp
v0.1.0
Published
Supplementary LSP that extracts <script> from HTML and proxies it to typescript-language-server
Readme
inline-ts-lsp
Supplementary LSP that extracts <script> sections from HTML files and
forwards TypeScript/JavaScript requests to typescript-language-server.
Currently neither Nvim nor Zed support inline javascript.
There is probably a better way of doing this but so far this method was the easiest and fastest.
Quick start
Install dependencies:
npm installStart the server as the LSP command for your editor.
2.1. nvim
lspconfigsnippet:require('lspconfig').inline_ts_ls = { default_config = { cmd = { 'node', '/path/to/inline-ts-lsp/src/server.js' }, filetypes = { 'html' }, root_dir = function() return vim.loop.cwd() end, } } require('lspconfig').inline_ts_ls.setup({})2.2. Zed:
TODO - link zed extension
