Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running Biome with Deno #65

Open
JonathanTurnock opened this issue Jan 5, 2025 · 0 comments
Open

Running Biome with Deno #65

JonathanTurnock opened this issue Jan 5, 2025 · 0 comments

Comments

@JonathanTurnock
Copy link

Hey thanks so much for this plugin and Biome itself.

I had a little feedback around usage with Deno, while Deno does have a linter and formatter I find the coverage of features is poor for larger projects.

I wanted to use Biome with Deno for this reason but found it didn't play particularly nice with the symlink system and resulted in project configs with hardcoded paths most of the time not being detected unless hard coded. I am also on windows for what its worth :)

I settled on this config which is probably slightly not as intended but I wanted to log it as it does actually work fantastically.

Specifically setting the binary path to deno and the arguments to run -A npm:@biomejs/biome lsp-proxy allowed me to have a completely cross system and cross platform solution to starting the LSP proxy without having to worry where the binary is.

perhaps it would feel less hacky if there was an option to provide a custom command instead of a binary path.

{
	"code_actions_on_format": {
		"source.fixAll.biome": true,
		"source.organizeImports.biome": true
	},
	"formatter": {
		"language_server": {
			"name": "biome"
		}
	},
	"lsp": {
		"deno": {
			"settings": {
				"deno": {
					"enable": true
				}
			}
		},
		"biome": {
			"binary": {
				"path": "deno",
				"arguments": ["run", "-A", "npm:@biomejs/biome", "lsp-proxy"]
			},
			"settings": {
				"enabled": true
			}
		}
	},
	"languages": {
		"TypeScript": {
			"language_servers": [
				"deno",
				"biome",
				"!typescript-language-server",
				"!vtsls",
				"!eslint"
			],
			"formatter": "language_server"
		},
		"TSX": {
			"language_servers": [
				"deno",
				"biome",
				"!typescript-language-server",
				"!vtsls",
				"!eslint"
			],
			"formatter": "language_server"
		}
	}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant