An open API service indexing awesome lists of open source software.

https://github.com/yskszk63/dlsortls

Launch deno lsp or typescript-language-server.
https://github.com/yskszk63/dlsortls

deno lsp typescript

Last synced: 2 months ago
JSON representation

Launch deno lsp or typescript-language-server.

Awesome Lists containing this project

README

          

# dlsortls

[![Go Report Card](https://goreportcard.com/badge/github.com/yskszk63/dlsortls)](https://goreportcard.com/report/github.com/yskszk63/dlsortls)

Launch `deno lsp` or `typescript-language-server`.

- If `package.json` exists -> launch typescript-language-server.
- If `deno.json` exists -> launch deno lsp.

## Install

```
paru -S dlsortls-bin
```

or

```
go install github.com/yskszk63/dlsortls@latest
```

or

[Download](https://github.com/yskszk63/dlsortls/releases/latest)

## Example

nvim-lspconfig

```lua
if not require'lspconfig.configs'.dlsortls then
require'lspconfig.configs'.dlsortls = {
default_config = {
init_options = {
enable = true,
lint = false,
unstable = false,
hostInfo = 'neovim',
},
cmd = { "dlsortls" },
filetypes = {
'javascript',
'javascriptreact',
'javascript.jsx',
'typescript',
'typescriptreact',
'typescript.tsx',
},
root_dir = function(fname)
local util = require'lspconfig.util'
return util.root_pattern 'tsconfig.json'(fname)
or util.root_pattern('package.json', 'jsconfig.json', '.git')(fname)
or util.root_pattern('deno.json', 'deno.jsonc', 'tsconfig.json', '.git')
end,
}
}
end
nvim_lsp.dlsortls.setup { }
```

## License

[MIT](LICENSE)