-
Notifications
You must be signed in to change notification settings - Fork 0
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
Feature/vscode config #1
Conversation
I should be more explicit on how to test this:
|
bb4769b
to
b7c121e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice!
You must also install clang-format in a script somewhere
dotfiles/place_dotfiles.sh
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can remove all sudo
calls here, you are modifying only the home directory.
README.md
Outdated
./installation_scripts/install_vscode.sh | ||
``` | ||
|
||
2. To install all extensions run: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before step 2 all vscode instances must be closed!
Some more probably usefull settings to add to "explorer.confirmDelete": false, // does not ask with popup when you want to delete files
"window.titleBarStyle": "custom", // Title bar matches your theme
"editor.rulers": [100] // under the [c][cpp] section??
"editor.inlineSuggest.enabled": true, // This replaces the sugess
// You can use this to control which file types are enabled for copilot
"github.copilot.enable": {
"*": true,
"plaintext": false,
"markdown": true,
"scminput": false // This is the git commit message box, haha.
},
"diffEditor.ignoreTrimWhitespace": false // See all changes in whitespace when viewing diffs. So that you don't accidentally change some whitespace and then not see in in the diff view.
// Maybe a bit to personal. This also highlights the word TEST:
// (I suggest we add a guideline when to use TODO, FIXME, TEST and other such words.)
"todohighlight.keywords": [
{
"text": "TEST:",
"color": "#ff0000",
"backgroundColor": "#30CB30",
"overviewRulerColor": "grey"
}
]
|
@MarkoSagadin The snippets only work in c files, not in cpp files. This can be fixed by either having a separate cpp.json file in the snippets folder, or by modifying the file associations settings: "files.associations": {
"CMakeLists.txt": "cmake",
"*.h": "c",
"*.hpp": "c",
"*.cpp": "c"
}, |
Vscode automatically detects most conf files to be YAML, and then proceeds to show a bunch of yaml sintax errors... There must be a way to define file associations for conf files, which usually don't have file extension (like < explore using the Kconfig extension from Nordic? - after a quick test this works out of the box with almost no settings changes. A build folder is the only required thing for it to work.
|
I also did a quick check of the nRF DeviceTree extension. It kinda works. The extensions shows errors and warning when viewing a DTS file and also support a GUI editor (think CubeMX). But how accurate/valid the information shown actually is I do not know (do not have time currently to check). |
5dc5924
to
4dec3ea
Compare
I force-pushed a commit with requested changes. I added the settings that you suggested except the below ones, I think that they are too specific: "window.titleBarStyle": "custom", // Title bar matches your theme
"todohighlight.keywords": [
{
"text": "TEST:",
"color": "#ff0000",
"backgroundColor": "#30CB30",
"overviewRulerColor": "grey"
}
] I added instructions for using Profile files. Check, if they are ok. I also added most of the Nordic plugins except the main one. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work :)
I have evaluated this PR using Ubuntu 22.04.
Profile importing works great, I especially like the fact that you can choose which extensions it should install.
I had however problems when running extension installation script. The script didn't install any extensions and threw Buffer is deprecated error on each install attempt.
Comments on extensions:
- the scripts didn't disable / uninstall Microsoft's c/c++ extension, which I think is not desired to be enabled?
- I recommend adding the Code Spell Checker extension
- Consider changing Github theme and Noctis extension to be optional as not every user wants to use any of those themes
- I also think IntelliCode extension should be included as it provides code suggestions for python and TS/JS projects (writing this as I didn't get any suggestions using the setup that was made from this PR)
- I also recommend adding isort extension which automatically sorts the imports for python
- I also in RN projects use the extension React Native tools, please add it here as well
Settings:
Consider adding these settings:
"telemetry.telemetryLevel": "crash",
"github.copilot.enable": {
"markdown": true,
},
"git.autofetch": true,
"terminal.integrated.defaultProfile.windows": "Command Prompt",
"terminal.integrated.defaultProfile.osx": "zsh",
"terminal.integrated.profiles.osx": {
"zsh": {
"path": "zsh",
"args": [
"-l",
"-i"
]
},
},
"editor.detectIndentation": false, | ||
"editor.tabSize": 8, | ||
"editor.insertSpaces": false, | ||
"editor.rulers": [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be removed as it's too specific.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only editor.rulers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will remove it.
"debug.focusWindowOnBreak": false, | ||
"debug.focusEditorOnBreak": false, | ||
"[markdown]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is wrong, it should be:
"[markdown]": {
"editor.defaultFormatter": "yzhang.markdown-all-in-one"
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is on purpose. Prettier works much better for formatting the markdowns than markdownlint
does.
I have seen this warning on my side as well, but the extensions were installed anyway. This might be
If scripts are used they should be used on a completely clean VSCode setup. They won't uninstall Did you back up your existing configuration before trying scripts?
We have the
They are only installed but not configured to be used (the used theme is the VSCode default one,
I will add it, I was not aware of it.
So, this extension is supported in Ruff and is also already enabled in our ruff.toml file that is provided with the To have the consistent formatting in your Python files just copy the
I have added it.
Our Copilot setting already does what you want so that is ok. I will make Everything else I would say that is personal preference, and should be added explicitly by the user. |
4dec3ea
to
23bc74a
Compare
23bc74a
to
514b1cd
Compare
Description
This PR adds a VSCode configuration files and accompanying documentation.
Closes #18
Areas of interest for the reviewer
I would like to ask reviewers to clone this repo to their machines, checkout the
feature/vscode_config
branch and try to setup the VSCode by following the instructions in theREADME.md
.I would like you to spend some time using this configuration and see, if it is suitable for our use.
If you see that something that should be added/changed/removed, don't hesitate to mention it.
My main goal with this configuration is that provides a good solid editor base for our developers
After-review steps