sublimelsp / lsp-deno Goto Github PK
View Code? Open in Web Editor NEWConvenience package for starting the deno lsp server
License: MIT License
Convenience package for starting the deno lsp server
License: MIT License
I cannot make "deno.config": "path/to/cfg.json"
to work. Tried both absolute and relative paths.
The config works when called directly: deno fmt --config
, but is ignored when in the settings and using the LSP format โ the indentWidth
etc is ignored.
Config:
{
"fmt": {
"options": {
"useTabs": false,
"lineWidth": 80,
"indentWidth": 4,
"singleQuote": true,
"proseWrap": "preserve"
}
}
}
When you quit ST, then open ST, Deno has trouble handling requests for the open virtual views. This seems to be because it expects the client to request deno/virtualTextDocument
before any other request for those kinds of virtual views. See: denoland/deno#11232
Is it possible to enable the --compat mode?
Deno exits with 1
if it's added to the command
section of the settings. (The required unstable
flag was enabled, so it's not the issue).
Is there any other way to pass the flag?
Describe the bug
I'm not sure if this is a bug or user error, but my project settings for Deno import maps are not overriding default language server settings for LSP-Deno.
To Reproduce
Create a Deno import-map file, e.g.:
{
"x/": "https://deno.land/x/"
}
Create a new typescript file and attempt to import something using the import mapping:
import { Application, Router } from 'x/oak/mod.ts';
LSP-Deno reports error:
relative import path "x/oak/mod.ts" not prefixed with / or ./ or ../ Imported from "file:///path/to/file.ts"
Expected behavior
No error is reported and type checking works properly as though the import path were https://deno.land/x/oak/mod.ts
Environment (please complete the following information):
Additional context
My sublime-project file is as follows (the documentation and issues I looked at gave confusing and/or conflicting directions as to where to put the setting so I have tried everything I can think of to get it to work, none of these do):
{
"folders": [
{
"path": "."
}
],
"settings": {
"deno.importMap": "./import-map.json",
"LSP": {
"deno.importMap": "./import-map.json",
"clients": {
"deno": {
"deno.importMap": "./import-map.json",
"settings": {
"deno.importMap": "./import-map.json"
}
}
},
"deno": {
"deno.importMap": "./import-map.json",
"settings": {
"deno.importMap": "./import-map.json"
}
}
}
}
}
I spent an embarrassingly long amount of time looking at rubbish LSP warnings before I realised the LSP-typescript ones were being presented, not the LSP-Deno ones :)
I've installed Deno and LSP but whenever I try to enable the Deno language server, it throws an error stated in the title of this issue.
OS: Linux Mint 21.2 Cinnamon
(My user configuration is the default one)
Hi! Thanks for a great package ๐
I'm 99% up and running with Deno in Sublime now, but I have this "One Last Thing"...
This is my project file:
{
"settings": {
"lsp_format_on_save": true,
"LSP": {
"LSP-typescript": {
"enabled": false,
},
"Deno": {
"enabled": true,
"settings": {
"deno.enable": true,
"deno.config": "./deno.jsonc",
"deno.unstable": true,
"deno.suggest.imports.hosts": {
"https://deno.land": true,
"https://cdn.skypack.dev": true,
"https://esm.sh": true,
}
}
},
},
},
}
When saving this, I get this message in the LSP log panel:
failed to update settings: invalid type: map, expected a boolean
This indicates some violation of the JSON schema, I assume.
No warning border is shown in the UI though. If I change some other property, the LSP-json
package will complain and show a yellow border at the location of the incorrect property.
If I remove the deno.suggest.imports.hosts
property, the log line disappears.
But to me, the schema in this package seems correct, when checking https://github.com/sublimelsp/LSP-Deno/blob/main/sublime-package.json#L140 ?
Deno: Starting Deno language server...
Deno: version: 1.18.1 (release, x86_64-apple-darwin)
Deno: executable: xxx/.deno/bin/deno
Deno: Connected to "Sublime Text LSP" 1.15.0
Deno: Auto-resolved configuration file: "file:///xxx/deno.jsonc"
Deno: language server initialized
Deno: Server ready.
Deno: failed to update settings: invalid type: map, expected a boolean
Deno: Auto-resolved configuration file: "file:///xxx/deno.jsonc"
Let me know if this is not the correct location for this issue. Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.