Change so setting changes take effect immediately#301
Change so setting changes take effect immediately#301Ikuyadeu merged 5 commits intoREditorSupport:masterfrom
Conversation
|
I committed with unsaved changes to |
|
Another question is that it seems the |
|
@renkun-ken Good catch! Will do. |
|
Hmm, we could retain the intention of |
| import path = require('path'); | ||
| import { window, workspace } from 'vscode'; | ||
| import winreg = require('winreg'); | ||
| export let config = workspace.getConfiguration('r'); |
There was a problem hiding this comment.
how is just change to
export const config = (function() {
return workspace.getConfiguration('r');
});It will reduce whole of changes.
by calling
- config.get("")
- workspace.getConfiguration('r').get("")
+ config().get("")There was a problem hiding this comment.
@Ikuyadeu Exactly, that's what I was thinking of.
There was a problem hiding this comment.
export const config = (function() {
return workspace.getConfiguration('r');
});is better than
export function config() {
return workspace.getConfiguration('r');
}?
There was a problem hiding this comment.
I agree with you. My example was misleading between with function and variable
There was a problem hiding this comment.
Okay, I will change to this.
export function config() {
return workspace.getConfiguration('r');
}The commits are becoming a bit messy. I would like to tidy up using REBASE and FORCE PUSH. @Ikuyadeu @renkun-ken Do you approve rebase and force push here?
There was a problem hiding this comment.
In this case, Squash and Merge is better, it will combine your commits to the one.
After your change, I will merge it.
There was a problem hiding this comment.
@Ikuyadeu Okay, no rebase. Thanks in advance for squash and merge.
I will add the commit for config().
|
Diff is much smaller now. |
|
Great! |
|
@Ikuyadeu @renkun-ken Thanks both! |
Closes #299
What problem did you solve?
Currently, changing a vscode-R setting requires a reload of the extension before the setting change takes effect. This PR makes setting changes take effect immediately.
How can I check this pull request?
Create a file
temp.Rwith contentEnable setting
R: Always Use Active Terminal.Open a terminal. Do NOT start R.
Ctrl+Enter in
temp.R.Observe that
Hello Worldis sent to the terminal.Disable setting
R: Always Use Active Terminal.Ctrl+Enter in
temp.R.Observe that a new R session starts in the terminal (with an error because
echois not valid R code).Previously,
R: Always Use Active Terminalwould not have taken effect until the extension was reloaded (e.g., by restarting VS Code).