aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
authortiagovla <30515389+tiagovla@users.noreply.github.com>2023-06-02 22:44:11 -0300
committerGitHub <noreply@github.com>2023-06-03 09:44:11 +0800
commit6bf9f7e2757006d725b96a8d5408bb8ba105c591 (patch)
treefa52ee44dc3898fb8a8ea032628363f630008869 /lua
parentdocs: update server_configurations.md (diff)
downloadnvim-lspconfig-6bf9f7e2757006d725b96a8d5408bb8ba105c591.tar
nvim-lspconfig-6bf9f7e2757006d725b96a8d5408bb8ba105c591.tar.gz
nvim-lspconfig-6bf9f7e2757006d725b96a8d5408bb8ba105c591.tar.bz2
nvim-lspconfig-6bf9f7e2757006d725b96a8d5408bb8ba105c591.tar.lz
nvim-lspconfig-6bf9f7e2757006d725b96a8d5408bb8ba105c591.tar.xz
nvim-lspconfig-6bf9f7e2757006d725b96a8d5408bb8ba105c591.tar.zst
nvim-lspconfig-6bf9f7e2757006d725b96a8d5408bb8ba105c591.zip
feat: add matlab-language-server (#2643)
* feat: add matlab-language-server * fix: rename to matlab_ls * fix: default value of indexWorkspace is false
Diffstat (limited to 'lua')
-rw-r--r--lua/lspconfig/server_configurations/matlab_ls.lua31
1 files changed, 31 insertions, 0 deletions
diff --git a/lua/lspconfig/server_configurations/matlab_ls.lua b/lua/lspconfig/server_configurations/matlab_ls.lua
new file mode 100644
index 00000000..80c868f0
--- /dev/null
+++ b/lua/lspconfig/server_configurations/matlab_ls.lua
@@ -0,0 +1,31 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = { 'matlab-language-server', '--stdio' },
+ filetypes = { 'matlab' },
+ root_dir = util.find_git_ancestor,
+ single_file_support = false,
+ settings = {
+ matlab = {
+ indexWorkspace = false,
+ installPath = '',
+ matlabConnectionTiming = 'onStart',
+ telemetry = true,
+ },
+ },
+ handlers = {
+ ['workspace/configuration'] = function(_, _, ctx)
+ local client = vim.lsp.get_client_by_id(ctx.client_id)
+ return { client.config.settings.matlab }
+ end,
+ },
+ },
+ docs = {
+ description = [[
+https://github.com/mathworks/MATLAB-language-server
+
+MATLAB® language server implements the Microsoft® Language Server Protocol for the MATLAB language.
+]],
+ },
+}