summaryrefslogtreecommitdiff
path: root/start/lspconfig-0.1.8/lua/lspconfig/server_configurations/cds_lsp.lua
diff options
context:
space:
mode:
Diffstat (limited to 'start/lspconfig-0.1.8/lua/lspconfig/server_configurations/cds_lsp.lua')
-rw-r--r--start/lspconfig-0.1.8/lua/lspconfig/server_configurations/cds_lsp.lua33
1 files changed, 33 insertions, 0 deletions
diff --git a/start/lspconfig-0.1.8/lua/lspconfig/server_configurations/cds_lsp.lua b/start/lspconfig-0.1.8/lua/lspconfig/server_configurations/cds_lsp.lua
new file mode 100644
index 0000000..a04876f
--- /dev/null
+++ b/start/lspconfig-0.1.8/lua/lspconfig/server_configurations/cds_lsp.lua
@@ -0,0 +1,33 @@
+local util = require 'lspconfig.util'
+
+local root_files = {
+ 'package.json',
+ 'db',
+ 'srv',
+}
+
+return {
+ default_config = {
+ cmd = { 'cds-lsp', '--stdio' },
+ filetypes = { 'cds' },
+ -- init_options = { provideFormatter = true }, -- needed to enable formatting capabilities
+ root_dir = util.root_pattern(unpack(root_files)),
+ single_file_support = true,
+ settings = {
+ cds = { validate = true },
+ },
+ },
+ docs = {
+ description = [[
+
+https://cap.cloud.sap/docs/
+
+`cds-lsp` can be installed via `npm`:
+
+```sh
+npm i -g @sap/cds-lsp
+```
+
+]],
+ },
+}