From 71e0266b4b67a8924abbadfce4a4ee1c123b39a2 Mon Sep 17 00:00:00 2001 From: Abouzar Parvan Date: Sun, 18 Jul 2021 03:41:26 +0430 Subject: added support for svelte (#1008) --- lua/lang/svelte.lua | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 lua/lang/svelte.lua (limited to 'lua/lang/svelte.lua') diff --git a/lua/lang/svelte.lua b/lua/lang/svelte.lua new file mode 100644 index 00000000..220c2c18 --- /dev/null +++ b/lua/lang/svelte.lua @@ -0,0 +1,35 @@ +local M = {} + +M.config = function() + O.lang.svelte = {} +end + +M.format = function() + -- TODO: implement formatter (if applicable) + return "No formatter configured!" +end + +M.lint = function() + -- TODO: implement linters (if applicable) + return "No linters configured!" +end + +M.lsp = function() + if require("lv-utils").check_lsp_client_active "svelte" then + return + end + + require("lspconfig").svelte.setup { + cmd = { DATA_PATH .. "/lspinstall/svelte/node_modules/.bin/svelteserver", "--stdio" }, + filetypes = { "svelte" }, + root_dir = require("lspconfig.util").root_pattern("package.json", ".git"), + on_attach = require("lsp").common_on_attach, + } +end + +M.dap = function() + -- TODO: implement dap + return "No DAP configured!" +end + +return M -- cgit v1.2.3