Add vscode LSP support

This commit is contained in:
Florian RICHER 2025-02-08 19:40:31 +01:00
parent d5ea2832d5
commit 5686c97114
Signed by: florian.richer
GPG key ID: C73D37CBED7BFC77
3 changed files with 25 additions and 4 deletions

15
.vscode/c_cpp_properties.json vendored Normal file
View file

@ -0,0 +1,15 @@
{
"configurations": [
{
"name": "Linux",
"includePath": [
"${workspaceFolder}/**",
"${env:C_INCLUDE_PATH}"
],
"defines": [],
"cStandard": "c11",
"intelliSenseMode": "linux-gcc-x64"
}
],
"version": 4
}

5
.vscode/settings.json vendored Normal file
View file

@ -0,0 +1,5 @@
{
"files.associations": {
"*.h": "c"
}
}

View file

@ -14,16 +14,17 @@
let let
pkgs = import nixpkgs { inherit system; }; pkgs = import nixpkgs { inherit system; };
linux_dev = pkgs.linuxKernel.kernels.linux_zen.dev; linux = pkgs.linuxKernel.kernels.linux_zen;
in { in {
devShells = { devShells = {
default = pkgs.mkShell { default = pkgs.mkShell {
packages = [ linux_dev ]; packages = [ linux.moduleBuildDependencies ];
LINUX_MODULES_FOLDER = "${linux_dev}/lib/modules/${linux_dev.modDirVersion}"; LINUX_MODULES_FOLDER = "${linux.dev}/lib/modules/${linux.modDirVersion}";
C_INCLUDE_PATH = "${linux.dev}/lib/modules/${linux.modDirVersion}/source/include";
shellHook = '' shellHook = ''
echo "Current Linux Kernel used : ${linux_dev.version}" echo "Current Linux Kernel used : ${linux.version}"
''; '';
}; };
}; };