summaryrefslogtreecommitdiff
path: root/lua/lang/zsh.lua
diff options
context:
space:
mode:
authorAbouzar Parvan <[email protected]>2021-07-15 05:18:05 +0430
committerGitHub <[email protected]>2021-07-14 20:48:05 -0400
commite6de44e4443042dc14d34e36dd8ee8528f4936f2 (patch)
treed600f814c33e9154bbb3fdde0dfda6e75b071483 /lua/lang/zsh.lua
parent2a7b3d4892605508d0b0328444d689e1c4922897 (diff)
more language reformat (#949)
Diffstat (limited to 'lua/lang/zsh.lua')
-rw-r--r--lua/lang/zsh.lua50
1 files changed, 50 insertions, 0 deletions
diff --git a/lua/lang/zsh.lua b/lua/lang/zsh.lua
new file mode 100644
index 00000000..c81bd96c
--- /dev/null
+++ b/lua/lang/zsh.lua
@@ -0,0 +1,50 @@
+local M = {}
+
+M.config = function()
+ -- TODO: implement config for language
+ return "No config available!"
+end
+
+M.format = function()
+ -- TODO: implement format for language
+ return "No format available!"
+end
+
+M.lint = function()
+ -- zsh
+ local zsh_arguments = {}
+
+ if not require("lv-utils").check_lsp_client_active "efm" then
+ require("lspconfig").efm.setup {
+ -- init_options = {initializationOptions},
+ cmd = { DATA_PATH .. "/lspinstall/efm/efm-langserver" },
+ init_options = { documentFormatting = true, codeAction = false },
+ root_dir = require("lspconfig").util.root_pattern ".git/",
+ filetypes = { "zsh" },
+ settings = {
+ rootMarkers = { ".git/" },
+ languages = {
+ zsh = zsh_arguments,
+ },
+ },
+ }
+ end
+end
+
+M.lsp = function()
+ if not require("lv-utils").check_lsp_client_active "bashls" then
+ -- npm i -g bash-language-server
+ require("lspconfig").bashls.setup {
+ cmd = { DATA_PATH .. "/lspinstall/bash/node_modules/.bin/bash-language-server", "start" },
+ on_attach = require("lsp").common_on_attach,
+ filetypes = { "sh", "zsh" },
+ }
+ end
+end
+
+M.dap = function()
+ -- TODO: implement dap
+ return "No DAP configured!"
+end
+
+return M