REditorSupport / sublime-ide-r

R-IDE: Make Sublime Text a perfect IDE for R
MIT License
112 stars 7 forks source link

AttributeError: 'str' object has no attribute 'get #43

Open tvby opened 4 years ago

tvby commented 4 years ago

Sublime Text 3 (3211) Win10 Latest Version of sublime-ide-r, LSP, and R 4.0.1 Each time that I enable disable LSP for a project or Globally I get the following:

Traceback (most recent call last):
  File "C:\Users\testing\AppData\Roaming\Sublime Text 3\Installed Packages\LSP.sublime-package\plugin/configuration.py", line 80, in _on_done
  File "C:\Users\testing\AppData\Roaming\Sublime Text 3\Installed Packages\LSP.sublime-package\plugin/core/windows.py", line 375, in disable_config
  File "C:\Users\testing\AppData\Roaming\Sublime Text 3\Installed Packages\LSP.sublime-package\plugin/core/windows.py", line 365, in update_configs
  File "C:\Users\testing\AppData\Roaming\Sublime Text 3\Installed Packages\LSP.sublime-package\plugin/core/configurations.py", line 108, in update
  File "C:\Users\testing\AppData\Roaming\Sublime Text 3\Installed Packages\LSP.sublime-package\plugin/core/configurations.py", line 126, in _create_window_configs
AttributeError: 'str' object has no attribute 'get

In the r-ide settings I have pointed the r_binary to the C:\Program Files R folder the r_binary_lsp to the language server for R am I missing something because autocomplete does not work

tvby commented 4 years ago

posted in wrong repository

randy3k commented 4 years ago

Actually, I think it is the correct place for it.

tvby commented 4 years ago

oh ok I will repost

randy3k commented 4 years ago

Actually I am not sure the cause of it, it is working fine locally on my mac.

tvby commented 4 years ago

The above message shows when the LSP package is enabled globally and only has the following in the LSP settings causing rlang server to never run

{
    "clients":
    {
        "rlang":
        {
            "enabled": false,
        }
    }
}

but if the following is put in the LSP settings:

{
    "clients":
    {
        "rlang":
        {
            "command":
            [
                "R",
                "--slave",
                "-e",
                "C:\\Users\\tester\\Documents\\R\\win-library\\4.0\\languageserver\\libs\\x64\\languageserver.dll"
            ],
            "enabled": true,
            "languageId": "r",
            "scopes":
            [
                "source.r"
            ],
            "syntaxes":
            [
                "Packages/R/R.sublime-syntax"

            ]
        }
    }
}

rlang starts but without any auto-completion

so is this the correct command if the R packages are not in the Program Files folder but in the RStudio win-library folder?

randy3k commented 4 years ago

With R-IDE, you only need


{
    "clients":
    {
        "rlang":
        {
            "enabled": true,
        }
    }
}
tvby commented 4 years ago

Ok I get the rlang serving is starting and running but do not get auto-completions is there another setting I am missing?