初版可用
This commit is contained in:
3
template/default/.gitignore
vendored
Normal file
3
template/default/.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
.cache/
|
||||
.qtcreator/
|
||||
build*
|
||||
8
template/default/.zed/keymap.json
Normal file
8
template/default/.zed/keymap.json
Normal file
@@ -0,0 +1,8 @@
|
||||
[
|
||||
{
|
||||
"context": "Editor",
|
||||
"bindings": {
|
||||
"alt-g": "editor::GoToDefinition",
|
||||
},
|
||||
},
|
||||
]
|
||||
26
template/default/.zed/settings.json
Normal file
26
template/default/.zed/settings.json
Normal file
@@ -0,0 +1,26 @@
|
||||
// Folder-specific settings
|
||||
//
|
||||
// For a full list of overridable settings, and general information on folder-specific settings,
|
||||
// see the documentation: https://zed.dev/docs/configuring-zed#settings-files
|
||||
{
|
||||
"tab_size": 4,
|
||||
"ensure_final_newline_on_save": true,
|
||||
"lsp": {
|
||||
"clangd": {
|
||||
"binary": {
|
||||
"arguments": [
|
||||
"--header-insertion=never",
|
||||
"--all-scopes-completion",
|
||||
"--completion-style=detailed",
|
||||
"--clang-tidy",
|
||||
"-j=4",
|
||||
"--pch-storage=memory",
|
||||
"--compile-commands-dir=build",
|
||||
"--background-index",
|
||||
"--ranking-model=heuristics",
|
||||
"--function-arg-placeholders=false",
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
54
template/default/.zed/tasks.json
Normal file
54
template/default/.zed/tasks.json
Normal file
@@ -0,0 +1,54 @@
|
||||
[
|
||||
{
|
||||
"label": "Debug-Config",
|
||||
"command": "cmd",
|
||||
"shell": {
|
||||
"program": "C:\\Windows\\System32\\cmd.exe",
|
||||
},
|
||||
"env": {
|
||||
"EXT_ARGS": "-DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_PREFIX_PATH=C:/local",
|
||||
"CC": "clang",
|
||||
"CXX": "clang++",
|
||||
},
|
||||
"args": [
|
||||
"/c",
|
||||
"cmake -Bbuild -S . -G Ninja %EXT_ARGS% -DCMAKE_BUILD_TYPE=Debug",
|
||||
],
|
||||
"cwd": "$ZED_WORKTREE_ROOT",
|
||||
},
|
||||
{
|
||||
"label": "Debug-Build",
|
||||
"command": "cmd",
|
||||
"shell": {
|
||||
"program": "C:\\Windows\\System32\\cmd.exe",
|
||||
},
|
||||
"args": ["/c", "cmake --build build --config Debug"],
|
||||
"cwd": "$ZED_WORKTREE_ROOT",
|
||||
},
|
||||
{
|
||||
"label": "Release-Config",
|
||||
"command": "cmd",
|
||||
"shell": {
|
||||
"program": "C:\\Windows\\System32\\cmd.exe",
|
||||
},
|
||||
"env": {
|
||||
"EXT_ARGS": "-DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_PREFIX_PATH=C:/local",
|
||||
"CC": "clang",
|
||||
"CXX": "clang++",
|
||||
},
|
||||
"args": [
|
||||
"/c",
|
||||
"cmake -Bbuild -S . -G Ninja %EXT_ARGS% -DCMAKE_BUILD_TYPE=Release",
|
||||
],
|
||||
"cwd": "$ZED_WORKTREE_ROOT",
|
||||
},
|
||||
{
|
||||
"label": "Release-Build",
|
||||
"command": "cmd",
|
||||
"shell": {
|
||||
"program": "C:\\Windows\\System32\\cmd.exe",
|
||||
},
|
||||
"args": ["/c", "cmake --build build --config Release"],
|
||||
"cwd": "$ZED_WORKTREE_ROOT",
|
||||
},
|
||||
]
|
||||
14
template/default/CMakeLists.txt
Normal file
14
template/default/CMakeLists.txt
Normal file
@@ -0,0 +1,14 @@
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
project(zedTemplate LANGUAGES CXX)
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
|
||||
set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib/${CMAKE_BUILD_TYPE})
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin/${CMAKE_BUILD_TYPE})
|
||||
|
||||
if (MSVC)
|
||||
add_compile_options(/utf-8)
|
||||
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
|
||||
endif()
|
||||
|
||||
add_executable(zedTemplate main.cpp)
|
||||
7
template/default/main.cpp
Normal file
7
template/default/main.cpp
Normal file
@@ -0,0 +1,7 @@
|
||||
#include <iostream>
|
||||
|
||||
int main()
|
||||
{
|
||||
std::cout << "Done." << std::endl;
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user