Code Monkey home page Code Monkey logo

lsp-deno's People

Contributors

predragnikolic avatar rchl avatar rwols avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

sebakri

lsp-deno's Issues

Can't load config

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"
    }
  }
}

Enabling compatability mode (--compat)

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?

deno.enable is not working

it seems LSP-Deno and LSP-typescript are enabled at the same time.

CleanShot 2021-06-25 at 11 15 42@2x

And here is my .sublime-project:

{
	"folders": 	[
		{ "path": "." }
	],
	"settings": {
		"LSP": {
			"Deno": {
				"settings": {
					"deno.enable": true
				}
			}
		}
	}
}

Project settings not overriding language server settings

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

  1. Create a Deno import-map file, e.g.:

    {
      "x/": "https://deno.land/x/"
    }
  2. Create a new typescript file and attempt to import something using the import mapping:

    import { Application, Router } from 'x/oak/mod.ts';
  3. 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):

  • OS: Windows 10
  • Sublime Text version: 4107
  • LSP version: 1.6.1
  • Language servers used: Deno

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"
        }
      }
    }
  }
}

Error: No such file or directory "deno"

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)

Getting "failed to update settings: invalid type: map, expected a boolean" in log for "deno.suggest.imports.hosts"

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 ?

Full log
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!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.