aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
authorpseudometa <73286100+chrisgrieser@users.noreply.github.com>2023-09-09 02:33:40 +0200
committerGitHub <noreply@github.com>2023-09-09 08:33:40 +0800
commitd295d6856b2d385ad49159faa1ce0f8b62c94555 (patch)
tree946a7f2ba00688daf3350b860ba2d7fb1b92118e /lua
parentdocs: update server_configurations.md (diff)
downloadnvim-lspconfig-d295d6856b2d385ad49159faa1ce0f8b62c94555.tar
nvim-lspconfig-d295d6856b2d385ad49159faa1ce0f8b62c94555.tar.gz
nvim-lspconfig-d295d6856b2d385ad49159faa1ce0f8b62c94555.tar.bz2
nvim-lspconfig-d295d6856b2d385ad49159faa1ce0f8b62c94555.tar.lz
nvim-lspconfig-d295d6856b2d385ad49159faa1ce0f8b62c94555.tar.xz
nvim-lspconfig-d295d6856b2d385ad49159faa1ce0f8b62c94555.tar.zst
nvim-lspconfig-d295d6856b2d385ad49159faa1ce0f8b62c94555.zip
feat: add `biome` (`rome` successor) (#2790)
* feat: add `biome` (`rome` successor) * fix: add jsonc support for biome biome recently added support for jsonc https://biomejs.dev/blog/biome-v1#jsonc-support-and-comments * fix: leftover reference to `rome`
Diffstat (limited to 'lua')
-rw-r--r--lua/lspconfig/server_configurations/biome.lua36
-rw-r--r--lua/lspconfig/server_configurations/rome.lua2
2 files changed, 38 insertions, 0 deletions
diff --git a/lua/lspconfig/server_configurations/biome.lua b/lua/lspconfig/server_configurations/biome.lua
new file mode 100644
index 00000000..d8f144e6
--- /dev/null
+++ b/lua/lspconfig/server_configurations/biome.lua
@@ -0,0 +1,36 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = { 'biome', 'lsp-proxy' },
+ filetypes = {
+ 'javascript',
+ 'javascriptreact',
+ 'json',
+ 'jsonc',
+ 'typescript',
+ 'typescript.tsx',
+ 'typescriptreact',
+ },
+ root_dir = function(fname)
+ return util.find_package_json_ancestor(fname)
+ or util.find_node_modules_ancestor(fname)
+ or util.find_git_ancestor(fname)
+ end,
+ single_file_support = true,
+ },
+ docs = {
+ description = [[
+https://biomejs.dev
+
+Toolchain of the web. [Successor of Rome](https://biomejs.dev/blog/annoucing-biome).
+
+```sh
+npm install [-g] @biomejs/biome
+```
+]],
+ default_config = {
+ root_dir = [[root_pattern('package.json', 'node_modules', '.git', 'biome.json')]],
+ },
+ },
+}
diff --git a/lua/lspconfig/server_configurations/rome.lua b/lua/lspconfig/server_configurations/rome.lua
index a99a1a28..ed23a189 100644
--- a/lua/lspconfig/server_configurations/rome.lua
+++ b/lua/lspconfig/server_configurations/rome.lua
@@ -24,6 +24,8 @@ https://rome.tools
Language server for the Rome Frontend Toolchain.
+(Unmaintained, use [Biome](https://biomejs.dev/blog/annoucing-biome) instead.)
+
```sh
npm install [-g] rome
```