aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
authorPeter Lithammer <peter.lithammer@gmail.com>2020-09-06 05:52:35 +0200
committerGitHub <noreply@github.com>2020-09-05 20:52:35 -0700
commit206064e326700f44eec39fca93993e1c6a7f0c1d (patch)
tree750fc9c408159bbb3bac51efdccf855a4869f1d8 /lua
parent[docgen] Update README.md (diff)
downloadnvim-lspconfig-206064e326700f44eec39fca93993e1c6a7f0c1d.tar
nvim-lspconfig-206064e326700f44eec39fca93993e1c6a7f0c1d.tar.gz
nvim-lspconfig-206064e326700f44eec39fca93993e1c6a7f0c1d.tar.bz2
nvim-lspconfig-206064e326700f44eec39fca93993e1c6a7f0c1d.tar.lz
nvim-lspconfig-206064e326700f44eec39fca93993e1c6a7f0c1d.tar.xz
nvim-lspconfig-206064e326700f44eec39fca93993e1c6a7f0c1d.tar.zst
nvim-lspconfig-206064e326700f44eec39fca93993e1c6a7f0c1d.zip
Add "Rome" language server (#344)
Diffstat (limited to 'lua')
-rw-r--r--lua/nvim_lsp/rome.lua37
1 files changed, 37 insertions, 0 deletions
diff --git a/lua/nvim_lsp/rome.lua b/lua/nvim_lsp/rome.lua
new file mode 100644
index 00000000..504a8bde
--- /dev/null
+++ b/lua/nvim_lsp/rome.lua
@@ -0,0 +1,37 @@
+local configs = require 'nvim_lsp/configs'
+local util = require 'nvim_lsp/util'
+
+configs.rome = {
+ default_config = {
+ cmd = {'rome', 'lsp'},
+ filetypes = {
+ 'javascript',
+ 'javascriptreact',
+ 'json',
+ '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) or
+ util.path.dirname(fname)
+ end
+ },
+ docs = {
+ description = [[
+https://romefrontend.dev
+
+Language server for the Rome Frontend Toolchain.
+
+```sh
+npm install [-g] rome
+```
+]],
+ default_config = {
+ root_dir = [[root_pattern('package.json', 'node_modules', '.git') or dirname]]
+ }
+ }
+}
+