From 705d36650da34cbedba6a44c5e809b9b033fe3bd Mon Sep 17 00:00:00 2001 From: Martin Sigloch Date: Tue, 7 May 2024 07:26:18 +0200 Subject: feat: add motoko-lsp support (#3140) --- lua/lspconfig/server_configurations/motoko_lsp.lua | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 lua/lspconfig/server_configurations/motoko_lsp.lua (limited to 'lua') diff --git a/lua/lspconfig/server_configurations/motoko_lsp.lua b/lua/lspconfig/server_configurations/motoko_lsp.lua new file mode 100644 index 00000000..c0f6a351 --- /dev/null +++ b/lua/lspconfig/server_configurations/motoko_lsp.lua @@ -0,0 +1,23 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'motoko-lsp', '--stdio' }, + filetypes = { 'motoko' }, + root_dir = util.root_pattern('dfx.json', '.git'), + init_options = { + formatter = 'auto', + }, + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/dfinity/vscode-motoko + +Language server for the Motoko programming language. + ]], + default_config = { + root_dir = [[root_pattern("dfx.json", ".git")]], + }, + }, +} -- cgit v1.2.3-70-g09d2