sublime-ide-r icon indicating copy to clipboard operation
sublime-ide-r copied to clipboard

AttributeError: 'str' object has no attribute 'get

Open tvby opened this issue 5 years ago • 7 comments

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 avatar Jun 17 '20 11:06 tvby

posted in wrong repository

tvby avatar Jun 17 '20 16:06 tvby

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

randy3k avatar Jun 17 '20 16:06 randy3k

oh ok I will repost

tvby avatar Jun 17 '20 16:06 tvby

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

randy3k avatar Jun 17 '20 16:06 randy3k

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?

tvby avatar Jun 17 '20 17:06 tvby

With R-IDE, you only need


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

randy3k avatar Jun 17 '20 18:06 randy3k

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

tvby avatar Jun 18 '20 10:06 tvby