Skip to content

Commit

Permalink
增加对 clangd 插件的支持
Browse files Browse the repository at this point in the history
  • Loading branch information
skb666 committed Dec 10, 2024
1 parent b5b58f0 commit 436d1aa
Show file tree
Hide file tree
Showing 7 changed files with 83 additions and 7 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,14 @@ Mkfile.old
dkms.conf

build
dist
target
.vscode
.cache
.config
.config.old
.config.mk
.flash.conf.json
!assets/vscode_*_debug/.vscode

# python
Expand Down
1 change: 1 addition & 0 deletions template/.clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ BasedOnStyle: Google, IndentWidth: 4, TabWidth: 4, ColumnLimit: 0 }
68 changes: 68 additions & 0 deletions template/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Prerequisites
*.d

# Object files
*.o
*.ko
*.obj
*.elf

# Linker output
*.ilk
*.map
*.exp

# Precompiled Headers
*.gch
*.pch

# Libraries
*.lib
*.a
*.la
*.lo

# Shared objects (inc. Windows DLLs)
*.dll
*.so
*.so.*
*.dylib

# Executables
*.exe
*.out
*.app
*.i*86
*.x86_64
*.hex

# Debug files
*.dSYM/
*.su
*.idb
*.pdb

# Kernel Module Compile Results
*.mod*
*.cmd
.tmp_versions/
modules.order
Module.symvers
Mkfile.old
dkms.conf

build
dist
target
.vscode
.cache
.config
.config.old
.config.mk
.flash.conf.json
!assets/vscode_*_debug/.vscode

# python
*.pyc
__pycache__

8 changes: 5 additions & 3 deletions template/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
{
"C_Cpp.default.configurationProvider": "ms-vscode.cmake-tools",
"cmake.sourceDirectory": [
"${workspaceFolder}/test_sample",
"${workspaceFolder}/test_vcpkg",
],
"cmake.buildDirectory": "${sourceDirectory}/build",
"C_Cpp.default.configurationProvider": "ms-vscode.cmake-tools",
"cmake.configureOnOpen": false
}
"cmake.autoSelectActiveFolder": true,
"cmake.buildBeforeRun": true,
"cmake.configureOnOpen": false,
}
4 changes: 2 additions & 2 deletions template/test_sample/.gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
**/build
**/.cache


build
.config.mk
.flash.conf.json

4 changes: 2 additions & 2 deletions template/test_vcpkg/.gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
**/build
**/.cache


build
.config.mk
.flash.conf.json

1 change: 1 addition & 0 deletions tools/cmake/compile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# @license Apache 2.0
#

set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

# Convert to cmake path(for Windows)
file(TO_CMAKE_PATH "${SDK_PATH}" SDK_PATH)
Expand Down

0 comments on commit 436d1aa

Please sign in to comment.