Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setting it up in sublime text #29

Closed
kurokirasama opened this issue Dec 4, 2023 · 3 comments
Closed

setting it up in sublime text #29

kurokirasama opened this issue Dec 4, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@kurokirasama
Copy link

kurokirasama commented Dec 4, 2023

Hey, I'm trying to set this up in sublime text.
First I followed the instructions provided here to download and install the server.

Then, in sublime text with the lsp package installed, I use this setting:

"matlab": {
               "command": ["/path/to/lsp-matlab", "--stdio", "--matlabInstallPath '/usr/local/MATLAB/R2023a'"],
               "enabled": true,
               "selector": "source.matlab"
           }

where the lsp-matlab file has this:

#!/usr/bin/env bash

node /home/user/software/MATLAB-language-server/out/index.js $@

Now, according to this log, the service starts but it crashes.

startup, version: 4169 linux x64 channel: stable
executable: /opt/sublime_text/sublime_text
application: /opt/sublime_text
working dir: /home/kira
packages path: /home/kira/.config/sublime-text/Packages
state path: /home/kira/.config/sublime-text/Local
zip path: /opt/sublime_text/Packages
zip path: /home/kira/.config/sublime-text/Installed Packages
ignored_packages: ["Vintage"]
Errors parsing theme:
  "class" is required in Packages/User/Adaptive.sublime-theme:10:17
pre session restore time: 0.123094
loading dictionary Packages/Language - English/en_US.dic
startup time: 0.305648
first paint time: 0.318158
reloading plugin Default.arithmetic
reloading plugin Default.auto_indent_tag
reloading plugin Default.block
reloading plugin Default.colors
reloading plugin Default.comment
reloading plugin Default.convert_color_scheme
reloading plugin Default.convert_syntax
reloading plugin Default.copy_path
reloading plugin Default.echo
reloading plugin Default.exec
reloading python 3.3 plugin AutoFileName.autofilename
reloading plugin Default.fold
reloading python 3.3 plugin AutoFileName.getimageinfo
reloading python 3.3 plugin BracketHighlighter.bh_core
reloading plugin Default.font
reloading plugin Default.goto_line
reloading plugin Default.history_list
reloading plugin Default.html_print
reloading plugin Default.indentation
reloading plugin Default.install_package_control
reloading plugin Default.keymap
reloading plugin Default.kill_ring
reloading plugin Default.mark
reloading plugin Default.new_templates
reloading plugin Default.open_context_url
reloading plugin Default.open_in_browser
reloading plugin Default.pane
reloading plugin Default.paragraph
reloading plugin Default.paste_from_history
reloading plugin Default.profile
reloading plugin Default.quick_panel
reloading plugin Default.rename
reloading plugin Default.run_syntax_tests
reloading plugin Default.save_on_focus_lost
reloading plugin Default.scroll
reloading plugin Default.set_unsaved_view_name
reloading plugin Default.settings
reloading plugin Default.show_scope_name
reloading plugin Default.side_bar
reloading plugin Default.sort
reloading plugin Default.switch_file
reloading plugin Default.symbol
reloading plugin Default.transform
reloading plugin Default.transpose
reloading plugin Default.ui
reloading plugin CSS.css_completions
reloading plugin Diff.diff
reloading plugin HTML.encode_html_entities
reloading plugin HTML.html_completions
reloading plugin MarkdownEditing.plugin
reloading plugin Package Control.plugin
reloading python 3.3 plugin BracketHighlighter.bh_logging
reloading python 3.3 plugin BracketHighlighter.bh_plugin
reloading python 3.3 plugin BracketHighlighter.bh_popup
reloading python 3.3 plugin BracketHighlighter.bh_regions
reloading python 3.3 plugin BracketHighlighter.bh_remove
reloading python 3.3 plugin BracketHighlighter.bh_rules
reloading python 3.3 plugin BracketHighlighter.bh_search
reloading python 3.3 plugin BracketHighlighter.bh_swapping
reloading python 3.3 plugin BracketHighlighter.bh_wrapping
reloading python 3.3 plugin BracketHighlighter.support
reloading python 3.3 plugin LSP-bash.plugin
reloading python 3.3 plugin LSP-clangd.plugin
reloading python 3.3 plugin LSP-html.plugin
reloading python 3.3 plugin LSP-html.types
reloading python 3.3 plugin LSP-json.commands
reloading python 3.3 plugin LSP-json.plugin
reloading python 3.3 plugin LSP-json.schema_store
reloading python 3.3 plugin LSP-marksman.plugin
reloading python 3.3 plugin LSP-pyright.commands
reloading python 3.3 plugin LSP-pyright.plugin
reloading python 3.3 plugin LSP-R.plugin
reloading python 3.3 plugin LSP-TexLab.const
reloading python 3.3 plugin LSP-TexLab.lsp_texlab_auto_complete
reloading python 3.3 plugin LSP-TexLab.lsp_texlab_build_system
reloading python 3.3 plugin LSP-TexLab.plugin
reloading python 3.3 plugin LSP-TexLab.server
reloading python 3.3 plugin LSP-TexLab.tarball
reloading python 3.3 plugin LSP.boot
reloading python 3.3 plugin PackageDev._logging
reloading python 3.3 plugin PackageDev.main
reloading python 3.3 plugin Sync View Scroll.syncscroll
reloading python 3.3 plugin Terminus.main
reloading python 3.3 plugin View In Browser.ViewInBrowserCommand
reloading python 3.3 plugin SendCode.choose_prog
reloading python 3.3 plugin SendCode.exec
reloading python 3.3 plugin SendCode.install_xdotool
reloading python 3.3 plugin SendCode.send_code
reloading python 3.3 plugin SendCode.settings
plugins loaded
rlang is disabled by LSP-R.
LSP: enabled configs: LSP-R, LSP-TexLab, LSP-bash, LSP-html, LSP-json, LSP-pyright, clangd, marksman, matlab, nushell
LSP: disabled configs: erlang-ls, ocaml, polymer-ide, rlang, ruby, sorbet
syncScroll starting
Traceback (most recent call last):
  File "/home/kira/.config/sublime-text/Installed Packages/LSP.sublime-package/plugin/core/windows.py", line 484, in _update_panel_main_thread
    panel.run_command("lsp_update_panel", {"characters": characters})
  File "/opt/sublime_text/Lib/python33/sublime.py", line 1395, in run_command
    sublime_api.view_run_command(self.view_id, cmd, args)
  File "/opt/sublime_text/Lib/python33/sublime_plugin.py", line 1495, in run_
    self.view.end_edit(edit)
  File "/opt/sublime_text/Lib/python33/sublime.py", line 1356, in end_edit
    sublime_api.view_end_edit(self.view_id, edit.edit_token)
  File "/opt/sublime_text/Lib/python33/sublime_plugin.py", line 924, in on_modified
    run_view_callbacks('on_modified', view_id)
  File "/opt/sublime_text/Lib/python33/sublime_plugin.py", line 708, in run_view_callbacks
    callback(v, *args)
  File "/opt/sublime_text/Lib/python33/sublime_plugin.py", line 152, in profiler
    return event_handler(*args)
  File "/home/kira/.config/sublime-text/Installed Packages/AutoFileName.sublime-package/autofilename.py", line 162, in on_modified
    sel = view.sel()[0].a
  File "/opt/sublime_text/Lib/python33/sublime.py", line 1087, in __getitem__
    raise IndexError()
IndexError
LSP: starting ['/home/kira/Yandex.Disk/Comandos_bash_for_nushell/lsp-matlab', '--stdio', "--matlabInstallPath '/usr/local/MATLAB/R2023a'"] in /opt/sublime_text
LSP: matlab: Supported execute commands: ['matlabls.lint.suppress.line', 'matlabls.lint.suppress.file']
LSP: matlab: registering capability: didChangeConfigurationProvider
LSP: matlab: registering capability: workspace.workspaceFolders
LSP: matlab crashed (1 / 5 times in the last 180.0 seconds), exit code 1, exception: None
LSP: starting ['/home/kira/Yandex.Disk/Comandos_bash_for_nushell/lsp-matlab', '--stdio', "--matlabInstallPath '/usr/local/MATLAB/R2023a'"] in /opt/sublime_text
LSP: matlab: Supported execute commands: ['matlabls.lint.suppress.line', 'matlabls.lint.suppress.file']
LSP: matlab: registering capability: didChangeConfigurationProvider
LSP: matlab: registering capability: workspace.workspaceFolders
LSP: matlab crashed (2 / 5 times in the last 180.0 seconds), exit code 1, exception: None
LSP: starting ['/home/kira/Yandex.Disk/Comandos_bash_for_nushell/lsp-matlab', '--stdio', "--matlabInstallPath '/usr/local/MATLAB/R2023a'"] in /opt/sublime_text
LSP: matlab: Supported execute commands: ['matlabls.lint.suppress.line', 'matlabls.lint.suppress.file']
LSP: matlab: registering capability: didChangeConfigurationProvider
LSP: matlab: registering capability: workspace.workspaceFolders
LSP: matlab crashed (3 / 5 times in the last 180.0 seconds), exit code 1, exception: None
LSP: starting ['/home/kira/Yandex.Disk/Comandos_bash_for_nushell/lsp-matlab', '--stdio', "--matlabInstallPath '/usr/local/MATLAB/R2023a'"] in /opt/sublime_text
LSP: matlab: Supported execute commands: ['matlabls.lint.suppress.line', 'matlabls.lint.suppress.file']
LSP: matlab: registering capability: didChangeConfigurationProvider
LSP: matlab: registering capability: workspace.workspaceFolders
LSP: matlab crashed (4 / 5 times in the last 180.0 seconds), exit code 1, exception: None
LSP: starting ['/home/kira/Yandex.Disk/Comandos_bash_for_nushell/lsp-matlab', '--stdio', "--matlabInstallPath '/usr/local/MATLAB/R2023a'"] in /opt/sublime_text
LSP: matlab: Supported execute commands: ['matlabls.lint.suppress.line', 'matlabls.lint.suppress.file']
LSP: matlab: registering capability: didChangeConfigurationProvider
LSP: matlab: registering capability: workspace.workspaceFolders
LSP: matlab crashed (5 / 5 times in the last 180.0 seconds), exit code 1, exception: None
Package Control: Skipping automatic upgrade, last run at 2023-12-03 16:45:12, next run at 2023-12-04 00:45:12 or after
LSP: starting ['/home/kira/Yandex.Disk/Comandos_bash_for_nushell/lsp-matlab', '--stdio', "--matlabInstallPath '/usr/local/MATLAB/R2023a'"] in /opt/sublime_text
LSP: matlab: Supported execute commands: ['matlabls.lint.suppress.line', 'matlabls.lint.suppress.file']
LSP: matlab: registering capability: didChangeConfigurationProvider
LSP: matlab: registering capability: workspace.workspaceFolders
LSP: matlab crashed (5 / 5 times in the last 180.0 seconds), exit code 1, exception: None

Can you see if I'm using the server wrong or something else is wrong?

Regards,

@kurokirasama kurokirasama added the bug Something isn't working label Dec 4, 2023
@dklilley
Copy link
Member

dklilley commented Dec 5, 2023

Unfortunately, I am not able to provide much guidance for getting this set up in IDEs beyond VS Code. I would suggest that you convert this issue into a discussion, and then other Sublime Text users can contribute to the conversation.

One idea I have would be to modify the command you are specifying as such:

"command": ["/path/to/lsp-matlab", "--stdio", "--matlabInstallPath=/usr/local/MATLAB/R2023a"]

This is how the --matlabInstallPath option is specified within the VS Code extension.

@kurokirasama
Copy link
Author

hey, thanks for your suggestion, unfortunately it didn't work.
How do I transform this into a "discussion"?

@dklilley
Copy link
Member

dklilley commented Dec 5, 2023

It looks like I need to do that from my end, actually. I will do the conversion.

@mathworks mathworks locked and limited conversation to collaborators Dec 5, 2023
@dklilley dklilley converted this issue into discussion #32 Dec 5, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants