summaryrefslogtreecommitdiff
path: root/nvim/lsp/matlab_ls.lua
diff options
context:
space:
mode:
authoranand <anand.panchdhari@gmail.com>2025-12-17 15:57:55 +0530
committeranand <anand.panchdhari@gmail.com>2025-12-17 15:57:55 +0530
commitb7ef29a8886a57aadb787807a7c6cf74c1f0ed3a (patch)
tree366a68240fbc9da6b1d567bd6c46d1350ad814de /nvim/lsp/matlab_ls.lua
Nixos
Diffstat (limited to 'nvim/lsp/matlab_ls.lua')
-rwxr-xr-xnvim/lsp/matlab_ls.lua32
1 files changed, 32 insertions, 0 deletions
diff --git a/nvim/lsp/matlab_ls.lua b/nvim/lsp/matlab_ls.lua
new file mode 100755
index 0000000..bf4f4f7
--- /dev/null
+++ b/nvim/lsp/matlab_ls.lua
@@ -0,0 +1,32 @@
+---@brief
+---
+--- https://github.com/mathworks/MATLAB-language-server
+---
+--- MATLAB® language server implements the Microsoft® Language Server Protocol for the MATLAB language.
+---
+--- Make sure to set `MATLAB.installPath` to your MATLAB path, e.g.:
+--- ```lua
+--- settings = {
+--- MATLAB = {
+--- ...
+--- installPath = '/usr/local/MATLAB/R2023a',
+--- ...
+--- },
+--- },
+--- ```
+return {
+ cmd = { 'matlab-language-server', '--stdio' },
+ filetypes = { 'matlab' },
+ root_dir = function(bufnr, on_dir)
+ local root_dir = vim.fs.root(bufnr, '.git')
+ on_dir(root_dir or vim.fn.getcwd())
+ end,
+ settings = {
+ MATLAB = {
+ indexWorkspace = true,
+ installPath = '', -- NOTE: Set this to your MATLAB installation path.
+ matlabConnectionTiming = 'onStart',
+ telemetry = true,
+ },
+ },
+}