Skip to content

Commit

Permalink
add vscode configurations (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
eagleoflqj authored Feb 8, 2025
1 parent efed85a commit 64f2c4f
Show file tree
Hide file tree
Showing 6 changed files with 73 additions and 3 deletions.
1 change: 1 addition & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
IndentWidth: 4
7 changes: 4 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ jobs:
with:
submodules: recursive

- name: Lint
if: ${{ matrix.env == 'clang64' }}
run: ./win32/scripts/lint.ps1

- name: Install dependencies (msys)
if: ${{ matrix.env == 'msys' }}
run: |
Expand Down Expand Up @@ -83,9 +87,6 @@ jobs:

- uses: actions/checkout@v4

- name: Lint
run: ./scripts/lint.ps1

- name: Build
run: |
cmake -B build -G Ninja `
Expand Down
5 changes: 5 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"recommendations": [
"llvm-vs-code-extensions.vscode-clangd"
]
}
7 changes: 7 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"clangd.path": "C:/msys64/clang64/bin/clangd.exe",
"clangd.arguments": [
"-background-index",
"-compile-commands-dir=build-clang"
]
}
55 changes: 55 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "shell",
"label": "Configure",
"command": "cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug",
"options": {
"env": {
"PATH": "C:/msys64/clang64/bin"
}
},
"group": {
"kind": "build"
}
},
{
"type": "shell",
"label": "Build",
"command": "cmake --build build",
"group": {
"kind": "build"
}
},
{
"type": "shell",
"label": "Install",
"command": "cmake --install build",
"options": {
"env": {
"DESTDIR": "dist"
}
},
"group": {
"kind": "build"
}
},
{
"type": "shell",
"label": "Format",
"command": "./win32/scripts/format.ps1",
"group": {
"kind": "build"
}
},
{
"type": "shell",
"label": "Lint",
"command": "./win32/scripts/lint.ps1",
"group": {
"kind": "build"
}
}
]
}
1 change: 1 addition & 0 deletions win32/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"clangd.path": "C:/Program Files/LLVM/bin/clangd.exe",
"clangd.arguments": [
"-background-index",
"-compile-commands-dir=build"
Expand Down

0 comments on commit 64f2c4f

Please sign in to comment.