From 6c2fb86c6a03e20abea5ddd17d735885f0b7cb5e Mon Sep 17 00:00:00 2001 From: Michael Lingelbach Date: Wed, 24 Nov 2021 23:01:07 -0500 Subject: feat: expose configs --- lua/lspconfig/server_configurations/rome.lua | 35 ++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 lua/lspconfig/server_configurations/rome.lua (limited to 'lua/lspconfig/server_configurations/rome.lua') diff --git a/lua/lspconfig/server_configurations/rome.lua b/lua/lspconfig/server_configurations/rome.lua new file mode 100644 index 00000000..9c9472c6 --- /dev/null +++ b/lua/lspconfig/server_configurations/rome.lua @@ -0,0 +1,35 @@ +local util = require 'lspconfig/util' + +return { + 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) + end, + single_file_support = true, + }, + docs = { + description = [[ +https://rome.tools + +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]], + }, + }, +} -- cgit v1.2.3-70-g09d2